All Files (61.59% covered at 28.57 hits/line)
683 files in total.
27162 relevant lines.
16729 lines covered and
10433 lines missed
-
# Other authorizers should subclass this one
-
1
class ApplicationAuthorizer < Authority::Authorizer
-
-
# Any class method from Authority::Authorizer that isn't overridden
-
# will call its authorizer's default method.
-
#
-
# @param [Symbol] adjective; example: `:creatable`
-
# @param [Object] user - whatever represents the current user in your app
-
# @return [Boolean]
-
1
def self.default(adjective, user)
-
# 'Whitelist' strategy for security: anything not explicitly allowed is
-
# considered forbidden.
-
false
-
end
-
-
end
-
1
class MembershipAuthorizer < ApplicationAuthorizer
-
-
1
def self.creatable_by?(user, options={})
-
!user.member_of? options.fetch(:for)
-
end
-
-
1
def updatable_by?(user)
-
# TODO: May want to include safe navigation
-
user == resource.organization.admin && only_changing_state?(resource)
-
end
-
-
1
private
-
-
1
def only_changing_state?(resource)
-
resource.changes.keys.size == 1 && resource.changes.include?('state')
-
end
-
-
end
-
1
module API
-
1
module V1
-
1
class APIController < JSONAPI::ResourceController
-
1
include ActionController::HttpAuthentication::Token::ControllerMethods
-
1
include ActionController::MimeResponds
-
-
1
def context
-
31
{ current_user: current_user }
-
end
-
-
1
private
-
-
1
def restrict_access
-
30
unless restrict_access_by_params || restrict_access_by_header
-
9
render json: { message: 'Invalid API key.' }, status: 401
-
9
return
-
end
-
-
21
@current_user = @api_key.user if @api_key
-
end
-
-
1
def restrict_access_by_header
-
25
return true if @api_key
-
25
authenticate_with_http_token { |token|
-
16
@api_key = APIKey.find_by(token: token)
-
}
-
end
-
-
1
def restrict_access_by_params
-
30
return true if @api_key
-
30
@api_key = APIKey.find_by(token: params[:api_key])
-
end
-
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class DevelopmentTeamMembershipsController < APIController
-
-
1
before_action :restrict_access, except: [:index, :show]
-
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class DevelopmentsController < APIController
-
1
before_action :restrict_access, only: [:create, :update]
-
1
after_action :log_search, only: [:index]
-
-
1
def update
-
2
@request = JSONAPI::Request.new(params, context: context,
-
key_formatter: key_formatter,
-
2
server_error_callbacks: (self.class.server_error_callbacks || []))
-
2
unless @request.errors.empty?
-
render_errors(@request.errors)
-
else
-
2
development = Development.find params[:id]
-
2
development.assign_attributes(update_params)
-
2
if development.changes.any? && development.valid?
-
1
persist!(development)
-
1
render json: serialized_resource(development),
-
content_type: JSONAPI::MEDIA_TYPE,
-
status: :accepted
-
else
-
1
raise JSONAPI::Exceptions::ValidationErrors.new(resource(development))
-
end
-
end
-
rescue => e
-
1
handle_exceptions(e)
-
ensure
-
2
if response.body.size > 0
-
2
response.headers['Content-Type'] = JSONAPI::MEDIA_TYPE
-
end
-
end
-
-
1
private
-
-
1
def serialized_resource(development)
-
JSONAPI::ResourceSerializer.new(DevelopmentResource).
-
1
serialize_to_hash(resource(development))
-
end
-
-
1
def resource(development)
-
2
DevelopmentResource.new(development, nil)
-
end
-
-
1
def persist!(development)
-
# Without a transaction, this can become a dangling edit with
-
# no changes, which causes an error in our timid pending edits template.
-
1
ActiveRecord::Base.transaction do
-
1
edit = development.edits.create!(editor: current_user)
-
1
development.changes.each_pair do |name, diff|
-
4
edit.fields.create!(
-
name: name,
-
change: { from: diff.first, to: diff.last }
-
)
-
end
-
end
-
1
development.reload # Clear out changes before rendering.
-
end
-
-
1
def log_search
-
7
if filter_params.keys.any?
-
5
user = current_user || User.null
-
5
Search.create!(query: filter_params, user: user)
-
end
-
end
-
-
1
def filter_params
-
14
params.fetch(:filter) { Hash.new }
-
end
-
-
1
def update_params
-
2
Hash[
-
params.fetch(:data).fetch(:attributes).map { |k, v|
-
10
[k.underscore, v]
-
}
-
]
-
end
-
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class OrganizationsController < JSONAPI::ResourceController
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class SearchesController < APIController
-
-
1
before_action :restrict_access
-
-
1
private
-
-
1
def search_params
-
params.permit(:api_key)
-
end
-
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class SubscriptionsController < APIController
-
-
1
before_action :restrict_access
-
-
end
-
end
-
end
-
1
class ApplicationController < ActionController::Base
-
# Prevent CSRF attacks by raising an exception.
-
# For APIs, you may want to use :null_session instead.
-
1
protect_from_forgery with: :exception
-
-
1
layout :layout_by_resource
-
-
# Send 'em back where they came from with a slap on the wrist
-
1
def authority_forbidden(error)
-
Authority.logger.warn(error.message)
-
flash[:alert] = 'You are not authorized to complete that action.'
-
redirect_to request.referrer.presence || root_path
-
end
-
-
1
rescue_from 'BCrypt::Errors::InvalidHash' do |exception|
-
flash[:partial] = { path: 'users/reset_password' }
-
redirect_to request.referer || root_path
-
end
-
-
1
protected
-
-
1
def layout_by_resource
-
19
if devise_controller?
-
19
"devise"
-
else
-
"application"
-
end
-
end
-
-
1
def authenticate_user!(options = {})
-
1
if user_signed_in?
-
1
super
-
else
-
redirect_to '/users/sign_in'
-
end
-
end
-
-
1
def after_sign_in_path_for(resource)
-
user_path(resource)
-
end
-
-
1
alias_method :devise_current_user, :current_user
-
-
1
def current_user
-
5
UserPresenter.new(devise_current_user || User.null)
-
end
-
-
end
-
1
class ClaimsController < ApplicationController
-
1
before_action :authenticate_user!, only: [:new, :create]
-
1
before_action :load_parent, only: [:new, :create]
-
-
1
def new
-
@claim = Claim.new(development: @development)
-
end
-
-
1
def create
-
@claim = Claim.new new_claim_params
-
@claim.assign_attributes(development: @development,
-
claimant: devise_current_user)
-
if @claim.save
-
flash[:success] = CLAIM_CREATED
-
else
-
flash[:danger] = @claim.errors.full_messages # CLAIM_NOT_CREATED
-
end
-
redirect_to @development
-
end
-
-
1
def index
-
@claim = Claim.all
-
end
-
-
1
private
-
-
1
def load_parent
-
@development = Development.find params[:development_id]
-
end
-
-
1
def new_claim_params
-
params.require(:claim).permit(:role)
-
end
-
-
1
CLAIM_CREATED = '''
-
Thanks! We received your claim and will address it within 5-10 business days.
-
'''
-
-
1
CLAIM_NOT_CREATED = """
-
Sorry, we were unable to accept your claim. Please contact
-
us if you think this message is in error.
-
"""
-
-
end
-
1
class DevelopmentsController < ApplicationController
-
-
1
layout 'search', except: [:show]
-
-
1
before_action :load_record, only: [:show, :image, :edit, :update]
-
1
before_action :authenticate_user!, only: [:edit, :update]
-
-
1
def index
-
@limits = Development.ranged_column_bounds.to_json
-
end
-
-
1
def show
-
4
if @development.out_of_date?
-
4
flash.now[:partial] = { path: 'developments/out_of_date' }
-
end
-
end
-
-
1
def new
-
end
-
-
1
def edit
-
end
-
-
1
def image
-
send_data @development.street_view.image, type: 'image/jpg',
-
disposition: 'inline'
-
end
-
-
1
def export
-
@search = ReportPresenter.new Search.new(query: export_params)
-
respond_to do |format|
-
format.pdf { render Export::PDF.new(@search).render }
-
format.html { render Export::PDF.new(@search, show_as_html: true).render }
-
format.csv { send_data *Export::CSV.new(@search).render }
-
end
-
end
-
-
1
private
-
-
1
def load_record
-
4
@development = DevelopmentPresenter.new(Development.find(params[:id]))
-
end
-
-
1
def export_params
-
params.permit *(Development.column_names.map(&:to_sym) + Development::FieldAliases::ALIASES.keys)
-
end
-
-
end
-
1
class EditsController < ApplicationController
-
-
1
before_action :authenticate_user!
-
1
before_action :load_parent
-
1
before_action :assert_moderator
-
-
1
before_action :load_unmoderated_record, only: [:approve, :decline]
-
-
-
1
def pending
-
end
-
-
1
def approve
-
@edit.update_attribute(:ignore_conflicts, true)
-
moderate(EditApproval, @edit, :approved)
-
end
-
-
1
def decline
-
moderate(EditDecline, @edit, :declined)
-
end
-
-
1
private
-
-
1
def assert_moderator
-
unless devise_current_user.moderator_for? @development
-
flash[:error] = "You are not a moderator for #{@development.name}."
-
redirect_to @development
-
end
-
end
-
-
1
def moderate(moderator_class, object, partial_ref)
-
if moderator_class.new(object).perform!
-
obj = partial_object(partial_ref)
-
if object.development.edits.pending.empty?
-
obj[:object][:none_left] = true
-
end
-
flash[:partial] = obj
-
redirect_to :pending_development_edits
-
else
-
default_rescue_action(object)
-
end
-
end
-
-
1
def load_parent
-
@development = DevelopmentPresenter.new(
-
Development.find(params[:development_id])
-
)
-
end
-
-
1
def load_unmoderated_record
-
@edit = Edit.find(params[:id])
-
if @edit.moderated?
-
flash[:error] = "The edit you were trying to moderate has already been #{@edit.state}."
-
redirect_to :pending_development_edits
-
end
-
end
-
-
1
def default_rescue_action(object)
-
Airbrake.notify 'Default rescue action' if defined?(Airbrake)
-
flash[:partial] = claim_not_acted_upon
-
redirect_to :pending_development_edits
-
end
-
-
1
def partial_object(action)
-
{
-
path: 'edits/action',
-
object: {
-
action: action,
-
name: @edit.editor.first_name
-
}
-
}
-
end
-
-
1
def error_partial(message)
-
{ path: 'unexpected_error', object: { message: message } }
-
end
-
-
1
def claim_not_acted_upon
-
error_partial 'As a result, the edit you were trying to resolve may not be resolved.'
-
end
-
-
end
-
1
class FlagsController < ApplicationController
-
1
before_action :authenticate_user!, only: [:new, :create]
-
1
before_action :load_parent, only: [:new, :create, :close]
-
1
before_action :assert_moderator, only: [:close]
-
-
1
def new
-
@flag = Flag.new(development: @development)
-
end
-
-
1
def create
-
@flag = Flag.new new_flag_params
-
@flag.assign_attributes(development: @development,
-
flagger: devise_current_user, state: :open)
-
if @flag.save
-
flash[:success] = FLAG_CREATED
-
redirect_to @development
-
else
-
flash[:error] = FLAG_NOT_CREATED
-
render :new
-
end
-
end
-
-
1
def close
-
@flag = Flag.find(params[:id])
-
@flag.assign_attributes(resolver: devise_current_user)
-
@flag.resolved
-
@flag.save!
-
redirect_to @development
-
end
-
-
1
private
-
-
1
def load_parent
-
@development = Development.find params[:development_id]
-
end
-
-
1
def new_flag_params
-
params.require(:flag).permit(:reason)
-
end
-
-
1
def assert_moderator
-
unless devise_current_user.moderator_for? @development
-
flash[:error] = "You are not a moderator for #{@development.name}."
-
redirect_to @development
-
end
-
end
-
-
1
FLAG_CREATED = "Thanks for letting us know! We received your flag
-
and will address it shortly.".gsub(/\s{2,}/, ' ').freeze
-
-
1
FLAG_NOT_CREATED = 'Sorry, we were unable to accept your flag.'.freeze
-
-
end
-
1
class OrganizationsController < ApplicationController
-
1
before_filter :authenticate_user!, except: [:show, :index]
-
1
before_action :load_presented_record, only: [:show, :edit]
-
-
1
def index
-
@organizations = Organization.order(:name).page params[:page]
-
end
-
-
1
def new
-
@organization = Organization.new
-
end
-
-
1
def show
-
end
-
-
1
def edit
-
end
-
-
1
def update
-
@organization = Organization.find(params[:id])
-
if @organization.update_attributes(org_params)
-
flash[:success] = 'Organization updated!'
-
redirect_to @organization
-
else
-
render 'edit'
-
end
-
end
-
-
1
def create
-
@organization = Organization.new(org_params)
-
@organization.creator = devise_current_user
-
-
if @organization.save
-
flash[:success] = 'Organization successfully created.'
-
redirect_to @organization
-
else
-
flash[:danger] = @organization.errors.full_messages
-
render new_organization_path
-
end
-
end
-
-
1
private
-
-
1
def org_params
-
params.require(:organization).permit(:name, :location, :email,
-
:gravatar_email, :website, :short_name, :abbv)
-
end
-
-
1
def load_presented_record
-
@organization = OrganizationPresenter.new(
-
Organization.find(params[:id])
-
)
-
end
-
end
-
1
class SearchesController < ApplicationController
-
-
1
before_action :load_record
-
1
before_action :ensure_saved_search
-
-
1
def show
-
3
respond_to do |format|
-
3
format.pdf { render Export::PDF.new(@search).render }
-
5
format.html { render Export::PDF.new(@search, show_as_html: true).render }
-
4
format.csv { send_data *Export::CSV.new(@search).render }
-
end
-
end
-
-
1
private
-
-
1
def load_record
-
3
@search = ReportPresenter.new(Search.find(params[:id]))
-
end
-
-
# TODO: Refactor
-
1
def ensure_saved_search
-
3
search = @search.item
-
3
if search.unsaved?
-
3
search.saved = true
-
3
search.save!
-
end
-
end
-
end
-
1
class Form
-
1
include ActiveModel::Model
-
1
include Virtus.model
-
-
1
def persisted?
-
1
false
-
end
-
-
1
def save
-
1
if valid?
-
1
persist!
-
true
-
else
-
false
-
end
-
end
-
-
1
private
-
-
1
def persist!
-
1
raise NotImplementedError,
-
"must implement private method #persist!. Find me in #{__FILE__}"
-
end
-
end
-
1
module ApplicationHelper
-
end
-
1
class DigestJob
-
-
1
attr_reader :frequency, :time
-
-
# In case the scheduler runs a early, we have a buffer.
-
1
BUFFER = 6.hours
-
-
1
TIME_LOOKUP = {
-
daily: 1.day.ago + BUFFER,
-
weekly: 1.week.ago + BUFFER,
-
# To be more explicit and avoid checking, I don't want :never to
-
# return nil, even though nil returns 0 users and is kind of useful.
-
never: Time.zone.now
-
}.freeze
-
-
1
def initialize(frequency = :weekly)
-
7
@frequency = frequency
-
7
assert_frequency_in_options
-
6
@time = TIME_LOOKUP[frequency]
-
end
-
-
1
def perform
-
users.find_each do |user|
-
send_email_and_update(user)
-
end
-
end
-
-
1
def users
-
5
return [] if @frequency == :never
-
User.where('last_checked_subscriptions < ?', @time).
-
4
where(mail_frequency: @frequency)
-
end
-
-
1
private
-
-
1
def send_email_and_update(user)
-
if user.subscriptions_needing_update.any?
-
SubscriptionMailer.digest(user).deliver_later
-
end
-
user.touch :last_checked_subscriptions
-
rescue => e
-
log_error(e, user)
-
end
-
-
1
def log_error(e, user)
-
Rails.logger.error "Could not email user #{user}"
-
Rails.logger.error "#{e.message}\n#{e.backtrace}"
-
end
-
-
1
def assert_frequency_in_options
-
28
opts = User.mail_frequency.options.map { |o| o.last.to_sym }
-
7
unless opts.include?(@frequency)
-
1
raise ArgumentError, error_message
-
end
-
end
-
-
1
def error_message
-
1
"Frequency must be one of #{opts}, but was #{@frequency.inspect}"
-
end
-
-
end
-
1
class ApplicationMailer < ActionMailer::Base
-
1
default from: 'no-reply@dd.mapc.org'
-
1
layout 'mailer'
-
end
-
1
class SubscriptionMailer < ApplicationMailer
-
-
# Subject can be set in your I18n file at config/locales/en.yml
-
# with the following lookup:
-
#
-
# en.subscription_mailer.digest.subject
-
#
-
1
def digest(user)
-
1
@digest = DigestPresenter.new(user)
-
-
1
mail to: user.email, subject: subject
-
end
-
-
1
private
-
-
1
def subject
-
1
timestamp = @digest.user.last_checked_subscriptions.to_s(:subject)
-
1
"Development updates since #{timestamp}"
-
end
-
-
end
-
1
class APIKey < ActiveRecord::Base
-
1
before_create :generate_token
-
-
1
belongs_to :user
-
-
1
attr_readonly :token
-
-
1
validates :user, presence: true
-
-
1
def to_s
-
17
token
-
end
-
-
1
private
-
-
1
def generate_token
-
19
self.token = loop do
-
19
random_token = SecureRandom.hex.to_s
-
19
break random_token unless self.class.exists?(token: random_token)
-
end
-
end
-
-
end
-
1
class Broadcast < ActiveRecord::Base
-
1
extend Enumerize
-
# Everyone gets the same notification,
-
# or same general notification with custom variables.
-
1
belongs_to :creator, class_name: :User
-
-
1
validates :subject, presence: true
-
1
validates :body, presence: true
-
-
1
enumerize :state, in: [:draft, :scheduled, :delivered],
-
default: :draft, predicates: true
-
-
# This is 'telling'.
-
1
def schedule!
-
4
raise StandardError, 'Not schedulable.' unless schedulable?
-
# TODO: Scheduling work
-
1
scheduled
-
end
-
-
# This is 'notifying'.
-
1
def scheduled
-
1
self.state = :scheduled
-
end
-
-
1
def deliver!
-
2
raise StandardError, 'Not deliverable.' unless deliverable?
-
# TODO: Delivery work
-
# This #delivered call may exist in the background job,
-
# but we're writing it here to notify that the 'work', presently
-
# nothing, is done.
-
1
delivered
-
end
-
-
1
def delivered
-
1
self.state = :delivered
-
end
-
-
1
def schedulable?
-
5
scope.present? && scheduled_for.present? &&
-
scope_returns_at_least_one_record
-
end
-
-
1
def deliverable?
-
3
scope.present? && scope_returns_at_least_one_record
-
end
-
-
1
private
-
-
1
def scope_returns_at_least_one_record
-
3
User.where(scope).any?
-
end
-
-
end
-
1
class Claim < ActiveRecord::Base
-
1
extend Enumerize
-
-
1
belongs_to :claimant, class_name: :User
-
1
belongs_to :development
-
1
belongs_to :moderator, class_name: :User
-
-
1
validates :development, presence: true
-
1
validates :claimant, presence: true
-
1
validates :role, presence: true
-
-
1
enumerize :state, in: [:pending, :approved, :denied],
-
default: :pending, predicates: true
-
-
1
enumerize :role, in: DevelopmentTeamMembership.role.options
-
-
1
def approve!(options = {})
-
4
save if approve(options)
-
end
-
-
1
def approve(options = {})
-
7
self.reason = options.fetch(:reason) { nil }
-
4
assert_valid_moderator(options)
-
# TODO: Assign claimant as desired role on project.
-
2
approved
-
end
-
-
1
def approved
-
2
self.state = :approved
-
end
-
-
1
def deny!(options = {})
-
2
save if deny(options)
-
end
-
-
1
def deny(options)
-
2
assert_valid_moderator(options)
-
2
assert_valid_reason(options)
-
1
denied
-
end
-
-
1
def denied
-
1
self.state = :denied
-
end
-
-
# alias_method :approve!, :accept!
-
# alias_method :deny!, :reject!
-
# alias_method :deny!, :decline!
-
-
1
private
-
-
1
def assert_valid_moderator(options)
-
6
self.moderator ||= options.fetch(:moderator) do
-
1
raise ArgumentError, 'approving a claim requires a :moderator option'
-
end
-
5
if self.moderator.nil?
-
1
raise ArgumentError, ':moderator option must be a non-nil'
-
end
-
end
-
-
1
def assert_valid_reason(options)
-
2
self.reason ||= options.fetch(:reason) do
-
1
raise ArgumentError, 'denying a claim requires a :reason option'
-
end
-
end
-
end
-
1
class Development
-
1
module FieldAliases
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
ALIASES = {
-
cluster_or_open_space_development: :clusteros,
-
redevelopment: :rdv,
-
as_of_right: :asofright,
-
age_restricted: :ovr55,
-
description: :desc,
-
website: :project_url,
-
zip: :zip_code,
-
hidden: :private
-
}
-
1
ALIASES.each do |new_name, column|
-
8
alias_attribute new_name, column
-
end
-
end
-
-
end
-
end
-
1
class Development
-
1
module History
-
-
1
def history
-
30
edits.applied
-
end
-
-
1
def contributors
-
13
ContributorQuery.new(self).find.map(&:editor).push(creator).compact.uniq
-
end
-
-
1
def updated_since?(time = Time.current)
-
11
history.since(time).any? ? true : created_since?(time)
-
end
-
-
1
def last_updated
-
4
time = history.any? ? history.first.applied_at : created_at
-
4
time.to_s(:subject)
-
end
-
-
1
def created_since?(time = Time.current)
-
9
created_at > time
-
end
-
-
1
OUT_OF_DATE_THRESHHOLD = 6.months.ago
-
-
1
def out_of_date?
-
6
!updated_since? OUT_OF_DATE_THRESHHOLD
-
end
-
-
end
-
end
-
1
class Development
-
1
module Location
-
-
1
def self.included(base)
-
1
base.extend(ClassMethods)
-
end
-
-
1
module ClassMethods
-
1
def within_box(top: , right: , bottom: , left: )
-
factory = RGeo::Geographic.spherical_factory
-
sw = factory.point(left, bottom)
-
ne = factory.point(right, top)
-
window = RGeo::Cartesian::BoundingBox.create_from_points(sw, ne).to_geometry
-
where("point && ?", window)
-
end
-
-
1
def within(geometry)
-
2
where("ST_Intersects(point, ?)", geometry)
-
end
-
end
-
-
1
def location
-
37
[latitude, longitude].map(&:to_f)
-
end
-
-
1
def rlocation
-
1
location.reverse
-
end
-
-
1
def to_geojson
-
20
RGeo::GeoJSON.encode point
-
end
-
-
1
def zip_code
-
79
code = read_attribute(:zip_code).to_s
-
79
code.length == 9 ? nine_digit_formatted_zip(code) : code
-
end
-
-
1
def neighborhood
-
2
place.neighborhood if place
-
end
-
-
1
def municipality
-
94
place.municipality if place
-
end
-
-
1
alias_method :city, :municipality
-
-
1
def parcel
-
OpenStruct.new(id: 123)
-
end
-
-
1
def street_view
-
22
@street_view ||= StreetView.new(self)
-
end
-
-
1
def walkscore
-
12
@walkscore ||= WalkScore.new content: read_attribute(:walkscore)
-
end
-
-
1
def get_walkscore
-
8
self.walkscore = WalkScore.new(lat: latitude, lon: longitude).to_h
-
end
-
-
# TODO: Refactor into fully-tested (> 90%) service object.
-
#
-
# Spec:
-
# - If there is a subway stop in the list, use it.
-
# - If there is no subway stop in the list, use the nearest bus stop.
-
# - If there are no nearby transit results, return nil.
-
# Additionally:
-
# - Remember to add a 'none' display in the view if there is no transit.
-
# - Keep using Net::HTTP - no gem needed for something this simple.
-
#
-
1
def get_nearest_transit
-
8
Transit.new(self).get_nearest_transit
-
end
-
end
-
end
-
1
class Development
-
1
module Meta
-
-
1
def self.included(base)
-
1
base.extend(ClassMethods)
-
end
-
-
1
module ClassMethods
-
# Produces a collection of hashes that list every numeric attribute and
-
# the current minimum and maximum value.
-
1
def ranged_column_bounds
-
1
Hash[ranged_column_array]
-
end
-
-
1
private
-
-
1
def ranged_column_array
-
62
columns.map { |c| column_range(c) unless exclude_from_ranges?(c) }.compact
-
end
-
-
1
def column_range(col)
-
31
minmax = {
-
max: Development.maximum(col.name),
-
min: Development.minimum(col.name)
-
}
-
31
[col.name.to_sym, minmax]
-
end
-
-
1
def exclude_from_ranges?(col)
-
61
exclude_reg = /^street_view_|^id$|_id$/
-
61
include_reg = /(integer|double|timestamp|numeric)/i
-
61
exclude_reg.match(col.name.to_s) || !include_reg.match(col.sql_type.to_s)
-
end
-
end
-
-
end
-
end
-
1
class Development
-
1
module ModelCallbacks
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
before_save :clean_zip_code
-
1
before_save :associate_place
-
1
before_save :set_point
-
1
before_save :determine_mixed_use
-
1
before_save :cache_street_view
-
1
before_save :update_walkscore
-
1
before_save :update_nearest_transit
-
1
before_save :estimate_employment
-
-
1
private
-
-
1
def clean_zip_code
-
20
zip_code.to_s.gsub!(/\D*/, '') # Only digits
-
end
-
-
1
def associate_place
-
20
if location_fields_changed? || new_record?
-
8
places = Place.contains(lat: latitude, lon: longitude)
-
8
if places.empty?
-
7
Airbrake.notify 'No place found' if defined?(Airbrake)
-
7
self.place = nil
-
else
-
1
self.place = places.first
-
end
-
end
-
end
-
-
1
def set_point
-
20
if latitude_changed? || longitude_changed? || new_record?
-
8
self.point = "POINT (#{longitude} #{latitude})"
-
end
-
end
-
-
1
def determine_mixed_use
-
20
if mixed_use?
-
2
self.mixed_use = mixed_use?
-
end
-
end
-
-
1
def cache_street_view
-
20
if street_view_fields_changed? || new_record?
-
4
self.street_view_image = street_view.image(cached: false)
-
end
-
end
-
-
1
def update_walkscore
-
20
if location_fields_changed? || new_record?
-
8
self.get_walkscore
-
end
-
end
-
-
1
def update_nearest_transit
-
20
if location_fields_changed? || new_record?
-
8
self.get_nearest_transit
-
end
-
end
-
-
1
def estimate_employment
-
20
self.estemp = EmploymentEstimator.new(self).estimate
-
end
-
-
1
def location_fields_changed?
-
[:latitude, :longitude, :street_view_latitude, :street_view_longitude].select { |f|
-
240
send("#{f}_changed?")
-
60
}.any?
-
end
-
-
1
def street_view_fields_changed?
-
[:latitude, :longitude, :pitch, :heading].select { |field|
-
80
send("street_view_#{field}_changed?")
-
20
}.any?
-
end
-
-
end
-
-
end
-
end
-
1
class Development
-
1
module Relationships
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
belongs_to :creator, class_name: :User
-
1
belongs_to :place
-
-
1
has_many :edits, dependent: :destroy
-
1
has_many :flags, dependent: :destroy
-
1
has_many :crosswalks
-
-
1
has_many :team_memberships,
-
class_name: :DevelopmentTeamMembership,
-
counter_cache: :team_membership_count,
-
dependent: :destroy
-
-
1
has_many :team_members, through: :team_memberships, source: :organization
-
1
has_many :moderators, through: :team_members, source: :members
-
-
1
has_many :subscriptions, as: :subscribable
-
1
has_many :subscribers, through: :subscriptions, source: :user
-
-
1
has_and_belongs_to_many :programs
-
end
-
-
end
-
end
-
1
class Development
-
1
module Scopes
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
248
default_scope { includes(:place) }
-
-
1
ranged_scopes :created_at, :updated_at, :height, :stories,
-
:year_compl, :affordable, :prjarea, :singfamhu, :twnhsmmult,
-
:lgmultifam, :tothu, :gqpop, :rptdemp, :emploss, :estemp, :commsf,
-
:hotelrms, :onsitepark, :total_cost, :fa_ret, :fa_ofcmd,
-
:fa_indmf, :fa_whs, :fa_rnd, :fa_edinst, :fa_other, :fa_hotel
-
-
1
boolean_scopes :rdv, :asofright, :ovr55, :clusteros, :phased,
-
:stalled, :cancelled, :hidden, :cluster_or_open_space_development,
-
:redevelopment, :as_of_right, :age_restricted, :hidden
-
-
1
scope :close_to, CloseToQuery.new(self).scope
-
end
-
-
end
-
end
-
1
class Development
-
1
module Validations
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
-
1
validates :tothu, presence: true
-
1
validates :commsf, presence: true
-
1
validates :year_compl, presence: true
-
-
1
validates :creator, presence: true
-
-
1
validates :tagline,
-
allow_blank: true,
-
length: { minimum: 11, maximum: 140 }
-
-
1
validates :description,
-
allow_blank: true,
-
length: { minimum: 141, maximum: 500 }
-
-
# Advanced information
-
-
1
with_options if: :requires_detailed_housing? do |record|
-
1
[:singfamhu, :twnhsmmult, :lgmultifam, :gqpop].each do |attribute|
-
4
record.validates attribute, presence: true, numericality: { minimum: 0 }
-
end
-
end
-
-
1
with_options if: :requires_detailed_nonres? do |record|
-
[
-
:fa_ret, :fa_ofcmd, :fa_indmf,
-
:fa_whs, :fa_rnd, :fa_edinst,
-
:fa_other, :fa_hotel
-
1
].each do |attribute|
-
8
record.validates attribute, presence: true, numericality: { minimum: 0 }
-
end
-
end
-
-
1
validate :housing_units_equal_total_coerced, if: :requires_detailed_housing?
-
1
validate :commercial_sqft_equal_total_coerced, if: :requires_detailed_nonres?
-
-
1
validate :housing_units_equal_total
-
1
validate :commercial_sqft_equal_total
-
-
# Location
-
-
1
lat_range = {
-
less_than_or_equal_to: 90,
-
greater_than_or_equal_to: -90
-
}
-
-
1
lon_range = {
-
less_than_or_equal_to: 180,
-
greater_than_or_equal_to: -180
-
}
-
-
1
validates :latitude, presence: true, numericality: lat_range
-
1
validates :longitude, presence: true, numericality: lon_range
-
-
1
validates :street_view_latitude,
-
allow_blank: true,
-
numericality: lat_range
-
-
1
validates :street_view_longitude,
-
allow_blank: true,
-
numericality: lon_range
-
-
# private
-
-
1
def requires_detailed_housing?
-
486
(in_construction? || completed?) && tothu.to_i > 0
-
end
-
-
1
def requires_detailed_nonres?
-
918
(in_construction? || completed?) && commsf.to_i > 0
-
end
-
-
1
def housing_units_equal_total_coerced
-
8
if housing_unit_fields.map(&:to_i).reduce(:+) != tothu
-
4
errors.add(:tothu, 'must equal the sum of unit types')
-
end
-
end
-
-
1
def commercial_sqft_equal_total_coerced
-
8
if commercial_area_fields.map(&:to_i).reduce(:+) != commsf
-
4
errors.add(:commsf, 'must equal the sum of floor area types')
-
end
-
end
-
-
1
def housing_units_equal_total
-
54
if housing_unit_fields.compact.any?
-
7
if housing_unit_fields.compact.reduce(:+).to_i != tothu
-
1
errors.add(:tothu, 'must equal the sum of unit types')
-
end
-
end
-
end
-
-
1
def commercial_sqft_equal_total
-
54
if commercial_area_fields.compact.any?
-
9
if commercial_area_fields.compact.reduce(:+).to_i != commsf
-
1
errors.add(:commsf, 'must equal the sum of floor area types')
-
end
-
end
-
end
-
-
1
def housing_unit_fields
-
69
[singfamhu, twnhsmmult, lgmultifam]
-
end
-
-
1
def commercial_area_fields
-
71
[fa_ret, fa_ofcmd, fa_indmf, fa_whs, fa_rnd, fa_edinst, fa_other, fa_hotel]
-
end
-
-
end
-
end
-
end
-
1
class Crosswalk < ActiveRecord::Base
-
1
belongs_to :organization
-
1
belongs_to :development
-
-
1
validates :organization, presence: true
-
1
validates :development, presence: true
-
1
validates :internal_id, presence: true
-
-
1
def url
-
2
return nil unless organization.has_url_template?
-
1
organization.url_parser.expand(id: internal_id)
-
end
-
end
-
1
require 'walk_score'
-
1
require 'employment_estimator'
-
-
1
class Development < ActiveRecord::Base
-
-
1
extend Enumerize
-
-
1
include Development::ModelCallbacks
-
1
include Development::Relationships
-
1
include Development::Validations
-
1
include Development::Scopes
-
1
include Development::FieldAliases
-
1
include Development::Location
-
1
include Development::History
-
1
include Development::Meta
-
-
1
STATUSES = [:projected, :planning, :in_construction, :completed].freeze
-
1
enumerize :status, in: STATUSES, predicates: true
-
-
1
def to_s
-
2
name
-
end
-
-
1
def mixed_use?
-
29
tothu.to_i > 0 && commsf.to_i > 0
-
end
-
-
1
include PgSearch
-
1
multisearchable against: [
-
:name,
-
:address,
-
:tagline,
-
:description,
-
:place_name,
-
:municipality_name
-
]
-
-
1
def place_name
-
20
place.name if place
-
end
-
-
1
def municipality_name
-
20
place.municipality.name if place
-
end
-
-
1
private
-
-
1
def nine_digit_formatted_zip(code)
-
2
"#{code[0..4]}-#{code[-4..-1]}"
-
end
-
-
end
-
1
class DevelopmentTeamMembership < ActiveRecord::Base
-
1
extend Enumerize
-
-
1
belongs_to :development
-
1
belongs_to :organization
-
-
1
validates :development, presence: true
-
1
validates :organization, presence: true
-
1
validates :role, presence: true,
-
uniqueness: { scope: [:development_id, :organization_id] }
-
-
1
ROLES = { developer: 1, architect: 2, engineer: 3, contractor: 4,
-
landlord: 5, owner: 6, designer: 7 }.freeze
-
-
1
enumerize :role, in: ROLES, predicates: true
-
end
-
1
class Edit < ActiveRecord::Base
-
1
extend Enumerize
-
-
1
has_many :fields, class_name: :FieldEdit, dependent: :destroy
-
-
1
belongs_to :editor, class_name: :User
-
1
belongs_to :moderator, class_name: :User
-
1
belongs_to :development
-
-
1
validates :development, presence: true
-
1
validates :editor, presence: true
-
1
validates :state, presence: true
-
# Disabled until we can get the edit form working with this.
-
# validates :log_entry, presence: true, length: { minimum: 25, maximum: 2000 }
-
35
validates :moderated_at, presence: true, if: -> { approved? || declined? }
-
# validate :applied_only_if_approved
-
-
1
enumerize :state, in: [:pending, :approved, :declined],
-
default: :pending, predicates: true
-
-
1
def self.applied
-
30
where(applied: true).order(applied_at: :desc)
-
end
-
-
1
def self.pending
-
14
where(state: :pending).where(applied: false).order(created_at: :asc)
-
end
-
-
1
def self.since(time = Time.now)
-
15
where 'applied_at > ?', time
-
end
-
-
# TODO: Do these belong here, if the service is handling
-
# the alteration of state?
-
1
def approved
-
3
assign_attributes(moderated_at: Time.now, state: :approved)
-
end
-
-
1
def declined
-
4
assign_attributes(moderated_at: Time.now, state: :declined)
-
end
-
-
1
def applied
-
20
assign_attributes(applied_at: Time.now, applied: true)
-
end
-
-
# The edit can be applied if:
-
# - it's not already applied AND
-
# - there's no conflict OR there is a conflict but it is ignored.
-
1
def applyable?
-
16
if applied? || unignored_conflict?
-
4
false
-
else
-
12
true
-
end
-
end
-
-
1
def moderated?
-
5
moderated_at.presence || approved? || declined?
-
end
-
-
1
def moderatable?
-
3
!moderated?
-
end
-
-
1
def conflicts
-
fields.map do |field|
-
20
if field.conflict?
-
5
{ name: field.name, conflict: field.conflict }
-
end
-
20
end.compact
-
end
-
-
1
def conflicts?
-
18
conflicts.any?
-
end
-
-
1
def diff
-
fields.map { |field| { name: field.name }.merge(field.change) }
-
end
-
-
1
alias_method :conflict, :conflicts
-
1
alias_method :conflict?, :conflicts?
-
-
# Returns true if there is a conflict,
-
# and we aren't explicitly ignoring it.
-
1
def unignored_conflict?
-
14
conflict? && !ignore_conflicts?
-
end
-
-
1
private
-
-
1
def applied_only_if_approved
-
# The state must be :approved if applied = true
-
if applied == true && state.to_sym != :approved
-
errors.add(:applied, 'can only be set if the edit is approved')
-
end
-
end
-
-
end
-
1
class Export::CSV
-
-
1
def initialize(record)
-
1
@record = record
-
end
-
-
1
def render
-
1
[@record.to_csv, options]
-
end
-
-
1
def options
-
1
{ type: Mime::CSV, disposition: disposition }
-
end
-
-
1
private
-
-
1
def disposition
-
1
"attachment; filename=export-#{filename}.csv"
-
end
-
-
1
def filename
-
1
@record.query.flatten.map(&:dasherize).first(4).join('-').gsub(/\[|\]/, '')
-
end
-
end
-
1
class Export::PDF
-
-
1
def initialize(record, filename: :id, title: :title, **options)
-
2
@record = record
-
2
@filename = @record.send(filename).to_s
-
2
@title = (@record.send(title) || 'Development Export').to_s
-
2
@config = default_config.merge(options)
-
end
-
-
1
def render
-
2
@config
-
end
-
-
1
def default_config
-
{
-
pdf: @filename,
-
title: @title,
-
layout: 'pdf',
-
template: 'searches/show.html.haml',
-
header: { right: '[page] of [topage]', font_size: 9 },
-
footer: {
-
# TODO: MAPC Logo
-
left: "Generated on #{Time.now.to_s(:timestamp)}",
-
right: 'mapc.org',
-
font_size: 9
-
}
-
2
}
-
end
-
-
end
-
1
class FieldEdit < ActiveRecord::Base
-
1
extend Enumerize
-
-
1
belongs_to :edit
-
1
delegate :development, to: :edit
-
-
1
validates :name, presence: true
-
1
validates :edit, presence: true
-
1
validate :valid_change
-
-
1
enumerize :name, in: Development.attribute_names
-
-
# Storing as JSON allows us to store the
-
# :to and :from attributes as any type.
-
1
serialize :change, HashSerializer
-
-
1
def from
-
55
change.fetch(:from, nil)
-
end
-
-
1
def to
-
24
change.fetch(:to)
-
end
-
-
1
def conflict
-
29
development_current = development.send(name)
-
29
return nil if development_current == from
-
12
{ current: development_current, from: from }
-
end
-
-
1
def conflict?
-
22
conflict.present?
-
end
-
-
1
private
-
-
1
def valid_change
-
17
errors.add(:change, 'needs a key :to') unless has_right_keys?
-
17
errors.add(:change, 'needs to be different') unless difference?
-
end
-
-
1
def has_right_keys?
-
17
!change.fetch(:to).nil?
-
rescue # doesn't have the key
-
2
false
-
end
-
-
1
def difference?
-
17
change[:from] != change[:to]
-
end
-
end
-
1
class Flag < ActiveRecord::Base
-
1
extend Enumerize
-
-
1
belongs_to :development
-
1
belongs_to :flagger, class_name: :User, foreign_key: :flagger_id
-
1
belongs_to :resolver, class_name: :User, foreign_key: :resolver_id
-
-
1
validates :flagger, presence: true
-
1
validates :development, presence: true
-
1
validates :reason, presence: :true, length: { minimum: 23, maximum: 450 }
-
11
validate :known_flagger, if: -> { flagger }
-
-
1
enumerize :state, in: [:pending, :open, :resolved], default: :pending,
-
predicates: true
-
-
1
def submitted
-
1
self.state = :open
-
end
-
-
1
def resolved
-
2
assert_resolvable
-
1
self.state = :resolved
-
end
-
-
1
def resolvable?
-
# Valid, not resolved, and has a resolver.
-
2
valid? && !resolved? && resolver.present?
-
end
-
-
1
private
-
-
1
def known_flagger
-
9
if flagger.anonymous?
-
1
errors.add :flagger, 'must not be an anonymous user'
-
end
-
end
-
-
1
def assert_resolvable
-
2
unless resolvable?
-
1
raise StandardError, "Flag #{id} is not resolvable"
-
end
-
end
-
-
end
-
1
class Membership < ActiveRecord::Base
-
1
include Authority::Abilities
-
1
extend Enumerize
-
-
1
belongs_to :user
-
1
belongs_to :organization
-
1
alias_attribute :member, :user
-
-
1
validates :user, presence: true
-
1
validates :organization, presence: true, uniqueness: {
-
scope: [:user_id],
-
26
conditions: -> { where.not(state: :inactive) },
-
message: 'You have already requested to join that organization.'
-
}
-
-
1
enumerize :state, in: [:pending, :invited, :active, :inactive, :declined],
-
default: :pending, predicates: true
-
-
1
enumerize :role, in: [:normal, :admin], default: :normal, predicates: true
-
-
1
def self.active
-
6
where state: 'active'
-
end
-
-
1
def self.pending
-
where state: 'pending'
-
end
-
-
1
def self.inactive
-
where.not state: 'inactive'
-
end
-
-
1
def self.admin
-
where state: :active, role: :admin
-
end
-
-
1
def invited
-
1
self.state = :invited
-
1
self
-
end
-
-
1
def declined
-
1
self.state = :declined
-
1
self
-
end
-
-
1
def activated
-
1
self.state = :active
-
1
self
-
end
-
-
1
def deactivated
-
1
self.state = :inactive
-
1
self
-
end
-
end
-
1
class Municipality < Place
-
1
has_many :neighborhoods, foreign_key: :place_id, class_name: 'Place'
-
-
1
def to_s
-
26
name
-
end
-
end
-
1
class Neighborhood < Place
-
1
belongs_to :municipality, foreign_key: :place_id, class_name: 'Place'
-
-
1
default_scope { includes :municipality }
-
end
-
1
class Organization < ActiveRecord::Base
-
-
1
before_save :hash_email
-
1
after_create :create_admin_membership
-
-
1
has_many :memberships, dependent: :destroy
-
1
has_many :members, through: :memberships, source: :user
-
# has_many :administrators, class_name: :User, dependent: :nullify
-
1
has_many :development_team_memberships, dependent: :destroy
-
-
# has_many :crosswalks, dependent: :nullify
-
-
# This should be scoped for unique, but our Postgres version (9.3)
-
# cannot SELECT DISTINCT on tables with JSON data types.
-
1
has_many :developments, through: :development_team_memberships
-
1
belongs_to :creator, class_name: :User
-
-
# Must have a place (Municipality) if it is a municipal organization
-
1
belongs_to :place, -> { where type: 'Municipality' }
-
1
validates :place, presence: true, if: 'municipal?'
-
-
1
validates :name, presence: true
-
# validates :website, presence: true
-
1
validates :short_name, presence: true
-
-
1
validates :creator, presence: true
-
1
validate :valid_email, if: 'email.present?'
-
1
validate :valid_url_template, if: 'url_template.present?'
-
-
# TODO: validates :existence_of_website
-
-
1
alias_attribute :admin, :creator
-
-
1
def self.search(text)
-
where('name ILIKE ?', "%#{text}%");
-
end
-
-
1
def self.municipal
-
9
where municipal: true
-
end
-
-
1
def self.municipal_in(place)
-
5
municipal.where(place_id: place.municipality.id)
-
end
-
-
# Look up admin organizations, as specified by comma-separated ENV var.
-
1
def self.admin
-
5
where id: ENV['ADMIN_ORG_IDS'].to_s.split(',')
-
end
-
-
1
def admins
-
4
members.joins(:memberships).where(memberships: { role: :admin })
-
end
-
-
1
def active_members
-
6
memberships.active.map(&:user).uniq
-
end
-
-
1
def url_parser
-
2
URITemplate.new(url_template)
-
end
-
-
1
def has_url_template?
-
4
url_template.present?
-
end
-
-
1
def developments
-
DevelopmentTeamMembership.where(organization_id: id).
-
includes(:development).map(&:development).uniq
-
end
-
-
1
def gravatar_url
-
8
@gravatar_url ||= "https://secure.gravatar.com/avatar/#{hashed_email}?d=identicon"
-
end
-
-
1
alias_method :logo, :gravatar_url
-
-
1
def to_s
-
4
name
-
end
-
-
1
private
-
-
1
def valid_email
-
4
addr = Mail::Address.new(email)
-
4
throw StandardError if [addr.local, addr.domain].include?(nil)
-
rescue
-
1
errors.add(:email, 'must be a valid email address')
-
end
-
-
1
def valid_url_template
-
1
template = URITemplate.new(url_template.to_s)
-
1
url_variables = template.tokens.map(&:variables).flatten
-
1
if url_variables.exclude? 'id'
-
1
errors.add(:url_template, "must include '{id}' somewhere")
-
end
-
end
-
-
1
def hash_email
-
4
attribute_to_hash = [gravatar_email, email, name].detect(&:present?).to_s.downcase
-
4
self.hashed_email = Digest::MD5.hexdigest(attribute_to_hash)
-
end
-
-
1
def create_admin_membership
-
1
self.memberships.create!(user: creator, state: :active, role: :admin)
-
end
-
-
end
-
1
class Place < ActiveRecord::Base
-
1
has_many :developments, dependent: :restrict_with_error
-
1
validates :name, presence: true, length: { maximum: 65 }
-
-
1
default_scope do
-
472
order("
-
CASE
-
WHEN type = 'Neighborhood' THEN '1'
-
WHEN type = 'Municipality' THEN '2'
-
ELSE '3'
-
END
-
")
-
end
-
-
1
def self.like(text)
-
reverse_scope.where('name ILIKE ?', "#{text}%")
-
end
-
-
1
def self.reverse_scope
-
unscope(:order).
-
order("
-
CASE
-
WHEN type = 'Municipality' THEN '1'
-
WHEN type = 'Neighborhood' THEN '2'
-
ELSE '3'
-
END
-
")
-
end
-
-
1
def developments
-
2
Development.within(self.geom)
-
end
-
-
1
def municipality
-
74
case type
-
74
when 'Municipality' then self
-
when 'Neighborhood' then place.municipality
-
else raise NotImplementedError, "type not defined"
-
end
-
end
-
-
1
def neighborhood
-
2
case type
-
1
when 'Neighborhood' then self
-
when 'Municipality' then nil
-
end
-
end
-
-
1
def updated_since?(timestamp = Time.now)
-
1
return false if developments.empty?
-
developments.order(updated_at: :desc).first.updated_since?(timestamp)
-
end
-
-
1
def self.contains(lat: , lon: )
-
6
geo_point = factory.point(lon, lat)
-
6
where('ST_Intersects(geom, :point)', point: geo_point.to_s)
-
end
-
-
1
def to_geojson
-
RGeo::GeoJSON.encode geom
-
end
-
-
1
def self.factory
-
6
RGeo::Geographic.spherical_factory(srid: 4326)
-
end
-
-
1
include PgSearch
-
1
multisearchable against: [
-
:name,
-
:municipality_name,
-
:neighborhood_name
-
]
-
-
1
def municipality_name
-
municipality.try :name
-
end
-
-
1
def neighborhood_name
-
neighborhood.try :name
-
end
-
-
end
-
1
class PlaceProfile < ActiveRecord::Base
-
-
1
before_save :update_polygon
-
1
before_save :set_response_expiration
-
-
1
RESPONSE_EXPIRES = 30.days
-
-
1
validates :latitude, presence: true,
-
numericality: { less_than_or_equal_to: 90, greater_than_or_equal_to: -90 }
-
1
validates :longitude, presence: true,
-
numericality: { less_than_or_equal_to: 180, greater_than_or_equal_to: -180 }
-
-
1
validates :radius, presence: true
-
-
1
alias_attribute :x, :longitude
-
1
alias_attribute :y, :latitude
-
-
1
def to_point
-
1
[x, y]
-
end
-
-
1
def expired?
-
3
expires_at < Time.now
-
end
-
-
1
private
-
-
1
def update_polygon
-
2
hex = Geometry::RegularPolygon.new(
-
edge_count: 6,
-
radius: radius,
-
center: Geometry::Point[x, y]
-
)
-
14
points = hex.points.map { |pt| [pt.x.to_f, pt.y.to_f] }
-
2
self.polygon = { type: 'Polygon', coordinates: [points << points.first] }
-
end
-
-
1
def set_response_expiration
-
2
self.expires_at = RESPONSE_EXPIRES.from_now if response_changed?
-
end
-
-
end
-
1
class Program < ActiveRecord::Base
-
1
extend Enumerize
-
1
self.inheritance_column = nil
-
-
1
validates :name, presence: true
-
1
validates :description, presence: true
-
1
validates :type, presence: true
-
-
1
enumerize :type, in: { regulatory: 1, incentive: 2 }, predicates: true
-
-
8
default_scope { order(:type).order(:sort_order) }
-
-
1
def self.incentive
-
1
where type: :incentive
-
end
-
-
1
def self.regulatory
-
1
where type: :regulatory
-
end
-
end
-
1
class Search < ActiveRecord::Base
-
-
1
before_save :ensure_title
-
1
before_save :clean_query
-
-
1
belongs_to :user
-
1
has_many :subscriptions, as: :subscribable
-
1
has_many :subscribers, through: :subscriptions, source: :user
-
-
1
validates :user, presence: true
-
-
1
def results
-
23
Development.periscope Array(query)
-
end
-
-
1
def self.saved
-
7
where saved: true
-
end
-
-
1
def query
-
107
read_attribute(:query).reject { |_k, v| v.nil? }
-
end
-
-
1
alias_method :developments, :results
-
1
alias_attribute :name, :title
-
-
1
def unsaved?
-
18
!saved?
-
end
-
-
1
def updated_since?(timestamp = Time.now)
-
4
return false if developments.empty?
-
2
developments.order(updated_at: :desc).first.updated_since?(timestamp)
-
end
-
-
1
private
-
-
1
def ensure_title
-
13
return if title || unsaved?
-
7
self.title = "Saved Search #{next_search_count(user)}"
-
end
-
-
# TODO Filter out at the resource level.
-
1
def clean_query
-
13
cleaned = query.dup
-
52
rejectable_keys.each { |key| cleaned.delete(key) }
-
13
self.query = cleaned
-
end
-
-
1
def next_search_count(user)
-
7
user.searches.saved.count + 1
-
end
-
-
1
def rejectable_keys
-
13
%w( page number size )
-
end
-
end
-
1
require 'compass'
-
-
1
class StreetView
-
-
1
attr_reader :url
-
-
1
def initialize(source, width: nil, height: nil, size: 600)
-
16
@source = source
-
16
@width = width || height || size
-
16
@height = height || width || size
-
16
@url = build_url
-
end
-
-
1
def image(cached: true)
-
17
if cached
-
13
@source.street_view_image ||= fresh_image
-
else
-
4
fresh_image
-
end
-
end
-
-
1
def data
-
6
"data:image/jpg;base64,#{Base64.encode64(image)}"
-
end
-
-
# Perform a checksum on the image
-
1
def hash
-
6
Digest::MD5.hexdigest image
-
end
-
-
1
def null?
-
6
self.class.null.include? hash
-
end
-
-
# This image means we're over the rate limit.
-
1
def self.null
-
[
-
6
"18bd8a05483bcc612f0891f94364d410", # Rate-limited
-
"f4af83d510a83d5c480ecebe1cedaf6d", # No imagery here
-
"4346be5ac59a41baeeb8eaffd43e4a59" # API server rejected your request
-
]
-
end
-
-
1
def compass_direction
-
4
Compass.direction_from_degrees(heading)
-
end
-
-
1
private
-
-
1
def fresh_image
-
# TODO: Handle timeouts or errors
-
4
Net::HTTP.get_response(URI(@url)).body
-
rescue
-
""
-
end
-
-
1
def build_url
-
16
u = "http://maps.googleapis.com/maps/api/streetview?"
-
16
u << "size=#{@width}x#{@height}"
-
16
u << "&location=#{latitude},#{longitude}"
-
16
u << "&fov=#{field_of_view}"
-
16
u << "&heading=#{heading}"
-
16
u << "&pitch=#{pitch}"
-
16
u << "&key=#{ENV['GOOGLE_API_KEY']}"
-
end
-
-
1
def latitude
-
# I'm not proud of this.
-
16
@source.street_view_latitude || @source.latitude || defaults.latitude
-
rescue
-
defaults.latitude
-
end
-
-
1
def longitude
-
16
@source.street_view_longitude || @source.longitude || defaults.longitude
-
rescue
-
defaults.longitude
-
end
-
-
1
def heading
-
20
@source.street_view_heading || defaults.heading
-
end
-
-
1
def pitch
-
16
@source.street_view_pitch || defaults.pitch
-
end
-
-
1
def field_of_view
-
16
defaults.fov
-
end
-
-
1
def defaults
-
24
OpenStruct.new(
-
latitude: 42.3547661,
-
longitude: -71.0615689,
-
size: 600,
-
pitch: 28,
-
heading: 35,
-
fov: 100
-
)
-
end
-
-
end
-
1
class Subscription < ActiveRecord::Base
-
1
belongs_to :user
-
1
belongs_to :subscribable, polymorphic: true
-
-
1
validates :user, presence: true,
-
uniqueness: { scope: [:subscribable_id, :subscribable_type] }
-
1
validates :subscribable, presence: true
-
1
validate :valid_subscribable
-
-
1
def needs_update?
-
2
return false unless subscribable
-
2
subscribable.updated_since? user.last_checked_subscriptions
-
end
-
-
1
private
-
-
1
def valid_subscribable
-
13
sub = subscribable
-
13
unless sub.is_a?(Development) || sub.respond_to?(:developments)
-
2
errors.add :subscribable,
-
'must be a Development or respond to #developments'
-
end
-
end
-
end
-
1
class User < ActiveRecord::Base
-
# Include default devise modules. Others available are:
-
# :confirmable, :lockable, :timeoutable and :omniauthable
-
1
devise :database_authenticatable, :registerable,
-
:recoverable, :rememberable, :trackable, :validatable
-
-
1
include Authority::UserAbilities
-
1
extend Enumerize
-
-
1
before_save :hash_email
-
1
before_save :ensure_reasonable_last_checked
-
1
before_create :set_initial_last_checked
-
1
after_create :assign_api_key
-
-
1
attr_readonly :api_key
-
-
1
has_one :api_key, dependent: :destroy
-
16
has_many :searches, -> { where(saved: true) }
-
1
has_many :memberships, dependent: :destroy
-
1
has_many :organizations, through: :memberships
-
-
1
has_many :subscriptions
-
-
1
validates :first_name, presence: true, if: :new_record?
-
1
validates :last_name, presence: true, if: :new_record?
-
-
1
enumerize :mail_frequency, in: [:never, :daily, :weekly],
-
predicates: true, default: :weekly
-
-
1
def contributions
-
Edit.applied.where(editor_id: id)
-
end
-
-
1
def member_of?(organization, state: :active)
-
memberships.where(state: state, organization_id: organization.id).any?
-
end
-
-
1
def moderator_for?(development)
-
[
-
member_of_development_team?(development),
-
member_of_municipal_org?(development),
-
member_of_admin_org?
-
5
].any?
-
end
-
-
1
def admin_of?(organization)
-
4
organization.admins.include? self
-
end
-
-
# Is the user a member of an organization which is on the development team
-
# for this development?
-
1
def member_of_development_team?(development)
-
5
(organizations & development.team_members).any?
-
end
-
-
# Is the user a member of a municipal organization whose municipality
-
# contains this development?
-
1
def member_of_municipal_org?(development)
-
5
organizations.municipal_in(development.municipality).any?
-
end
-
-
1
def member_of_admin_org?
-
# Do the organizations this user belongs to intersect with the organizations
-
# that have admin privileges?
-
5
(organizations & Organization.admin).any?
-
end
-
-
1
def subscribe(subscribable)
-
2
subscriptions.create(subscribable: subscribable)
-
end
-
-
1
def unsubscribe(subscribable)
-
1
subscriptions.where(subscribable: subscribable).first.destroy
-
end
-
-
1
def subscribed?(subscribable)
-
2
subscriptions.where(subscribable: subscribable).present?
-
end
-
-
1
alias_method :subscribe_to, :subscribe
-
1
alias_method :unsubscribe_from, :unsubscribe
-
1
alias_method :subscribed_to?, :subscribed?
-
-
1
def subscriptions_needing_update
-
1
Subscription.where(id: subscriptions.select(&:needs_update?).map(&:id))
-
end
-
-
1
def known?
-
!anonymous?
-
end
-
-
1
def anonymous?
-
9
self == User.null
-
end
-
-
1
def self.null
-
20
@null ||= new(email: '<Null User>')
-
end
-
-
1
private
-
-
1
def hash_email
-
18
self.hashed_email = Digest::MD5.hexdigest(email.downcase)
-
end
-
-
1
def ensure_reasonable_last_checked
-
18
if mail_frequency_change && mail_frequency_change.last != 'never'
-
2
self.last_checked_subscriptions = 1.week.ago
-
end
-
end
-
-
1
def set_initial_last_checked
-
2
self.last_checked_subscriptions = created_at
-
end
-
-
1
def assign_api_key
-
2
APIKey.create!(user: self)
-
end
-
end
-
1
class Verification < ActiveRecord::Base
-
1
extend Enumerize
-
# TODO: Should be polymorph-ish. Basically, while it should belong
-
# to user (because a person must request it), they can also
-
# request it on behalf of an organization.
-
-
1
belongs_to :user
-
1
belongs_to :verifier, class_name: :User
-
-
1
validates :user, presence: true
-
1
validates :reason, allow_blank: true, length: { minimum: 30, maximum: 1000 }
-
1
validates :reason, presence: true, length: { minimum: 30, maximum: 1000 },
-
if: :valid_verifier?
-
-
1
enumerize :state, in: [:pending, :requested, :verified, :rejected],
-
default: :pending, predicates: true
-
-
1
def verifiable?
-
# TODO: [Code Smell] Multiple calls to valid_verifier?
-
# are already getting confusing.
-
10
valid? && eligible_user? && valid_verifier?
-
end
-
-
1
def requested
-
1
self.state = :requested
-
end
-
-
1
def verified
-
5
assert_verifiable
-
1
self.state = :verified
-
end
-
-
1
def rejected
-
1
assert_verifiable
-
1
self.state = :rejected
-
end
-
-
1
def closed?
-
3
verified? || rejected?
-
end
-
-
1
def open?
-
1
!closed?
-
end
-
-
1
private
-
-
1
def assert_verifiable
-
6
if verifiable?
-
2
true
-
else
-
4
raise StandardError, 'Must be verifiable to verify.'
-
end
-
end
-
-
# TODO: [Code Smell] Should these be validations?
-
1
def eligible_user?
-
4
user.present? # TODO: user.verifiable?
-
end
-
-
1
def valid_verifier?
-
28
verifier.present? # TODO: verifier.can_verify?(user)
-
end
-
-
end
-
1
class ChangePresenter < Burgundy::Item
-
-
# TODO: Rename method to #message, and employ in views.
-
1
def text
-
9
text_for(item)
-
end
-
-
1
private
-
-
1
def text_for(change)
-
9
types = [change.from.class, change.to.class]
-
# TODO: Instead of deleting NilClass, prevent it from ever appearing.
-
9
types.delete NilClass
-
9
template_for(types.first.name.to_sym)
-
end
-
-
# TODO: For enumerized values such as 'status', titleize the status value.
-
# For example, when someone changes item.status to :in_construction, the
-
# message should read, 'changed status from "Planning" to "In Construction"'.
-
# This could happen in a conditional here, or it might be possible to do
-
# something in the Development enumerize line.
-
-
# TODO: Let the message values be double-quoted, that is:
-
# 'changed name from "old" to "new"'.
-
-
1
def template_for(type)
-
9
case type
-
when :Fixnum
-
2
"changed #{name} from #{from.to_i} to #{to.to_i}"
-
when :Float
-
1
"changed #{name} from #{from.to_f} to #{to.to_f}"
-
when :TrueClass, :FalseClass
-
4
"set #{name} to #{to.to_b}"
-
when :String
-
1
"changed #{name} from '#{from}' to '#{to}'"
-
else
-
1
raise ArgumentError, "unexpected type: #{type}"
-
end
-
end
-
-
# TODO: Does this need to be private?
-
1
def name
-
8
Development.human_attribute_name item.name
-
end
-
end
-
1
class DevelopmentPresenter < Burgundy::Item
-
-
1
delegate :status_with_year, :status_icon, to: :status_info
-
1
NUM_CHANGES = 3 # to display
-
-
# Relationships
-
-
# Everyone who has provided data for this development
-
1
def preview_contributors
-
4
UserPresenter.wrap item.contributors.first(5).shuffle
-
end
-
-
1
def contributors
-
4
UserPresenter.wrap item.contributors.sort_by(&:last_name)
-
end
-
-
# Last several changes, for a feed
-
1
def recent_history
-
8
EditPresenter.wrap history.includes(:fields).limit(NUM_CHANGES)
-
end
-
-
1
def pending_edits
-
3
EditPresenter.wrap item.edits.pending
-
end
-
-
1
def pending_flags
-
FlagPresenter.wrap item.flags.where(state: :open)
-
end
-
-
1
def changes_since(timestamp = Time.now)
-
EditPresenter.wrap item.history.since(timestamp).first(NUM_CHANGES)
-
end
-
-
1
def undisplayed_changes_since(timestamp = Time.now)
-
item.history.since(timestamp).count - NUM_CHANGES
-
end
-
-
1
alias_method :pending, :pending_edits
-
-
1
def pending_edits_count
-
item.edits.pending.count
-
end
-
-
# Nearby or similar developments
-
1
def related
-
5
DevelopmentPresenter.wrap(
-
Development.close_to(*item.location).where.not(id: item.id).limit(3)
-
)
-
end
-
-
# Members of the development team
-
1
def team
-
team_memberships.
-
includes(:organization).
-
order(:role).
-
8
group_by(&:role)
-
end
-
-
1
def display_address(options = {})
-
4
options[:short] ? short_address : long_address
-
end
-
-
1
def employment
-
6
return nil if rptdemp.nil? && estemp.nil?
-
4
(rptdemp || estemp).to_i
-
end
-
-
1
def employment_type
-
rptdemp ? :reported : :estimated
-
end
-
-
1
def status_info
-
@status_info ||= StatusInfo.new(item)
-
end
-
-
# Neighborhood context (KnowPlace study)
-
1
def neighborhood
-
1
raise NotImplementedError,
-
'We have not yet implemented neighborhood context.'
-
end
-
-
1
def disable_moderation?
-
2
pending_edits.empty?
-
end
-
-
1
def physical_attributes
-
12
category_attributes :physical
-
end
-
-
1
def housing_attributes
-
11
category_attributes :housing
-
end
-
-
1
def commercial_attributes
-
8
category_attributes :commercial
-
end
-
-
1
def place_org
-
4
Organization.municipal.find_by(place_id: item.place_id)
-
end
-
-
1
private
-
-
1
def long_address
-
1
"#{item.address}, #{item.city} #{item.state} #{item.zip_code}"
-
end
-
-
1
def short_address
-
3
"#{item.address}, #{item.city}"
-
end
-
-
1
def category_attributes(category)
-
31
item.attributes.select do |k, v|
-
1891
categorized_attributes.fetch(category, {}).include?(k.to_sym) && !v.nil?
-
end
-
end
-
-
1
def categorized_attributes
-
{
-
physical: [:tothu, :commsf, :prjarea, :stories, :height],
-
housing: [:singfamhu, :twnhsmmult, :lgmultifam],
-
commercial: [
-
:fa_ret, :fa_ofcmd, :fa_indmf, :fa_whs, :fa_rnd, :fa_edinst,
-
:fa_other, :fa_hotel
-
]
-
1891
}
-
end
-
-
end
-
1
class DigestPresenter < Burgundy::Item
-
-
1
def subscriptions
-
3
@subscriptions ||= subscriptions_needing_update
-
end
-
-
1
def places
-
2
@places ||= subscribed('Place')
-
end
-
-
1
def searches
-
3
@searches ||= subscribed('Search')
-
end
-
-
1
def developments
-
2
@developments ||= subscribed('Development')
-
end
-
-
# def unique_developments
-
# developments - related_developments
-
# end
-
-
# def related_developments
-
# searches.flat_map(&:developments) + places.flat_map(&:developments)
-
# end
-
-
1
def user
-
5
item
-
end
-
-
1
def frequency
-
1
user.mail_frequency
-
end
-
-
1
def user_last_checked
-
2
user.last_checked_subscriptions
-
end
-
-
1
private
-
-
1
def subscribed(class_name)
-
3
if class_name == 'Development'
-
1
wrapped_developments(class_name)
-
else
-
2
raw_subscriptions(class_name)
-
end
-
end
-
-
1
def raw_subscriptions(class_name)
-
3
subscriptions.where(subscribable_type: class_name).map(&:subscribable)
-
end
-
-
1
def wrapped_developments(class_name)
-
1
DevelopmentPresenter.wrap(raw_subscriptions(class_name))
-
end
-
-
end
-
1
class EditPresenter < Burgundy::Item
-
1
include ActionView::Helpers::DateHelper
-
-
1
def editor
-
1
UserPresenter.new item.editor
-
end
-
-
1
def changes
-
ChangePresenter.wrap item.fields
-
end
-
-
# When we split the pending edit partials from the
-
# applied edit partials, it may be advisable to also refactor
-
# so this can accept a state. Therefore, we write
-
# time_ago(:applied) to get applied_at, or time_ago(:created), etc.
-
1
def time_ago
-
4
"#{time_ago_in_words field_to_time} ago"
-
end
-
1
alias_method :time, :time_ago
-
-
1
def multiple_changes?
-
changes.count > 1
-
end
-
-
1
def single_change?
-
changes.count == 1
-
end
-
-
1
def no_change?
-
changes.count == 0
-
end
-
-
1
def more ; 0 ; end
-
1
def more? ; false ; end
-
1
def more_than(*); false; end
-
-
1
private
-
-
1
def field_to_time
-
4
applied? ? applied_at : created_at
-
end
-
-
end
-
1
class EditSummaryPresenter < EditPresenter
-
1
include ActionView::Helpers::DateHelper
-
-
1
FIELD_COUNT = 3
-
-
1
def changes
-
ChangePresenter.wrap item.fields.first(FIELD_COUNT)
-
end
-
-
1
def more_than(count = FIELD_COUNT)
-
item.fields.count - count
-
end
-
-
1
alias_method :more, :more_than
-
-
1
def more?
-
more > 0
-
end
-
-
end
-
1
class ReportPresenter < Burgundy::Item
-
-
1
EXPORT_RESULT_LIMIT = 100
-
-
1
def id
-
2
item.id || nil
-
end
-
-
1
def developments
-
25
item.results.limit(EXPORT_RESULT_LIMIT)
-
end
-
-
1
def fields
-
[numeric_fields, boolean_fields].flatten
-
end
-
-
1
def numeric_fields
-
22
%i( tothu singfamhu twnhsmmult lgmultifam commsf
-
fa_ret fa_ofcmd fa_indmf fa_whs
-
fa_rnd fa_edinst fa_other fa_hotel hotelrms )
-
end
-
-
1
def boolean_fields
-
22
%i( rdv asofright phased cancelled
-
ovr55 clusteros stalled )
-
end
-
-
1
def projected
-
3
statuses.projected
-
end
-
-
1
def planning
-
1
statuses.planning
-
end
-
-
1
def in_construction
-
1
statuses.in_construction
-
end
-
-
1
def completed
-
1
statuses.completed
-
end
-
-
1
def status_keys
-
50
Development.status.values
-
end
-
-
1
def statuses
-
194
@statuses ||= OpenStruct.new(prepare_statuses)
-
end
-
-
1
def criteria
-
2
query
-
end
-
-
1
def to_csv
-
2
DevelopmentsSerializer.new(developments).to_csv
-
end
-
-
1
private
-
-
1
def prepare_statuses
-
5
statuses = {} # TODO: Replace with #inject
-
25
Development.status.values.each {|v| statuses[v.to_sym] = prepare_values(v) }
-
5
statuses
-
end
-
-
1
def prepare_values(status)
-
20
devs = developments.where(status: status)
-
20
attrs = [[:name, status.to_s.titleize], [:count, devs.size]]
-
20
numeric_fields.each do |attribute|
-
280
attrs << [attribute, devs.pluck(attribute).compact.sum]
-
end
-
20
boolean_fields.each do |attribute|
-
140
attrs << [attribute, devs.where(attribute => true).count]
-
end
-
20
Hash[attrs]
-
end
-
-
end
-
1
require "#{Rails.root}/lib/refinements/roundable"
-
1
class StatusInfo
-
1
using Roundable
-
-
1
def initialize(item)
-
3
@item = item
-
end
-
-
1
attr_reader :item
-
-
1
def status_with_year
-
4
if @item.completed?
-
1
"#{@item.status.titleize} (#{@item.year_compl})"
-
else
-
3
"#{@item.status.titleize} (#{prefix}#{year})"
-
end
-
end
-
-
1
def year
-
10
if year_gte_10_yrs_from_now
-
7
"#{bottom_of_range}-#{top_of_range}"
-
else
-
3
@item.year_compl.to_s
-
end
-
end
-
-
1
def status_icon
-
1
status_objects.fetch(@item.status).fetch(:icon)
-
end
-
-
1
def prefix
-
3
status_objects.fetch(@item.status).fetch(:year_prefix) { '' }
-
end
-
-
1
private
-
-
1
def status_objects
-
{
-
completed: { icon: :checkmark},
-
in_construction: { icon: :configure, year_prefix: 'est. ' },
-
projected: { icon: :find, year_prefix: 'for ' },
-
planning: { icon: :calendar, year_prefix: 'est. ' }
-
4
}.with_indifferent_access
-
end
-
-
1
def year_gte_10_yrs_from_now
-
10
@item.year_compl.to_i >= 10.years.from_now.year
-
end
-
-
1
def bottom_of_range
-
7
@item.year_compl.round_down(10)
-
end
-
-
1
def top_of_range
-
7
@item.year_compl.round_down(10) + 10
-
end
-
-
end
-
1
class UserPresenter < Burgundy::Item
-
1
include Rails.application.routes.url_helpers
-
1
include ActionView::Helpers
-
-
1
def first_name
-
11
item.first_name.titleize
-
end
-
-
1
def last_name
-
11
item.last_name.titleize
-
end
-
-
1
def short_name
-
5
"#{first_name} #{last_name.chars.first}."
-
end
-
-
1
def full_name
-
5
"#{first_name} #{last_name}"
-
end
-
-
1
def joined
-
"#{time_ago_in_words item.created_at} ago"
-
end
-
-
1
def gravatar_url(size: 120)
-
@gravatar_url ||=
-
9
"https://secure.gravatar.com/avatar/#{hashed_email}?s=#{size}&d=identicon"
-
end
-
-
1
def active_memberships
-
item.memberships.where(state: :active).includes(:organization)
-
end
-
-
1
def pending_memberships
-
item.memberships.where(state: :pending).includes(:organization)
-
end
-
-
1
def primary_organization
-
4
item.organizations.first
-
end
-
-
1
def second_label_data
-
if primary_organization
-
{ label2: 'Member of', data2: organization_url(primary_organization) }
-
else
-
{ label2: 'Joined', data2: joined }
-
end
-
end
-
-
end
-
1
class CloseToQuery
-
-
1
def initialize(relation)
-
1
@relation = relation
-
end
-
-
1
def scope
-
1
proc do |latitude, longitude, distance_in_meters = 2000|
-
6
@relation.where(%{
-
ST_DWithin(
-
ST_GeographyFromText(
-
'SRID=4326;POINT(' || developments.longitude || ' ' || developments.latitude || ')'
-
),
-
ST_GeographyFromText('SRID=4326;POINT(%f %f)'),
-
%d
-
)
-
} % [longitude, latitude, distance_in_meters])
-
end
-
end
-
-
end
-
1
class ContributorQuery
-
1
def initialize(relation)
-
13
@relation = relation
-
end
-
-
1
def find
-
13
@relation.edits.includes(:editor).where(applied: true)
-
end
-
end
-
1
require 'range_parser'
-
-
1
module API
-
1
module V1
-
1
class DevelopmentResource < JSONAPI::Resource
-
-
1
attributes :name, :status, :tagline, :description, :project_url,
-
:year_compl,
-
-
:mixed_use, :rdv, :asofright, :ovr55, :clusteros, :hidden,
-
-
:redevelopment, :as_of_right, :age_restricted,
-
:cluster_or_open_space_development, :phased, :stalled,
-
:cancelled, :private,
-
-
:address, :city, :state, :zip_code,
-
:full_address, :location, :latitude, :longitude, :place_id,
-
:geometry,
-
-
:height, :stories, :prjarea, :total_cost,
-
-
:singfamhu, :twnhsmmult, :lgmultifam, :tothu, :gqpop,
-
-
:commsf, :rptdemp, :emploss, :estemp, :fa_ret, :fa_ofcmd,
-
:fa_indmf, :fa_whs, :fa_rnd, :fa_edinst, :fa_other, :fa_hotel,
-
:affordable, :hotelrms, :onsitepark, :other_rate,
-
-
:street_view_latitude,
-
:street_view_longitude,
-
:street_view_heading,
-
:street_view_pitch,
-
-
:image_url
-
-
1
has_one :place
-
-
1
before_save do
-
1
@model.creator_id = context[:current_user].id if @model.new_record?
-
end
-
-
1
has_many :team_memberships
-
-
# Filters
-
1
range_filters :created_at, :updated_at, :height, :stories,
-
:year_compl, :affordable, :prjarea, :singfamhu, :twnhsmmult,
-
:lgmultifam, :tothu, :gqpop, :rptdemp, :emploss, :estemp, :commsf,
-
:hotelrms, :onsitepark, :total_cost, :fa_ret, :fa_ofcmd,
-
:fa_indmf, :fa_whs, :fa_rnd, :fa_edinst, :fa_other, :fa_hotel
-
-
1
boolean_filters :rdv, :asofright, :ovr55, :clusteros, :phased,
-
:stalled, :cancelled, :hidden, :redevelopment, :age_restricted,
-
:private, :as_of_right, :cluster_os
-
-
1
filter :status
-
-
1
filter :bbox, apply: -> (records, value, _options) {
-
west, south, east, north = value.map(&:to_f)
-
records.within_box(top: north, right: east, bottom: south, left: west)
-
}
-
-
1
def self.creatable_fields(context)
-
1
super - [:mixed_use, :walkscore, :neighborhood, :city, :full_address]
-
end
-
-
1
def self.updatable_fields(context)
-
2
super - [:mixed_use, :walkscore, :neighborhood, :city, :full_address]
-
end
-
-
1
def geometry
-
20
@model.to_geojson
-
end
-
-
1
def city
-
20
@model.municipality.try :name
-
end
-
-
1
include Rails.application.routes.url_helpers
-
-
1
def image_url
-
20
image_development_url @model
-
end
-
-
# TODO: This is duplicated from the presenter.
-
# How do we wrap the resource in a presenter?
-
1
def full_address
-
20
"#{@model.address}, #{@model.city} #{@model.state} #{@model.zip_code}"
-
end
-
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class DevelopmentTeamMembershipResource < JSONAPI::Resource
-
1
attribute :role
-
-
1
has_one :development
-
1
has_one :organization
-
-
1
paginator :none
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class OrganizationResource < JSONAPI::Resource
-
-
1
attributes :name, :website, :location, :email, :short_name, :abbv,
-
:logo, :member_count
-
-
1
def member_count
-
4
@model.active_members.count
-
end
-
-
1
filter :search, apply: -> (records, values, options) {
-
records.search values.first
-
}
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class PlaceResource < JSONAPI::Resource
-
-
1
attributes :name, :place_type, :geometry
-
-
1
def place_type
-
@model.type
-
end
-
-
1
def geometry
-
@model.to_geojson
-
end
-
-
end
-
end
-
end
-
1
module API
-
1
module V1
-
1
class SearchResource < JSONAPI::Resource
-
1
include Rails.application.routes.url_helpers
-
-
1
attributes :title, :query, :saved, :url
-
-
1
def url
-
6
developments_url(query: query)
-
end
-
-
1
def self.records(options = {})
-
8
context = options[:context]
-
8
context[:current_user].searches
-
end
-
-
1
before_save do
-
3
@model.user_id = context[:current_user].id if @model.new_record?
-
end
-
-
end
-
end
-
end
-
1
require 'mapzen_search'
-
-
1
module API
-
1
module V1
-
1
class SearchableResource < JSONAPI::Resource
-
-
1
abstract
-
1
key_type :string
-
-
1
def self.find_by_key(text, options = {})
-
search_results = PgSearch.multisearch(text).
-
where(searchable_type: 'Development').limit(5).
-
map(&:searchable).
-
map { |record| wrap_with_resource(record) }
-
loc = MapzenSearch.new(text).result || null
-
search_results.unshift place_resource(text) if no_place?(search_results)
-
search_results.unshift location_resource(loc) if confident_in_location?(loc)
-
search_results
-
end
-
-
1
private
-
-
1
def self.location_resource(location)
-
LocationResource.new(location, context: {})
-
end
-
-
1
def self.confident_in_location?(location)
-
location.properties['confidence'] > 0.75
-
end
-
-
1
def self.place_resource(text)
-
PlaceResource.new(
-
Place.like(text).first, context: {}
-
)
-
end
-
-
1
def self.no_place?(search_results)
-
search_results.select { |r| r.is_a?(PlaceResource) }.empty?
-
end
-
-
1
def self.null
-
OpenStruct.new(geometry: {}, properties: { 'confidence' => 0 })
-
end
-
-
1
def self.wrap_with_resource(record)
-
case record.class.name
-
when 'Development'
-
DevelopmentResource.new(record, context: {})
-
when 'Place', 'Municipality', 'Neighborhood'
-
PlaceResource.new(record, context: {})
-
else
-
raise ArgumentError, "invalid record class #{record.class.name}"
-
end
-
end
-
-
end
-
end
-
end
-
-
-
-
-
1
module API
-
1
module V1
-
1
class SubscriptionResource < JSONAPI::Resource
-
-
1
has_one :subscribable, polymorphic: true
-
-
1
def save
-
3
@model.user ||= context[:current_user]
-
3
super
-
end
-
-
end
-
end
-
end
-
1
class DevelopmentSerializer
-
-
1
def initialize(record, options = {})
-
19
@record = record
-
19
@options = options
-
end
-
-
1
def to_row
-
[
-
591
attributes.keys.map { |key| ensure_csv_ready(@record.send(key)) },
-
DevelopmentTeamSerializer.new(@record, max_team_size).to_row
-
12
].flatten
-
rescue
-
[]
-
end
-
-
1
def to_header
-
[
-
attributes.keys,
-
DevelopmentTeamSerializer.new(@record, max_team_size).to_header
-
12
].flatten
-
rescue
-
1
[]
-
end
-
-
1
private
-
-
1
def attributes
-
24
return only_attributes if only?
-
22
return except_attributes if except?
-
19
base_attributes
-
end
-
-
1
def base_attributes
-
24
base = @record.attributes
-
23
base['city'] = @record.municipality
-
# TODO list each of these strings as array in default
-
# initialization option :reject, then loop through.
-
1449
base.reject! { |k, _v| k.include? 'street_view_' }
-
1334
base.reject! { |k, _v| k.include? 'walkscore' }
-
1311
base.reject! { |k, _v| k.include? 'parcel' }
-
1288
base.reject! { |k, _v| k.include? 'point' }
-
23
base
-
end
-
-
1
def only?
-
24
@options.fetch(:only, false)
-
end
-
-
1
def except?
-
22
@options.fetch(:except, false)
-
end
-
-
1
def only_attributes
-
110
base_attributes.select { |k, _v| only_selection.include? k.to_sym }
-
end
-
-
1
def except_attributes
-
165
base_attributes.reject { |k, _v| except_selection.include? k.to_sym }
-
end
-
-
1
def only_selection
-
108
selection :only
-
end
-
-
1
def except_selection
-
162
selection :except
-
end
-
-
1
def selection(option)
-
270
option = option.to_sym
-
270
Array(@options[option]).flatten.map(&:to_sym)
-
end
-
-
1
def max_team_size
-
28
@options.fetch(:max_team_size) { 0 }
-
end
-
-
1
def ensure_csv_ready(attribute)
-
591
class_name = attribute.class.to_s
-
591
if class_name.include? 'Time'
-
22
attribute.to_s
-
569
elsif class_name.include? 'Municipality'
-
9
attribute.to_s
-
560
elsif class_name.include? 'Neighborhood'
-
attribute.municipality.to_s
-
560
elsif class_name.include? 'Decimal'
-
18
attribute.to_f
-
else
-
542
attribute
-
end
-
end
-
-
end
-
1
class DevelopmentTeamSerializer
-
-
# Use inside DevelopmentSerializer
-
1
def initialize(development, max_team_size)
-
27
@development = development
-
27
@max_team_size = max_team_size
-
27
@row = Array.new(@max_team_size * team_attributes.count)
-
end
-
-
# TODO: Refactor and clean up
-
1
def to_row
-
# Get attributes from all of the team members
-
14
values = @development.team_memberships.map { |team_membership|
-
9
[team_membership.organization.attributes.values_at(*member_attributes),
-
# Need to get around Enumerize here -> the attribute is technically
-
# serialized as an integer, so we need to #send instead.
-
# Should we also test saving it? Test didn't catch this.
-
9
membership_attributes.map { |a| team_membership.send(a) }]
-
}.flatten
-
# then apply them to the nil-filled row
-
77
values.each_with_index { |v, i| @row[i] = v }
-
14
@row # and return the row
-
end
-
-
1
def to_header
-
# #times is 0-index, we want 1-index
-
31
@max_team_size.times.map { |id| header_template(id + 1) }.flatten
-
end
-
-
1
private
-
-
1
def header_template(id)
-
144
team_attributes.map { |attrib| "team_member_#{id}_#{attrib}" }
-
end
-
-
1
def member_attributes
-
54
Organization.attribute_names - removable_attributes
-
end
-
-
1
def removable_attributes
-
54
%w( id gravatar_email hashed_email created_at updated_at municipal place_id
-
creator_id address phone url_template )
-
end
-
-
1
def membership_attributes
-
54
%w( role )
-
end
-
-
1
def team_attributes
-
45
(member_attributes + membership_attributes).compact
-
end
-
-
end
-
1
class DevelopmentsSerializer
-
-
1
attr_reader :developments, :max_team_dev
-
-
1
def initialize(developments)
-
6
raise ArgumentError if Array(developments).empty?
-
5
@developments = developments
-
5
@max_team_dev = development_with_largest_team
-
end
-
-
1
def to_csv
-
3
CSV.generate do |csv|
-
3
csv << to_header
-
3
@developments.each { |d|
-
7
csv << DevelopmentSerializer.new(d, max_team_size: max).to_row
-
}
-
end
-
end
-
-
1
def to_header
-
4
DevelopmentSerializer.new(@max_team_dev, max_team_size: max).to_header
-
end
-
-
1
private
-
-
1
def max
-
# Trigger the count if it's not already cached
-
11
@max_team_dev.team_membership_count ||=
-
@max_team_dev.team_memberships.count
-
end
-
-
1
def development_with_largest_team
-
5
@developments.max_by(&:team_membership_count)
-
end
-
end
-
# Extra special thanks to
-
# http://nandovieira.com/using-postgresql-and-jsonb-with-ruby-on-rails
-
-
1
class HashSerializer
-
1
def self.dump(hash)
-
73
hash.to_json
-
end
-
-
1
def self.load(hash)
-
195
(hash || {}).with_indifferent_access
-
end
-
end
-
1
class EditApplication
-
-
1
attr_reader :edit, :fields, :development
-
-
1
def initialize(edit)
-
15
@edit = edit
-
15
@fields = edit.fields.freeze
-
15
@development = edit.development
-
end
-
-
1
def performable?
-
14
@edit.applyable?
-
end
-
-
1
def perform!
-
8
apply! if performable?
-
end
-
-
1
private
-
-
1
def apply!
-
6
ActiveRecord::Base.transaction do
-
6
if @development.update_attributes(assignable_attributes)
-
6
@edit.applied
-
6
@edit.save
-
end
-
6
true
-
end
-
end
-
-
1
def assignable_attributes
-
12
Hash[@fields.map { |f| [f.name, f.to] }]
-
end
-
-
end
-
1
class EditApproval < EditModeration
-
-
1
def initialize(edit)
-
8
super
-
7
@application = EditApplication.new(@edit)
-
end
-
-
1
def performable?
-
4
@application.performable? # Delegates to EditApplication service.
-
end
-
-
1
def perform!
-
2
return false unless performable?
-
2
ActiveRecord::Base.transaction do
-
2
@edit.approved
-
2
@edit.save
-
2
@application.perform!
-
end
-
2
true
-
end
-
end
-
1
class EditDecline < EditModeration
-
-
1
def performable?
-
1
@edit.moderatable?
-
end
-
-
1
def perform!
-
1
return false unless performable?
-
1
@edit.declined
-
1
@edit.save
-
1
true
-
end
-
-
end
-
1
class EditModeration
-
-
1
attr_reader :edit, :development, :fields
-
-
1
def initialize(edit)
-
10
raise unless edit.valid?
-
9
@edit = edit
-
9
@fields = edit.fields
-
9
@development = edit.development
-
end
-
-
1
def performable?
-
raise NotImplementedError,
-
'Override the #performable? method in your service.'
-
end
-
-
1
def perform!
-
raise NotImplementedError,
-
'Override the #perform! method in your service.'
-
end
-
end
-
# Load the Rails application.
-
1
require File.expand_path('../application', __FILE__)
-
-
# Initialize the Rails application.
-
1
Rails.application.initialize!
-
1
Rails.application.configure do
-
# Settings specified here will take precedence over those in config/application.rb.
-
-
# The test environment is used exclusively to run your application's
-
# test suite. You never need to work with it otherwise. Remember that
-
# your test database is "scratch space" for the test suite and is wiped
-
# and recreated between test runs. Don't rely on the data there!
-
1
config.cache_classes = true
-
-
# Do not eager load code on boot. This avoids loading your whole application
-
# just for the purpose of running a single test. If you are using a tool that
-
# preloads Rails for running tests, you may have to set it to true.
-
1
config.eager_load = false
-
-
# Configure static file server for tests with Cache-Control for performance.
-
1
config.serve_static_files = true
-
1
config.static_cache_control = 'public, max-age=3600'
-
-
# Show full error reports and disable caching.
-
1
config.consider_all_requests_local = true
-
1
config.action_controller.perform_caching = false
-
-
# Raise exceptions instead of rendering exception templates.
-
1
config.action_dispatch.show_exceptions = false
-
-
# Disable request forgery protection in test environment.
-
1
config.action_controller.allow_forgery_protection = false
-
-
# Tell Action Mailer not to deliver emails to the real world.
-
# The :test delivery method accumulates sent emails in the
-
# ActionMailer::Base.deliveries array.
-
1
config.action_mailer.delivery_method = :test
-
-
# Randomize the order test cases are executed.
-
1
config.active_support.test_order = :random
-
-
# Print deprecation notices to the stderr.
-
1
config.active_support.deprecation = :stderr
-
-
# Raises error for missing translations
-
# config.action_view.raise_on_missing_translations = true
-
1
config.after_initialize do
-
1
Bullet.enable = false
-
1
Bullet.bullet_logger = true
-
# Prevent tests from passing without optimized queries
-
# Bullet.raise = true
-
end
-
end
-
-
1
Rails.application.default_url_options = { host: 'test.host' }
-
# Airbrake is an online tool that provides robust exception tracking in your Rails
-
# applications. In doing so, it allows you to easily review errors, tie an error
-
# to an individual piece of code, and trace the cause back to recent
-
# changes. Airbrake enables for easy categorization, searching, and prioritization
-
# of exceptions so that when errors occur, your team can quickly determine the
-
# root cause.
-
#
-
# Configuration details:
-
# https://github.com/airbrake/airbrake-ruby#configuration
-
-
1
if ENV['AIRBRAKE_PROJECT_ID'] && ENV['AIRBRAKE_PROJECT_KEY']
-
1
Airbrake.configure do |c|
-
# You must set both project_id & project_key. To find your project_id and
-
# project_key navigate to your project's General Settings and copy the values
-
# from the right sidebar.
-
# https://github.com/airbrake/airbrake-ruby#project_id--project_key
-
1
c.project_id = ENV['AIRBRAKE_PROJECT_ID']
-
1
c.project_key = ENV['AIRBRAKE_PROJECT_KEY']
-
-
# Configures the root directory of your project. Expects a String or a
-
# Pathname, which represents the path to your project. Providing this option
-
# helps us to filter out repetitive data from backtrace frames and link to
-
# GitHub files from our dashboard.
-
# https://github.com/airbrake/airbrake-ruby#root_directory
-
1
c.root_directory = Rails.root
-
-
# By default, Airbrake Ruby outputs to STDOUT. In Rails apps it makes sense to
-
# use the Rails' logger.
-
# https://github.com/airbrake/airbrake-ruby#logger
-
1
c.logger = Rails.logger
-
-
# Configures the environment the application is running in. Helps the Airbrake
-
# dashboard to distinguish between exceptions occurring in different
-
# environments. By default, it's not set.
-
# NOTE: This option must be set in order to make the 'ignore_environments'
-
# option work.
-
# https://github.com/airbrake/airbrake-ruby#environment
-
1
c.environment = Rails.env
-
-
# Setting this option allows Airbrake to filter exceptions occurring in
-
# unwanted environments such as :test. By default, it is equal to an empty
-
# Array, which means Airbrake Ruby sends exceptions occurring in all
-
# environments.
-
# NOTE: This option *does not* work if you don't set the 'environment' option.
-
# https://github.com/airbrake/airbrake-ruby#ignore_environments
-
1
c.ignore_environments = %w( development test )
-
-
-
# A list of parameters that should be filtered out of what is sent to
-
# Airbrake. By default, all "password" attributes will have their contents
-
# replaced.
-
# https://github.com/airbrake/airbrake-ruby#blacklist_keys
-
1
c.blacklist_keys = [/password/i, /key/i]
-
end
-
end
-
# If Airbrake doesn't send any expected exceptions, we suggest to uncomment the
-
# line below. It might simplify debugging of background Airbrake workers, which
-
# can silently die.
-
# Thread.abort_on_exception = ['test', 'development'].include?(Rails.env)
-
1
require 'periscope'
-
1
require "#{Rails.root}/lib/extensions/periscope"
-
-
1
require 'jsonapi-resources'
-
1
require "#{Rails.root}/lib/extensions/jsonapi"
-
# Be sure to restart your server when you modify this file.
-
-
# Version of your assets, change this if you want to expire all your assets.
-
1
Rails.application.config.assets.version = '1.0'
-
-
# Add additional assets to the asset load path
-
# Rails.application.config.assets.paths << Emoji.images_path
-
-
# Precompile additional assets.
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-
# Rails.application.config.assets.precompile += %w( search.js )
-
1
Authority.configure do |config|
-
-
# USER_METHOD
-
# ===========
-
# Authority needs the name of a method, available in any controller, which
-
# will return the currently logged-in user. (If this varies by controller,
-
# just create a common alias.)
-
#
-
# Default is:
-
#
-
# config.user_method = :current_user
-
# TODO: May need to make this :devise_current_user
-
-
# CONTROLLER_ACTION_MAP
-
# =====================
-
# For a given controller method, what verb must a user be able to do?
-
# For example, a user can access 'show' if they 'can_read' the resource.
-
#
-
# These can be modified on a per-controller basis; see README. This option
-
# applies to all controllers.
-
#
-
# Defaults are as follows:
-
#
-
# config.controller_action_map = {
-
# :index => 'read',
-
# :show => 'read',
-
# :new => 'create',
-
# :create => 'create',
-
# :edit => 'update',
-
# :update => 'update',
-
# :destroy => 'delete'
-
# }
-
-
# ABILITIES
-
# =========
-
# Teach Authority how to understand the verbs and adjectives in your system. Perhaps you
-
# need {:microwave => 'microwavable'}. I'm not saying you do, of course. Stop looking at
-
# me like that.
-
#
-
# Defaults are as follows:
-
#
-
1
config.abilities = {
-
create: 'creatable',
-
read: 'readable',
-
update: 'updatable',
-
delete: 'deletable',
-
-
# claim: 'claimable',
-
# flag: 'flagable',
-
-
# approve: 'approvable',
-
# decline: 'declinable',
-
# moderate: 'moderatable',
-
-
# join: 'joinable',
-
# deactivate: 'deactivatable'
-
}
-
-
# Flags, Claims, and Memberships are all created resources. You should check
-
# permissions on them with:
-
#
-
# current_user.can_create? Claim, for: @development
-
#
-
# or
-
#
-
# current_user.can_join? @organization
-
-
# LOGGER
-
# ======
-
# If a user tries to perform an unauthorized action, where should we log that fact?
-
# Provide a logger object which responds to `.warn(message)`, unless your
-
# security_violation_handler calls a different method.
-
#
-
# Default is:
-
#
-
# config.logger = Logger.new(STDERR)
-
#
-
# Some possible settings:
-
# config.logger = Rails.logger # Log with all your app's other messages
-
# config.logger = Logger.new('log/authority.log') # Use this file
-
# config.logger = Logger.new('/dev/null') # Don't log at all (on a Unix system)
-
-
end
-
# Be sure to restart your server when you modify this file.
-
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
-
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
-
# Rails.backtrace_cleaner.remove_silencers!
-
# Be sure to restart your server when you modify this file.
-
-
1
Rails.application.config.action_dispatch.cookies_serializer = :json
-
1
Time::DATE_FORMATS[:timestamp] = Proc.new { |time|
-
4
time.stamp("5 January 2016 at 3:59 pm EST")
-
}
-
-
1
Time::DATE_FORMATS[:subject] = proc { |date|
-
6
date.stamp('Sunday, 2 Feb 2016')
-
}
-
-
1
Time::DATE_FORMATS[:short] = proc { |date|
-
4
date.stamp('Feb 2, 1999')
-
}
-
-
1
Date::DATE_FORMATS[:short] = proc { |date|
-
date.stamp('Feb 2, 1999')
-
}
-
-
1
Date::DATE_FORMATS[:subject] = proc { |date|
-
date.stamp('Sunday, 2 Feb 2016')
-
}
-
# Use this hook to configure devise mailer, warden hooks and so forth.
-
# Many of these configuration options can be set straight in your model.
-
1
Devise.setup do |config|
-
# The secret key used by Devise. Devise uses this key to generate
-
# random tokens. Changing this key will render invalid all existing
-
# confirmation, reset password and unlock tokens in the database.
-
# Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
-
# by default. You can change it below and use your own secret key.
-
# config.secret_key = 'ab07d687eb080b82655176af76bcc33e8d6f0e7e7c91700c71e13e6cd6827673a7390680af4f55dbd44c2597842c106c00f7df53b098c3ec601473974fe05a90'
-
-
# ==> Mailer Configuration
-
# Configure the e-mail address which will be shown in Devise::Mailer,
-
# note that it will be overwritten if you use your own mailer class
-
# with default "from" parameter.
-
1
config.mailer_sender = 'no-reply@mapc.org'
-
-
# Configure the class responsible to send e-mails.
-
# config.mailer = 'Devise::Mailer'
-
-
# ==> ORM configuration
-
# Load and configure the ORM. Supports :active_record (default) and
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
-
# available as additional gems.
-
1
require 'devise/orm/active_record'
-
-
# ==> Configuration for any authentication mechanism
-
# Configure which keys are used when authenticating a user. The default is
-
# just :email. You can configure it to use [:username, :subdomain], so for
-
# authenticating a user, both parameters are required. Remember that those
-
# parameters are used only when authenticating and not when retrieving from
-
# session. If you need permissions, you should implement that in a before filter.
-
# You can also supply a hash where the value is a boolean determining whether
-
# or not authentication should be aborted when the value is not present.
-
# config.authentication_keys = [:email]
-
-
# Configure parameters from the request object used for authentication. Each entry
-
# given should be a request method and it will automatically be passed to the
-
# find_for_authentication method and considered in your model lookup. For instance,
-
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
-
# The same considerations mentioned for authentication_keys also apply to request_keys.
-
# config.request_keys = []
-
-
# Configure which authentication keys should be case-insensitive.
-
# These keys will be downcased upon creating or modifying a user and when used
-
# to authenticate or find a user. Default is :email.
-
1
config.case_insensitive_keys = [:email]
-
-
# Configure which authentication keys should have whitespace stripped.
-
# These keys will have whitespace before and after removed upon creating or
-
# modifying a user and when used to authenticate or find a user. Default is :email.
-
1
config.strip_whitespace_keys = [:email]
-
-
# Tell if authentication through request.params is enabled. True by default.
-
# It can be set to an array that will enable params authentication only for the
-
# given strategies, for example, `config.params_authenticatable = [:database]` will
-
# enable it only for database (email + password) authentication.
-
# config.params_authenticatable = true
-
-
# Tell if authentication through HTTP Auth is enabled. False by default.
-
# It can be set to an array that will enable http authentication only for the
-
# given strategies, for example, `config.http_authenticatable = [:database]` will
-
# enable it only for database authentication. The supported strategies are:
-
# :database = Support basic authentication with authentication key + password
-
# config.http_authenticatable = false
-
-
# If 401 status code should be returned for AJAX requests. True by default.
-
# config.http_authenticatable_on_xhr = true
-
-
# The realm used in Http Basic Authentication. 'Application' by default.
-
# config.http_authentication_realm = 'Application'
-
-
# It will change confirmation, password recovery and other workflows
-
# to behave the same regardless if the e-mail provided was right or wrong.
-
# Does not affect registerable.
-
# config.paranoid = true
-
-
# By default Devise will store the user in session. You can skip storage for
-
# particular strategies by setting this option.
-
# Notice that if you are skipping storage for all authentication paths, you
-
# may want to disable generating routes to Devise's sessions controller by
-
# passing skip: :sessions to `devise_for` in your config/routes.rb
-
1
config.skip_session_storage = [:http_auth]
-
-
# By default, Devise cleans up the CSRF token on authentication to
-
# avoid CSRF token fixation attacks. This means that, when using AJAX
-
# requests for sign in and sign up, you need to get a new CSRF token
-
# from the server. You can disable this option at your own risk.
-
# config.clean_up_csrf_token_on_authentication = true
-
-
# ==> Configuration for :database_authenticatable
-
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
-
# using other encryptors, it sets how many times you want the password re-encrypted.
-
#
-
# Limiting the stretches to just one in testing will increase the performance of
-
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
-
# a value less than 10 in other environments. Note that, for bcrypt (the default
-
# encryptor), the cost increases exponentially with the number of stretches (e.g.
-
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
-
1
config.stretches = Rails.env.test? ? 1 : 10
-
-
# Setup a pepper to generate the encrypted password.
-
# config.pepper = '2298213d643414ee7dbde1d4560d7d760591b5de41404155c4e9b7942f504aae38e5b5232704c2be3bbc519b21484055edd7a8cd5fd5fd0225ed0d9d8621d8a1'
-
-
# ==> Configuration for :confirmable
-
# A period that the user is allowed to access the website even without
-
# confirming their account. For instance, if set to 2.days, the user will be
-
# able to access the website for two days without confirming their account,
-
# access will be blocked just in the third day. Default is 0.days, meaning
-
# the user cannot access the website without confirming their account.
-
# config.allow_unconfirmed_access_for = 2.days
-
-
# A period that the user is allowed to confirm their account before their
-
# token becomes invalid. For example, if set to 3.days, the user can confirm
-
# their account within 3 days after the mail was sent, but on the fourth day
-
# their account can't be confirmed with the token any more.
-
# Default is nil, meaning there is no restriction on how long a user can take
-
# before confirming their account.
-
# config.confirm_within = 3.days
-
-
# If true, requires any email changes to be confirmed (exactly the same way as
-
# initial account confirmation) to be applied. Requires additional unconfirmed_email
-
# db field (see migrations). Until confirmed, new email is stored in
-
# unconfirmed_email column, and copied to email column on successful confirmation.
-
1
config.reconfirmable = true
-
-
# Defines which key will be used when confirming an account
-
# config.confirmation_keys = [:email]
-
-
# ==> Configuration for :rememberable
-
# The time the user will be remembered without asking for credentials again.
-
# config.remember_for = 2.weeks
-
-
# Invalidates all the remember me tokens when the user signs out.
-
1
config.expire_all_remember_me_on_sign_out = true
-
-
# If true, extends the user's remember period when remembered via cookie.
-
# config.extend_remember_period = false
-
-
# Options to be passed to the created cookie. For instance, you can set
-
# secure: true in order to force SSL only cookies.
-
# config.rememberable_options = {}
-
-
# ==> Configuration for :validatable
-
# Range for password length.
-
1
config.password_length = 8..72
-
-
# Email regex used to validate email formats. It simply asserts that
-
# one (and only one) @ exists in the given string. This is mainly
-
# to give user feedback and not to assert the e-mail validity.
-
# config.email_regexp = /\A[^@]+@[^@]+\z/
-
-
# ==> Configuration for :timeoutable
-
# The time you want to timeout the user session without activity. After this
-
# time the user will be asked for credentials again. Default is 30 minutes.
-
# config.timeout_in = 30.minutes
-
-
# ==> Configuration for :lockable
-
# Defines which strategy will be used to lock an account.
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
-
# :none = No lock strategy. You should handle locking by yourself.
-
# config.lock_strategy = :failed_attempts
-
-
# Defines which key will be used when locking and unlocking an account
-
# config.unlock_keys = [:email]
-
-
# Defines which strategy will be used to unlock an account.
-
# :email = Sends an unlock link to the user email
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
-
# :both = Enables both strategies
-
# :none = No unlock strategy. You should handle unlocking by yourself.
-
# config.unlock_strategy = :both
-
-
# Number of authentication tries before locking an account if lock_strategy
-
# is failed attempts.
-
# config.maximum_attempts = 20
-
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
-
# config.unlock_in = 1.hour
-
-
# Warn on the last attempt before the account is locked.
-
# config.last_attempt_warning = true
-
-
# ==> Configuration for :recoverable
-
#
-
# Defines which key will be used when recovering the password for an account
-
# config.reset_password_keys = [:email]
-
-
# Time interval you can reset your password with a reset password key.
-
# Don't put a too small interval or your users won't have the time to
-
# change their passwords.
-
1
config.reset_password_within = 6.hours
-
-
# When set to false, does not sign a user in automatically after their password is
-
# reset. Defaults to true, so a user is signed in automatically after a reset.
-
# config.sign_in_after_reset_password = true
-
-
# ==> Configuration for :encryptable
-
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
-
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
-
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
-
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
-
# REST_AUTH_SITE_KEY to pepper).
-
#
-
# Require the `devise-encryptable` gem when using anything other than bcrypt
-
# config.encryptor = :sha512
-
-
# ==> Scopes configuration
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
-
# "users/sessions/new". It's turned off by default because it's slower if you
-
# are using only default views.
-
# config.scoped_views = false
-
-
# Configure the default scope given to Warden. By default it's the first
-
# devise role declared in your routes (usually :user).
-
# config.default_scope = :user
-
-
# Set this configuration to false if you want /users/sign_out to sign out
-
# only the current scope. By default, Devise signs out all scopes.
-
# config.sign_out_all_scopes = true
-
-
# ==> Navigation configuration
-
# Lists the formats that should be treated as navigational. Formats like
-
# :html, should redirect to the sign in page when the user does not have
-
# access, but formats like :xml or :json, should return 401.
-
#
-
# If you have any extra navigational formats, like :iphone or :mobile, you
-
# should add them to the navigational formats lists.
-
#
-
# The "*/*" below is required to match Internet Explorer requests.
-
# config.navigational_formats = ['*/*', :html]
-
-
# The default HTTP method used to sign out a resource. Default is :delete.
-
1
config.sign_out_via = :delete
-
-
# ==> OmniAuth
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
-
# up on your models and hooks.
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
-
-
# ==> Warden configuration
-
# If you want to use other strategies, that are not supported by Devise, or
-
# change the failure app, you can configure them inside the config.warden block.
-
#
-
# config.warden do |manager|
-
# manager.intercept_401 = false
-
# manager.default_strategies(scope: :user).unshift :some_external_strategy
-
# end
-
-
# ==> Mountable engine configurations
-
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
-
# is mountable, there are some extra configurations to be taken into account.
-
# The following options are available, assuming the engine is mounted as:
-
#
-
# mount MyEngine, at: '/my_engine'
-
#
-
# The router that invoked `devise_for`, in the example above, would be:
-
# config.router_name = :my_engine
-
#
-
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
-
# so you need to do it manually. For the users scope, it would be:
-
# config.omniauth_path_prefix = '/my_engine/users/auth'
-
end
-
1
EmberCli.configure do |c|
-
1
c.app :searchapp
-
end
-
1
require 'active_record/fixtures'
-
-
1
module FileFixtureExtension
-
1
def file(file_name)
-
71
File.open(Rails.root.join('test/fixtures/', file_name), 'rb') do |f|
-
71
"!!binary \"#{Base64.strict_encode64(f.read)}\""
-
end
-
end
-
end
-
-
1
ActiveRecord::FixtureSet.extend FileFixtureExtension
-
# Be sure to restart your server when you modify this file.
-
-
# Configure sensitive parameters which will be filtered from the log file.
-
1
Rails.application.config.filter_parameters += [:password]
-
1
HighVoltage.configure do |config|
-
1
config.home_page = 'home'
-
1
config.route_drawer = HighVoltage::RouteDrawers::Root
-
1
config.layout = 'full'
-
end
-
# Be sure to restart your server when you modify this file.
-
-
# Add new inflection rules using the following format. Inflections
-
# are locale specific, and you may define rules for as many different
-
# locales as you wish. All of these examples are active by default:
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
-
# inflect.plural /^(ox)$/i, '\1en'
-
# inflect.singular /^(ox)en/i, '\1'
-
# inflect.irregular 'person', 'people'
-
# inflect.uncountable %w( fish sheep )
-
# end
-
-
# These inflection rules are supported but not enabled by default:
-
1
ActiveSupport::Inflector.inflections(:en) do |inflect|
-
4
%w( API CSV PDF ).each { |word| inflect.acronym word }
-
end
-
1
JSONAPI.configure do |config|
-
1
config.default_paginator = :paged
-
-
1
config.default_page_size = 10
-
1
config.maximum_page_size = 4000
-
-
1
config.top_level_meta_include_record_count = true
-
1
config.top_level_meta_record_count_key = :record_count
-
-
# config.top_level_meta_include_page_count = true
-
# config.top_level_meta_page_count_key = :page_count
-
end
-
1
Leaflet.tile_layer = "http://tiles.mapc.org/basemap/{z}/{x}/{y}.png"
-
1
Leaflet.attribution = 'Map tiles by <a href="http://mapc.org">MAPC</a>, Data by <a href="http://www.mass.gov/mgis/">MassGIS</a>.'
-
1
Leaflet.max_zoom = 17
-
# Leaflet.zoom_control = true
-
# Leaflet.scroll_wheel_zoom = false
-
1
ActionMailer::Base.smtp_settings = {
-
address: 'smtp.mandrillapp.com',
-
port: 25, # ports 587 and 2525 are also supported with STARTTLS
-
enable_starttls_auto: true, # detects and uses STARTTLS
-
1
user_name: ENV.fetch('MANDRILL_USERNAME') { '' },
-
1
password: ENV.fetch('MANDRILL_API_KEY') { '' },
-
authentication: 'login',
-
1
domain: ENV.fetch('HOST') { 'dd.mapc.org' }
-
}
-
# Be sure to restart your server when you modify this file.
-
-
# Add new mime types for use in respond_to blocks:
-
# Mime::Type.register "text/richtext", :rtf
-
1
PgSearch.multisearch_options = {
-
using: {
-
tsearch: { prefix: true }
-
}
-
}
-
# Be sure to restart your server when you modify this file.
-
-
1
Rails.application.config.session_store :cookie_store, key: '_ddmodels2_session'
-
# Be sure to restart your server when you modify this file.
-
-
# This file contains settings for ActionController::ParamsWrapper which
-
# is enabled by default.
-
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
-
1
ActiveSupport.on_load(:action_controller) do
-
1
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
-
end
-
-
# To enable root element in JSON for ActiveRecord objects.
-
# ActiveSupport.on_load(:active_record) do
-
# self.include_root_in_json = true
-
# end
-
1
require 'api_version'
-
1
require 'subdomain_constraint'
-
-
1
Rails.application.routes.draw do
-
-
1
mount_ember_app :searchapp, to: 'developments/:id/edit/',
-
controller: 'developments',
-
action: 'edit',
-
as: :edit_development
-
-
1
mount_ember_app :searchapp, to: 'developments/new',
-
controller: 'developments',
-
action: 'new',
-
as: :new_development
-
-
1
namespace :api, constraints: SubdomainConstraint.new(/^api/), path: '' do
-
1
get 'searches/limits', to: 'searches#limits'
-
1
api_version(APIVersion.new(version: 1, default: true).params) do
-
3
jsonapi_resources :developments, except: [:destroy]
-
3
jsonapi_resources :searches, only: [:index, :show, :create, :destroy]
-
3
jsonapi_resources :subscriptions, only: [:create, :destroy]
-
3
jsonapi_resources :organizations, only: [:index, :show]
-
3
jsonapi_resources :development_team_memberships
-
3
jsonapi_resources :searchables, only: [:show]
-
end
-
end
-
-
1
get 'developments/map', to: 'developments#index', rest: '/map', ember_app: :searchapp
-
1
get 'developments/table', to: 'developments#index', rest: '/table', ember_app: :searchapp
-
-
1
resources :developments, only: [:show] do
-
1
get :image, on: :member
-
1
get :export, on: :collection
-
1
resources :claims, only: [:new, :create]
-
1
resources :flags, only: [:new, :create] do
-
1
post :close, on: :member
-
end
-
1
resources :edits, only: [:index, :show] do
-
1
post :approve, on: :member
-
1
post :decline, on: :member
-
1
get :pending, on: :collection
-
end
-
end
-
-
1
mount_ember_app :searchapp, to: 'developments',
-
controller: 'developments',
-
action: 'index',
-
as: :developments
-
-
1
resources :searches, only: [:show], defaults: { format: :pdf }
-
-
1
resources :organizations, except: [:destroy] do
-
1
post :join, to: 'memberships#join', on: :member
-
1
post :leave, to: 'memberships#deactivate', on: :member
-
1
get :admin, to: 'memberships#admin', on: :member
-
end
-
-
1
devise_for :users, controllers: { registrations: 'registrations' }
-
1
devise_scope :user do
-
1
get 'signup', to: 'devise/registrations#new'
-
1
get 'signin', to: 'devise/sessions#new'
-
1
post 'signin', to: 'devise/sessions#create'
-
1
delete 'signout', to: 'devise/sessions#destroy'
-
end
-
-
1
resources :users, only: [:show] do
-
1
resources :memberships, only: [:deactivate, :activate] do
-
1
put :deactivate
-
1
post :activate
-
end
-
end
-
-
1
resources :memberships do
-
1
member do
-
1
post :approve
-
1
post :activate, to: 'memberships#approve'
-
1
put :decline
-
1
post :promote
-
1
put :deactivate
-
end
-
end
-
-
# get 'home/index', to: 'home#index'
-
# The priority is based upon order of creation: first created -> highest priority.
-
# See how all your routes lay out with "rake routes".
-
-
# You can have the root of your site routed with "root"
-
# root 'high_voltage/pages#show', id: 'about'
-
-
end
-
1
class APIVersion
-
-
1
attr_reader :version, :default
-
-
1
def initialize(version: , default: false)
-
7
@version = version.to_i
-
7
@default = default
-
end
-
-
1
def params
-
{
-
module: module_name,
-
header: header,
-
parameter: parameter,
-
default: @default
-
3
}
-
end
-
-
1
private
-
-
1
def module_name
-
3
"V#{@version}"
-
end
-
-
1
def header
-
{
-
name: "Accept",
-
value: "application/vnd.api+json; application/org.dd.v#{@version}"
-
3
}
-
end
-
-
1
def parameter
-
3
{ name: "version", value: @version.to_s }
-
end
-
-
end
-
1
module Compass
-
1
def self.direction_from_degrees(degrees)
-
4
case degrees
-
when 348.75...360
-
'N'
-
when 0...11.25
-
'N'
-
when 11.25...33.75
-
'NNE'
-
when 33.75...56.25
-
'NE'
-
when 56.25...78.75
-
'ENE'
-
when 78.75...101.25
-
'E'
-
when 101.25...123.75
-
'ESE'
-
when 123.75...146.25
-
'SE'
-
when 146.25...168.75
-
'SSE'
-
when 168.75...191.25
-
'S'
-
when 191.25...213.75
-
'SSW'
-
when 213.75...236.25
-
4
'SW'
-
when 236.25...258.75
-
'WSW'
-
when 258.75...281.25
-
'W'
-
when 281.25...303.75
-
'WNW'
-
when 303.75...326.25
-
'NW'
-
when 326.25...348.75
-
'NNW'
-
else
-
'?'
-
end
-
end
-
end
-
1
require 'ostruct'
-
1
require 'geocoder'
-
-
1
class DevelopmentConverter
-
-
1
SQ_FT_PER_ACRE = 43560
-
-
1
def initialize(attributes)
-
6
@old = OpenStruct.new attributes.to_h
-
end
-
-
1
def to_h
-
# If the attribute value is a symbol, call that method on the old development.
-
# Otherwise, if the attribute is a method, just let the method be called.
-
5
Hash[
-
attribute_converters.map do |k, attribute|
-
220
if attribute.is_a? Symbol
-
140
[k, @old.send(attribute)]
-
else
-
80
[k, attribute]
-
end
-
end
-
]
-
end
-
-
1
def attribute_converters
-
{
-
fa_ret: floor_area_from_percents(:retpct),
-
fa_ofcmd: floor_area_from_percents(:ofcmdpct),
-
fa_indmf: floor_area_from_percents(:indmfpct),
-
fa_whs: floor_area_from_percents(:whspct),
-
fa_rnd: floor_area_from_percents(:rndpct),
-
fa_edinst: floor_area_from_percents(:edinstpct),
-
fa_other: floor_area_from_percents(:othpct),
-
latitude: latitude,
-
longitude: longitude,
-
street_view_latitude: latitude,
-
street_view_longitude: longitude,
-
total_cost: :total_cost,
-
singfamhu: :singfamhu,
-
twnhsmmult: :twnhsmmult,
-
lgmultifam: :lgmultifam,
-
tothu: :tothu,
-
gqpop: :gqpop,
-
commsf: :commsf,
-
rptdemp: :rptdemp,
-
emploss: :emploss,
-
hotelrms: :hotelrms,
-
name: :ddname,
-
description: :description,
-
project_url: :url,
-
year_compl: :complyr,
-
mixed_use: :mxduse,
-
rdv: :rdv,
-
asofright: :as_of_right,
-
ovr55: :ovr55,
-
clusteros: :clustosrd,
-
phased: :phased,
-
stalled: :stalled,
-
:private => :draft,
-
onsitepark: :parking_spaces,
-
other_rate: :otheremprat2,
-
created_at: :created,
-
updated_at: :last_modified,
-
affordable: :affordable,
-
address: address,
-
state: state,
-
zip_code: zip_code,
-
tagline: :projecttype_detail,
-
status: status,
-
creator: User.first
-
5
}
-
end
-
-
1
def latitude
-
15
location.last
-
end
-
-
1
def longitude
-
15
location.first
-
end
-
-
1
def location
-
31
@old.location.delete('POINT(').delete(')').split(' ').map(&:to_f)
-
end
-
-
# TODO: What needs to occur before this step?
-
1
def relationships
-
{
-
programs: [
-
Program.where(name: zoning_tool)
-
],
-
walkscore: walkscore,
-
creator: creator,
-
development_team_memberships: []
-
}
-
end
-
-
1
def creator
-
User.find @old.last_modified_by_id
-
end
-
-
1
def walkscore
-
{
-
status: @old.walkscore_status,
-
walkscore: @old.walkscore_walkscore,
-
description: @old.walkscore_description,
-
updated: @old.walkscore_updated,
-
logo_url: "https://cdn.walk.sc/images/api-logo.png",
-
more_info_icon: "https://cdn.walk.sc/images/api-more-info.gif",
-
more_info_link: "https://www.redfin.com/how-walk-score-works",
-
ws_link: "https://www.walkscore.com/score/loc/lat=#{latitude}/lng=#{longitude}/?utm_source=mapc.org&utm_medium=ws_api&utm_campaign=ws_api",
-
help_link: "https://www.redfin.com/how-walk-score-works",
-
snapped_lat: @old.walkscore_snapped_lat,
-
snapped_lon: @old.walkscore_snapped_lon
-
}
-
end
-
-
1
def status
-
5
return 'in_construction' if @old.status == "Construction"
-
5
@old.status.downcase
-
end
-
-
1
def address
-
5
if @old.ddname.match(/^(\d+)/)
-
5
@old.ddname
-
else
-
geo['formatted_address'].partition(',').first.strip
-
end
-
end
-
-
1
def geo
-
5
@geo ||= Geocoder.search("#{latitude},#{longitude}").first.data
-
end
-
-
1
def state
-
5
'MA'
-
end
-
-
1
def zip_code
-
5
component = geo['address_components'].select do |comp|
-
40
comp['types'].include?('postal_code')
-
end.first
-
5
if component
-
5
component['short_name']
-
else
-
nil
-
end
-
end
-
-
1
def prjarea
-
@old.prjacrs * SQ_FT_PER_ACRE
-
end
-
-
1
def affordable
-
# TODO: This attribute.
-
raise NotImplementedError
-
end
-
-
1
private
-
-
1
def floor_area_from_percents(attribute)
-
35
(@old.send(attribute).to_i / 100) * @old.commsf.to_i
-
rescue ZeroDivisionError
-
0
-
end
-
-
end
-
1
class EmploymentEstimator
-
-
1
def initialize(subject)
-
22
@subject = subject
-
end
-
-
1
def estimate
-
21
breakdown.values.reduce(:+) || 0
-
end
-
-
1
def breakdown
-
22
array = multipliers.each_pair.map do |category, sqft_per_employee|
-
176
if sqft = @subject.send(category)
-
11
[category, sqft * (1 / sqft_per_employee)]
-
end
-
end.compact
-
22
Hash[array]
-
end
-
-
1
private
-
-
1
DEFAULT_OTHER_USE_RATE = 150
-
-
1
def multipliers
-
{
-
fa_ret: 750,
-
fa_ofcmd: 330,
-
fa_indmf: 500,
-
fa_whs: 750,
-
fa_rnd: 330,
-
fa_edinst: 330,
-
hotelrms: 0.5,
-
fa_other: other_multiplier
-
22
}
-
end
-
-
1
def other_multiplier
-
22
@subject.other_rate || DEFAULT_OTHER_USE_RATE
-
end
-
-
end
-
1
module JSONAPI
-
-
1
class Resource
-
1
class << self
-
1
def range_filters(*filter_attributes)
-
3
Array(filter_attributes).flatten.each { |attribute|
-
34
filter(attribute, apply: ->(records, value, options) {
-
6
records.where(attribute => RangeParser.parse(value))
-
})
-
}
-
end
-
-
1
def boolean_filters(*filter_attributes)
-
2
Array(filter_attributes).flatten.each { |attribute|
-
16
filter(attribute, apply: ->(records, value, options) {
-
2
if [false, nil].include? value.first.to_b
-
records.where(attribute => [false, nil])
-
else
-
2
records.where(attribute => true)
-
end
-
})
-
}
-
end
-
-
1
alias_method :range_filter, :range_filters
-
1
alias_method :boolean_filter, :boolean_filters
-
end
-
end
-
-
-
1
class LinkBuilder
-
1
private
-
-
1
def formatted_module_path_from_class(klass)
-
167
'/'
-
end
-
end
-
end
-
1
module Periscope
-
-
# For every attribute name given in scope_names, define a scope on the model
-
# that will accept either a range of numeric values or a single numeric value.
-
1
def ranged_scopes(*scope_names)
-
2
scope_names.map(&:to_sym).each do |name|
-
28
scope name, range_or_value_scope(name)
-
end
-
2
scope_accessible(*scope_names, parser: periscope_range_parser)
-
end
-
-
# For every attribute name given in scope_names, define a scope on the model
-
# that will look up whether the attribute is true, false, or nil, defaulting
-
# to true.
-
1
def boolean_scopes(*scope_names)
-
2
scope_names.map(&:to_sym).each do |name|
-
14
scope name, _boolean_scope(name)
-
end
-
2
scope_accessible(*scope_names)
-
end
-
-
1
alias_method :ranged_scope, :ranged_scopes
-
1
alias_method :boolean_scope, :boolean_scopes
-
-
1
private
-
-
# Assign a scope that accepts either a single numeric value or a range.
-
# If a 'max' value is present, the scope will query the range, like
-
# WHERE NUMERIC_VALUE BETWEEN 100 AND 200
-
# Otherwise, if there is only one value, it will look up the value, like
-
# WHERE NUMERIC_VALUE = 100
-
1
def range_or_value_scope(name)
-
28
Proc.new do |min, max|
-
66
max ? where(name => min..max) : where(name => min)
-
end
-
end
-
-
# Assign a scope that will accept a boolean value, and defaults to true if
-
# the attribute name is present in the Periscope query.
-
# TODO: It might be more reliable to cast this to a boolean before working
-
# with it, but this is a good first pass.
-
1
def _boolean_scope(name)
-
14
Proc.new do |*bools|
-
23
if [false, nil].include? bools.first.to_b
-
11
where(name => [false, nil])
-
else
-
12
where(name => true)
-
end
-
end
-
end
-
-
1
def periscope_range_parser
-
# Expects a numeric array [min,max] or a string '[min,max]'
-
2
Proc.new do |range|
-
66
array = range.to_s.delete('[ ]').split(',')
-
66
if array.length < 2
-
28
array.first
-
else
-
38
array
-
end
-
end
-
end
-
-
end
-
1
class MapzenSearch
-
-
1
attr_reader :id
-
-
1
def initialize(text)
-
@text = text
-
@url = base + text
-
end
-
-
1
def id
-
@text
-
end
-
-
1
def geometry
-
{
-
type: result['type'],
-
coordinates: result['geometry'],
-
properties: result['properties']
-
}
-
end
-
-
1
def result
-
results.first
-
end
-
-
1
private
-
-
1
def results
-
# Array-ify nil caused by a URL error or missing MAPZEN_API_KEY
-
Array(JSON.parse(response)['features']).map { |json| OpenStruct.new(json) }
-
end
-
-
1
def response
-
Net::HTTP.get_response(URI(@url)).body
-
end
-
-
1
def base
-
@base ||= "http://search.mapzen.com/v1/autocomplete"
-
@base += "?api_key=#{ENV['MAPZEN_API_KEY']}"
-
@base += "&focus.point.lat=42.357&focus.point.lon=-71.056"
-
@base += "&sources=openstreetmap"
-
@base += "&layers=address,microhood,neighbourhood,macrohood"
-
@base += "&text="
-
@base.freeze
-
end
-
-
end
-
# Given an Array or String in the form of [min, max]
-
# convert it to a Range of min..max.
-
# TODO: Return a single value or a single value range (val..val)
-
# in the event a single value or repetitive value is given.
-
1
module RangeParser
-
-
1
def self.parse(value)
-
27
@value = value
-
27
return infinity_range unless @value.present?
-
22
if @value.is_a? Array
-
9
return parse_rejoined_string if @value.first.is_a?(String)
-
2
Range.new *@value.map(&:to_f)
-
else
-
13
parse_string
-
end
-
end
-
-
1
private
-
-
1
def self.parse_rejoined_string
-
7
@value = @value.join ','
-
7
parse_string
-
end
-
-
1
def self.parse_string
-
20
Range.new *@value.match(self.regex).captures.map(&:to_f)
-
end
-
-
1
def self.regex
-
20
/([\d\.]+)['"]?\s*,\s*['"]?([\d\.]+)/
-
end
-
-
1
def self.digits_regex
-
/(\d+)/
-
end
-
-
1
def self.infinity_range
-
5
(-Float::INFINITY..Float::INFINITY)
-
end
-
-
end
-
1
module Roundable
-
1
refine Numeric do
-
1
def round_up(nearest=10)
-
self % nearest == 0 ? self : self + nearest - (self % nearest)
-
end
-
-
1
def round_down(nearest=10)
-
14
self % nearest == 0 ? self : self - (self % nearest)
-
end
-
end
-
end
-
1
class SubdomainConstraint
-
1
def initialize(subdomain)
-
1
@subdomain = subdomain
-
end
-
-
1
def matches?(request)
-
33
@subdomain.match request.host
-
end
-
end
-
1
class Transit
-
-
1
attr_accessor :development
-
-
1
def initialize(development)
-
8
@development = development #used to set development.nearest_transit and geo location API call
-
8
@MBTA_data = JSON.parse(response)
-
end
-
-
1
def get_nearest_transit
-
8
subway_station = get_nearest_subway_station
-
8
name = subway_station ? subway_station['parent_station_name'] : get_nearest_bus_stop
-
-
8
development.nearest_transit = name
-
-
rescue StandardError => e
-
development.nearest_transit = "" # Return current value or empty string
-
end
-
-
1
private
-
-
1
def get_nearest_subway_station
-
16
@MBTA_data['stop'].detect { |e| e['parent_station_name'].present? }
-
end
-
-
1
def get_nearest_bus_stop
-
"Bus stop: #{@MBTA_data['stop'].first['stop_name']}"
-
end
-
-
1
def response
-
8
Net::HTTP.get_response(URI(url)).body
-
end
-
-
1
def url
-
8
"http://realtime.mbta.com/developer/api/v2/stopsbylocation?".tap do |url|
-
8
url << "api_key=#{ENV['MBTA_API_KEY']}"
-
8
url << "&lat=#{development.latitude.to_f}&lon=#{development.longitude.to_f}&format=json"
-
end
-
end
-
end
-
1
class WalkScore
-
-
1
BASE_URL = 'http://api.walkscore.com/score?format=json'.freeze
-
-
1
attr_reader :content
-
-
# Pass in content if we're trying to wrap and not look up live values.
-
# Pass in a lat and lon if we're trying to get a live value.
-
1
def initialize(lat: nil, lon: nil, content: nil)
-
@content ||= if content
-
12
content
-
else
-
8
@lat, @lon = lat.to_f, lon.to_f
-
8
JSON.parse(response).with_indifferent_access
-
20
end
-
end
-
-
1
def score
-
@content['walkscore']
-
end
-
-
1
def to_h
-
8
@content
-
end
-
-
1
def empty?
-
4
@content.keys.count <= 1 # Status key is always present
-
end
-
-
1
def response
-
8
Net::HTTP.get_response(URI(url)).body
-
end
-
-
1
def url
-
8
"#{BASE_URL}&lat=#{@lat}&lon=#{@lon}&wsapikey=#{ENV['WALKSCORE_API_KEY']}"
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class API::V1::DevelopmentsControllerTest < ActionController::TestCase
-
-
1
def setup
-
15
JSONAPI.configuration.raise_if_parameters_not_allowed = true
-
end
-
-
1
def set_content_type_header!
-
5
@request.headers['Content-Type'] = JSONAPI::MEDIA_TYPE
-
end
-
-
1
def set_auth_header_for_user!(user)
-
3
@request.headers['Authorization'] = "Token #{user.api_key}"
-
end
-
-
1
def user
-
3
@_user ||= users(:normal)
-
3
@_user.create_api_key
-
3
@_user
-
end
-
-
1
def development
-
1
@_development ||= developments(:one)
-
end
-
-
1
test 'should get index' do
-
1
get :index
-
1
assert_response :success
-
end
-
-
1
test 'should get index, filtering on range' do
-
1
get :index, filter: { estemp: '[50,100]' }
-
1
assert_equal 1, results(response).count, results(response).inspect
-
1
assert_response :success
-
end
-
-
1
test 'should get index, filtering on boolean' do
-
1
skip
-
[{ asofright: 'true' }, { asofright: 'false' }].each do |filter_value|
-
get :index, filter: filter_value
-
assert_response :success
-
assert_equal 0, results(response).count
-
end
-
end
-
-
1
test 'should get index, filtering on status' do
-
1
get :index, filter: { status: 'planning' }
-
1
assert_response :success
-
1
assert_equal 1, results(response).count
-
end
-
-
1
test 'should log non-blank searches' do
-
1
assert_difference 'Search.count', +2 do
-
1
get :index, filter: { estemp: '[50,100]' }
-
1
get :index, filter: { rdv: 'true' }
-
end
-
end
-
-
1
test 'should not log blank searches' do
-
1
assert_no_difference 'Search.count' do
-
1
get :index
-
end
-
end
-
-
1
test 'should handle empty params with grace and poise' do
-
1
get :index, filter: { commsf: '' }
-
1
assert_response :success
-
1
refute_empty results(response), results(response).inspect
-
end
-
-
1
test 'should get show' do
-
1
get :show, id: development.id
-
1
assert_response :success
-
end
-
-
1
test 'should post create' do
-
1
set_auth_header_for_user! user
-
1
set_content_type_header!
-
1
stub_street_view
-
1
stub_walkscore(lat: 42.3, lon: -71.0)
-
1
stub_mbta lat: 42.3, lon: -71.0
-
-
1
post :create, create_development_json
-
1
assert_response :created, JSON.parse(response.body)#['errors'].first['meta']['backtrace'].join("\n")
-
end
-
-
1
test 'should not create unauthorized user' do
-
1
set_content_type_header!
-
1
post :create, data: create_development_json
-
1
assert_response :unauthorized
-
end
-
-
1
test 'should create edit and return unmodified development' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user! user
-
1
assert_difference 'Edit.pending.count', +1 do
-
1
patch :update, id: developments(:one), data: update_development_payload
-
end
-
# Shouldn't change the name, since it goes into moderation
-
1
assert_equal 'Godfrey Hotel', results(response)['attributes']['name']
-
# Should have the new name in the edit's fields
-
1
assert_includes Edit.last.fields.map(&:change).map(&:to_s).join(' '), '14 Winter Palace'
-
1
assert_includes response.headers['Content-Type'], 'application/vnd.api+json'
-
1
assert_response :success, response.body
-
end
-
-
1
test 'if invalid, should return unmodified development with errors' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user! user
-
1
assert_no_difference 'Edit.pending.count' do
-
1
patch :update, id: developments(:one), data: invalid_update_development_payload
-
end
-
1
assert_includes response.body, 'error'
-
end
-
-
1
test 'should not update with unauthorized user' do
-
1
set_content_type_header!
-
1
patch :update, id: developments(:one), data: update_development_payload
-
1
assert_response :unauthorized, response.body
-
end
-
-
1
test 'should not destroy' do
-
1
%i( destroy ).each do |action|
-
2
assert_raises(StandardError) { post action }
-
end
-
end
-
-
1
test 'search' do
-
1
skip
-
filter_params = { rdv: 'false', clusteros: 'false' }
-
end
-
-
1
private
-
-
1
def results(response)
-
6
JSON.parse(response.body)['data']
-
end
-
-
1
def create_development_json
-
{
-
data: {
-
type: 'developments',
-
attributes: {
-
latitude: 42.3,
-
longitude: -71.0,
-
name: '100 Fury Road',
-
2
description: ('a' * 142),
-
'year-compl' => 2106,
-
tothu: 0,
-
commsf: 0,
-
'street-view-latitude' => 42.301,
-
'street-view-longitude' => -71.010
-
}
-
}
-
2
}
-
end
-
-
1
def update_development_payload
-
{
-
type: 'developments',
-
id: developments(:one),
-
attributes: {
-
name: '14 Winter Palace',
-
tagline: 'A short, pithy, but long-enough description.',
-
'year-compl' => 2016,
-
tothu: 10,
-
commsf: 1000
-
}
-
2
}
-
end
-
-
1
def invalid_update_development_payload
-
{
-
type: 'developments',
-
id: developments(:one),
-
attributes: {
-
name: '',
-
status: 'completed',
-
tothu: 10,
-
gqpop: 10000,
-
commsf: 1000
-
}
-
1
}
-
end
-
-
1
def stub_street_view
-
1
file = ActiveRecord::FixtureSet.file('street_view/godfrey.jpg')
-
stub_request(:get, 'http://maps.googleapis.com/maps/api/streetview?fov=100&heading=0&key=loLOLol&location=42.301,-71.01&pitch=35&size=600x600').
-
1
to_return(status: 200, body: file)
-
end
-
-
1
def stub_walkscore(lat: 42.000001, lon: -71.000001)
-
1
file = File.read('test/fixtures/walkscore/200.json')
-
stub_request(:get, "http://api.walkscore.com/score?format=json&lat=#{lat}&lon=#{lon}&wsapikey=").
-
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'api.walkscore.com', 'User-Agent'=>'Ruby'}).
-
1
to_return(:status => 200, :body => file)
-
end
-
-
1
def stub_mbta(lat: 42.000001, lon: -71.000001)
-
1
file = File.read('test/fixtures/mbta/stopsbylocation.json')
-
stub_request(:get, "http://realtime.mbta.com/developer/api/v2/stopsbylocation?api_key=&format=json&lat=#{lat}&lon=#{lon}")
-
1
.to_return(status: 200, body: file)
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class API::V1::OrganizationsControllerTest < ActionController::TestCase
-
-
1
def organization
-
1
@_organization ||= organizations(:mapc)
-
end
-
-
1
test 'should get index' do
-
1
get :index
-
1
assert_response :success
-
end
-
-
1
test 'should get show' do
-
1
get :show, id: organization.id
-
1
assert_response :success
-
end
-
-
1
test 'should not create, update, or destroy' do
-
1
%i( create update destroy ).each do |action|
-
6
assert_raises(StandardError) { post action }
-
end
-
end
-
-
1
private
-
-
1
def results(response)
-
JSON.parse(response.body)['data']
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class API::V1::SearchesControllerTest < ActionController::TestCase
-
1
def setup
-
11
JSONAPI.configuration.raise_if_parameters_not_allowed = true
-
end
-
-
1
def set_content_type_header!
-
7
@request.headers['Content-Type'] = JSONAPI::MEDIA_TYPE
-
end
-
-
1
def set_auth_header_for_user!(user)
-
8
@request.headers['Authorization'] = "Token #{user.api_key}"
-
end
-
-
1
def user
-
9
@_user ||= users(:normal)
-
9
@_user.create_api_key
-
9
@_user
-
end
-
-
1
def wrong_user
-
1
@_user ||= users(:tim)
-
1
@_user.create_api_key
-
1
@_user
-
end
-
-
1
def search
-
3
@_search ||= searches(:saved)
-
end
-
-
1
test 'index requires a user' do
-
1
get :index
-
1
assert_response :unauthorized
-
-
1
set_auth_header_for_user!(user)
-
1
get :index
-
1
assert_response :success
-
end
-
-
1
test "index will return the current user's searches" do
-
1
expected_ids = user.searches.map(&:id)
-
1
set_auth_header_for_user!(user)
-
1
get :index
-
2
actual_ids = JSON.parse(response.body)['data'].map{ |r| r['id'].to_i}
-
1
assert_equal expected_ids, actual_ids
-
end
-
-
1
test 'show' do
-
1
set_auth_header_for_user!(user)
-
1
get :show, id: search.id
-
1
assert_response :success
-
1
%w( id query saved ).each { |i|
-
3
assert_includes response.body, i
-
}
-
end
-
-
1
test "show will not display another user's search" do
-
1
someone_elses_search = searches(:saved_for_someone_else)
-
1
set_auth_header_for_user!(user)
-
1
get :show, id: someone_elses_search.id
-
1
assert_response :not_found
-
end
-
-
1
test 'create with user authorized through header' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user!(user)
-
1
post :create, empty_saved_search
-
1
assert_response :created, response.body
-
end
-
-
1
test 'create with user authorized through data param' do
-
1
set_content_type_header!
-
1
assert_difference 'Search.count', +1 do
-
1
post :create, empty_saved_search.merge({ api_key: user.api_key.token })
-
end
-
1
assert_response :created, response.body
-
end
-
-
1
test 'create does not save pagination parameters' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user!(user)
-
1
post :create, search_with_page_parameters
-
1
assert_response :created, response.body
-
1
query_keys = results(response)['attributes']['query'].keys
-
1
refute query_keys.include?('number'), query_keys.inspect
-
end
-
-
1
test 'create with no user' do
-
1
set_content_type_header!
-
1
post :create, empty_unsaved_search
-
1
assert_response :unauthorized, response.body
-
end
-
-
1
test 'destroy a search' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user!(user)
-
1
assert_difference 'Search.count', -1 do
-
1
delete :destroy, id: search.id
-
end
-
1
assert_response :success, response.body
-
end
-
-
1
test 'destroy with wrong user' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user!(wrong_user)
-
1
delete :destroy, id: searches(:ranged).id
-
# Instead of returning :unauthorized, returns :not_found because the records
-
# are only those belonging to current_user.
-
1
assert_response :not_found, response.body
-
end
-
-
1
test 'destroy with no user' do
-
1
set_content_type_header!
-
1
delete :destroy, id: search.id
-
1
assert_response :unauthorized, response.body
-
end
-
-
1
private
-
-
1
def results(response)
-
1
JSON.parse(response.body)['data']
-
end
-
-
1
def search_with_page_parameters
-
{
-
data: {
-
type: 'searches',
-
attributes: {
-
query: {
-
page: {
-
number: 1,
-
size: 1
-
},
-
number: 1,
-
size: 1
-
},
-
saved: true
-
}
-
}
-
1
}
-
end
-
-
1
def empty_saved_search
-
2
{ data: { type: 'searches', attributes: { query: {}, saved: true } } }
-
end
-
-
1
def empty_unsaved_search
-
1
{ data: { type: 'searches', attributes: { query: {} } } }
-
end
-
end
-
1
require 'test_helper'
-
-
1
class API::V1::SubscriptionsControllerTest < ActionController::TestCase
-
# Duplicated from SearchesControllerTest
-
# TODO Move to common module
-
1
def setup
-
4
JSONAPI.configuration.raise_if_parameters_not_allowed = true
-
end
-
-
1
def set_content_type_header!
-
4
@request.headers['Content-Type'] = JSONAPI::MEDIA_TYPE
-
end
-
-
1
def set_auth_header_for_user!(user)
-
2
@request.headers['Authorization'] = "Token #{user.api_key}"
-
end
-
-
1
def user
-
4
@_user ||= users(:normal)
-
4
@_user.create_api_key
-
4
@_user
-
end
-
-
1
def development
-
5
@_dev ||= developments(:two)
-
end
-
-
1
def subscription
-
@_subscription ||= subscriptions(:one)
-
end
-
-
1
test 'create with user authorized through header' do
-
1
set_content_type_header!
-
1
set_auth_header_for_user!(user)
-
1
post :create, valid_subscription_data
-
1
assert_response :created, response.body
-
end
-
-
1
test 'create with user authorized through data param' do
-
1
set_content_type_header!
-
1
post :create, valid_subscription_data.merge({api_key: user.api_key.token})
-
1
assert_response :created, response.body
-
end
-
-
1
test 'create with no user' do
-
1
set_content_type_header!
-
1
post :create, valid_subscription_data
-
1
assert_response :unauthorized, response.body
-
end
-
-
1
test 'create duplicate' do
-
1
Subscription.create!(subscribable: development, user: user)
-
1
set_content_type_header!
-
1
set_auth_header_for_user!(user)
-
1
post :create, valid_subscription_data
-
1
assert_response :unprocessable_entity, response.body
-
end
-
-
1
def valid_subscription_data
-
{
-
data: {
-
type: 'subscriptions',
-
attributes: { },
-
relationships: {
-
subscribable: {
-
data: { type: 'developments', id: development.id }
-
},
-
}
-
}
-
4
}
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class ClaimsControllerTest < ActionController::TestCase
-
1
test 'should get new' do
-
1
skip
-
get :new
-
assert_response :success
-
end
-
-
1
test 'should get create' do
-
1
skip
-
get :create
-
assert_response :success
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentsControllerTest < ActionController::TestCase
-
-
1
def development
-
1
@_development ||= developments(:one)
-
end
-
-
1
test 'should get index' do
-
1
skip 'Replaced by Ember'
-
get :index
-
# assert assigns(:developments).count > 1
-
assert_response :success
-
end
-
-
1
test 'should get index, searching' do
-
1
skip 'replaced by Ember'
-
get :index, q: { commsf: '[11,13]' }
-
assert_equal 1, assigns(:developments).count
-
assert_response :success
-
end
-
-
1
test 'should get show' do
-
1
get :show, id: development.id
-
1
assert_response :success
-
end
-
-
1
test 'should get edit' do
-
1
skip 'replaced by Ember'
-
sign_in users(:normal)
-
get :edit, id: development.id
-
assert_response :success
-
end
-
-
1
test 'should patch update' do
-
1
skip 'replaced by Ember'
-
sign_in users(:normal)
-
data = { name: "lol", rdv: true }
-
assert_difference 'Edit.count + FieldEdit.count', +3 do
-
patch :update, id: development.id, development: data
-
end
-
assert_response :redirect
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class EditsControllerTest < ActionController::TestCase
-
-
1
include Devise::TestHelpers
-
-
1
def development
-
4
@_development ||= developments(:one)
-
end
-
-
1
def edit
-
2
@_edit ||= development.edits.last
-
end
-
-
1
def user
-
5
@_user ||= users(:normal)
-
5
@_user.password = 'password'
-
5
@_user
-
end
-
-
1
def setup
-
4
sign_in user
-
end
-
-
1
test 'precondition: valid edit' do
-
1
assert development.valid?, development.errors.full_messages
-
1
assert edit.valid?, edit.errors.full_messages
-
1
assert user.moderator_for? development
-
end
-
-
1
test 'should get pending' do
-
1
skip 'should be passing!'
-
sign_in user
-
get :pending, development_id: development.id
-
assert_response :success
-
end
-
-
1
test 'should approve' do
-
1
skip 'should be passing!'
-
refute edit.conflict?, edit.conflict.inspect
-
assert_difference 'Edit.applied.count', +1 do
-
post :approve, development_id: development.id, id: edit.id
-
end
-
assert_response :redirect
-
end
-
-
1
test 'should decline' do
-
1
skip 'should be passing!'
-
assert_difference 'Edit.pending.count', -1 do
-
post :decline, development_id: development.id, id: edit.id
-
end
-
assert_response :redirect
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class FlagsControllerTest < ActionController::TestCase
-
1
test 'should get index' do
-
1
skip
-
get :index
-
assert_response :success
-
end
-
-
1
test 'should get new' do
-
1
skip
-
get :new
-
assert_response :success
-
end
-
-
1
test 'should get show' do
-
1
skip
-
get :show
-
assert_response :success
-
end
-
-
1
test 'should get edit' do
-
1
skip
-
get :edit
-
assert_response :success
-
end
-
-
1
test 'should get update' do
-
1
skip
-
get :update
-
assert_response :success
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class MembershipsControllerTest < ActionController::TestCase
-
# test 'the truth' do
-
# assert true
-
# end
-
end
-
1
require 'test_helper'
-
-
1
class OrganizationsControllerTest < ActionController::TestCase
-
# test 'the truth' do
-
# assert true
-
# end
-
end
-
1
require 'test_helper'
-
-
1
class RegistrationsControllerTest < ActionController::TestCase
-
# test 'the truth' do
-
# assert true
-
# end
-
end
-
1
require 'test_helper'
-
-
1
class SearchesControllerTest < ActionController::TestCase
-
1
def search
-
3
@_search ||= searches(:ranged)
-
end
-
-
1
test 'should get show' do
-
1
get :show, id: search.id, format: :html
-
1
assert_response :success
-
1
assert assigns(:search)
-
end
-
-
1
test 'saves searches when reporting on them' do
-
1
assert_difference 'Search.where(saved: true).count', +1 do
-
1
get :show, id: search.id, format: :html
-
end
-
end
-
-
1
test 'renders CSV' do
-
1
get :show, id: search.id, format: :csv
-
1
assert_response :success
-
1
content_type = response.headers['Content-Transfer-Encoding']
-
1
assert_equal 'binary', content_type
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class UsersControllerTest < ActionController::TestCase
-
# test 'the truth' do
-
# assert true
-
# end
-
end
-
1
require 'test_helper'
-
-
1
class AdministerOrganizationTest < Capybara::Rails::TestCase
-
-
1
def organization
-
10
@_org ||= admin_membership.organization
-
end
-
-
1
def admin
-
10
@_admin ||= admin_membership.user
-
10
@_admin.password = 'password'
-
10
@_admin
-
end
-
-
1
def admin_membership
-
10
@_mem ||= memberships(:one)
-
10
@_mem.save!
-
10
@_mem
-
end
-
-
1
def not_yet_admin
-
10
@_user ||= users(:tim)
-
10
@_user.password = 'administrator'
-
10
@_user
-
end
-
-
1
def setup
-
5
organization.memberships.create!(user: not_yet_admin)
-
5
sign_in admin, visit: true, submit: true
-
end
-
-
1
def teardown
-
5
organization.memberships.where(user: not_yet_admin).each(&:destroy)
-
5
sign_out admin
-
end
-
-
1
test 'admin can see organization admin link' do
-
assert admin.admin_of?(organization)
-
visit organization_path(organization)
-
assert_content page, 'membership requests'
-
end
-
-
1
test 'admin can view organization admin dashboard' do
-
visit admin_organization_path(organization)
-
refute_content page, 'not authorized'
-
assert_content page, not_yet_admin.first_name
-
end
-
-
1
test 'admin can approve membership requests' do
-
%w( Approve Decline ).each do |action|
-
visit admin_organization_path(organization)
-
assert_content page, not_yet_admin.first_name
-
first(:link, action).click
-
assert_content page, (action.downcase + 'd')
-
end
-
end
-
-
1
test 'normal user cannot view organization admin dashboard' do
-
sign_out admin
-
sign_in not_yet_admin, visit: true, submit: true
-
visit admin_organization_path(organization)
-
assert_content page, 'not authorized'
-
end
-
-
1
test 'admin can promote members' do
-
skip 'at 2016-07-01 10:22:57 -0400'
-
visit admin_organization_path(organization)
-
assert_content page, not_yet_admin.first_name
-
assert_difference 'organization.admins.count', +1 do
-
click_button 'Promote'
-
end
-
assert_content page, 'promoted'
-
sign_out admin
-
sign_in not_yet_admin, visit: true, submit: true
-
visit admin_organization_path(organization)
-
refute_content page, 'not authorized'
-
end
-
-
end
-
-
1
require 'test_helper'
-
-
1
class ClaimDevelopmentTest < Capybara::Rails::TestCase
-
-
1
def setup
-
1
@user = users :normal
-
1
@user.password = 'password'
-
end
-
-
1
test 'sign in, visit development, and claim it' do
-
1
skip 'no claiming'
-
sign_in @user, visit: true, submit: true
-
visit developments_path
-
first('a.development').click
-
assert_content page, 'Godfrey Hotel'
-
click_link 'Claim'
-
assert_content page, 'Claiming Godfrey Hotel'
-
select 'Developer', from: 'role'
-
assert_difference 'Claim.count', +1 do
-
click_button 'Claim'
-
end
-
end
-
end
-
1
require 'test_helper'
-
-
1
class CreateOrganizationTest < Capybara::Rails::TestCase
-
-
1
def organization
-
@organization ||= organizations :mapc
-
end
-
1
alias_method :org, :organization
-
-
1
def user
-
3
@user ||= users :normal
-
3
@user.password = 'password'
-
3
@user
-
end
-
-
1
def unauthorized_user
-
@unauthorized_user ||= users :lower_case
-
@unauthorized_user.password = 'drowssap'
-
@unauthorized_user
-
end
-
-
1
def fill_in_form
-
fill_in :organization_name, with: 'Boston Properties'
-
fill_in :organization_email, with: 'brauser@bra.org'
-
fill_in :organization_location, with: 'brauser@bra.org'
-
fill_in :organization_short_name, with: 'BRA'
-
fill_in :organization_website, with: 'bra.org'
-
click_button 'Submit'
-
end
-
-
1
test 'signed out guest, visit organization creation, and be redirected' do
-
1
visit new_organization_path
-
1
assert_content page, /sign|log in/
-
end
-
-
1
test 'visit organization creation, and not be redirected' do
-
1
sign_in user, visit: true, submit: true
-
visit new_organization_path
-
assert_content page, /new organization/
-
end
-
-
1
test 'visits new organization path, and successfully creates organization' do
-
1
sign_in user, visit: true, submit: true
-
visit new_organization_path
-
fill_in_form
-
assert_content page, 'Boston Properties'
-
end
-
-
1
test 'visits existing organization, and successfully edits it' do
-
1
sign_in user, visit: true, submit: true
-
visit edit_organization_path(org)
-
fill_in_form
-
assert_content page, 'Boston Properties'
-
end
-
-
# test 'signed in user can only edit organizations she has permission to edit' do
-
# sign_in @unauthorized_user, visit: true, submit: true
-
# visit edit_organization_path(org)
-
# fill_in 'organization_name', :with => 'Boston Properties'
-
# fill_in 'organization_email', :with => 'brauser@bra.org'
-
# fill_in 'organization_location', :with => 'brauser@bra.org'
-
# fill_in 'organization_short_name', :with => 'BRA'
-
# fill_in 'organization_website', :with => 'bra.org'
-
# click_button 'Edit Organization'
-
# assert_content page, 'Access Denied'
-
# end
-
end
-
1
require 'test_helper'
-
-
1
class EditOrganizationTest < Capybara::Rails::TestCase
-
-
1
def user
-
1
@user ||= users :normal
-
1
@user.password = 'password'
-
1
@user
-
end
-
-
1
def organization
-
@organization ||= organizations :mapc
-
end
-
-
1
alias_method :org, :organization
-
-
1
test 'signed in user visits existing organization, and successfully edits it' do
-
1
sign_in user, visit: true, submit: true
-
visit edit_organization_path(org)
-
fill_in 'organization_name', :with => 'Boston Properties'
-
fill_in 'organization_email', :with => 'brauser@bra.org'
-
fill_in 'organization_location', :with => 'brauser@bra.org'
-
fill_in 'organization_short_name', :with => 'BRA'
-
fill_in 'organization_website', :with => 'bra.org'
-
click_button 'Submit'
-
assert_content page, 'Boston Properties'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class EditUserTest < Capybara::Rails::TestCase
-
-
1
def user
-
@user ||= users :normal
-
@user.password = 'password'
-
@user
-
end
-
-
1
test 'signed in user can edit name' do
-
1
skip 'unclear why this is failing'
-
sign_in user, visit: true, submit: true
-
visit edit_user_registration_path
-
fill_in 'First name', with: 'William'
-
assert_equal 'William', find_field('First name').value
-
click_button 'Update Profile'
-
assert_content page, 'William'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class FlagDevelopmentTest < Capybara::Rails::TestCase
-
-
1
def setup
-
1
@user = users :normal
-
1
@user.password = 'password'
-
end
-
-
1
test 'sign in, visit development, and flag it' do
-
1
sign_in @user, visit: true, submit: true
-
visit development_path(developments(:one))
-
assert_content page, 'Godfrey Hotel'
-
click_link 'Flag'
-
assert_content page, 'Flagging Godfrey Hotel'
-
fill_in 'Reason', with: 'a' * 140
-
assert_difference 'Flag.count', +1 do
-
click_button 'Flag'
-
end
-
end
-
end
-
1
require 'test_helper'
-
-
1
class JoinOrganizationTest < Capybara::Rails::TestCase
-
-
1
def user
-
3
@user ||= users :lower_case
-
3
@user.password = 'drowssap'
-
3
@user
-
end
-
-
1
def organization
-
@organization ||= organizations :mapc
-
end
-
-
1
alias_method :org, :organization
-
-
1
def setup
-
3
sign_in user, visit: true, submit: true
-
visit organization_path(org)
-
end
-
-
1
test 'signed in user requests to join organization' do
-
click_link 'Request'
-
assert_content page, 'Membership request sent'
-
end
-
-
1
test 'signed in user requests to join org twice and receives an error the second time' do
-
2.times { click_link 'Request' } # Changes to a "Cancel" button
-
assert_content page, 'deactivated'
-
end
-
-
1
test 'signed in user requests to join organization and cancels join request' do
-
click_link 'Request'
-
visit user_path(user)
-
click_link 'Cancel'
-
refute_content page, 'Metropolitan Area Planning Council'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class PendingEditsTest < Capybara::Rails::TestCase
-
-
1
def user
-
3
@_user ||= users :normal
-
3
@_user.password = 'password'
-
3
@_user
-
end
-
-
1
def setup
-
3
sign_in user, visit: true, submit: true
-
visit development_path(developments(:one))
-
assert_content page, 'Godfrey Hotel'
-
click_link 'Moderate'
-
end
-
-
1
test 'view pending edits' do
-
['Proposed changes to', 'Decline', 'Approve'].each { |content|
-
assert_content page, content
-
}
-
assert_content 'changed Commercial Square Feet'
-
end
-
-
1
test 'approve edit' do
-
click_link 'Approve'
-
assert_content 'approved' # in the flash
-
refute_content 'changed Commercial Square Feet from 12 to 1000'
-
end
-
-
1
test 'decline edit' do
-
click_link 'Decline'
-
assert_content 'declined' # in the flash
-
refute_content 'changed Commercial Square Feet from 12 to 1000'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class SubscribeToSubscribablesTest < Capybara::Rails::TestCase
-
-
1
def user
-
2
@_user ||= users :normal
-
2
@_user.password = 'password'
-
2
@_user
-
end
-
-
1
def development
-
@_development ||= developments(:two)
-
end
-
-
1
def setup
-
2
sign_in user, visit: true, submit: true
-
visit development_path(development)
-
end
-
-
1
test 'without subscription' do
-
skip
-
assert_content page, 'Hello' # development name
-
assert_content page, 'Watch'
-
end
-
-
1
test 'subscribe' do
-
skip 'no subscribing'
-
assert_content find('#watchers'), '0'
-
click_button 'Watch'
-
assert_content find('#watchers'), '1'
-
# visit user page, see subscription
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class ViewDevelopmentTest < Capybara::Rails::TestCase
-
-
1
def development
-
6
@_development ||= developments(:one)
-
end
-
-
1
def out_of_date
-
1
Time.stub :current, Time.at(0) do
-
1
development.update_attribute :updated_at, 7.months.ago
-
end
-
1
development.save!
-
1
development
-
end
-
-
1
def setup
-
2
visit development_path(development)
-
end
-
-
1
test 'content there' do
-
1
assert_content page, development.name
-
end
-
-
1
test 'out of date' do
-
1
visit development_path(out_of_date)
-
1
assert_content page, 'Help keep this page up to date'
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class FormTest < ActiveSupport::TestCase
-
-
1
def form
-
3
@_form ||= Form.new
-
end
-
-
1
test 'valid' do
-
1
assert form.valid?
-
end
-
-
1
test 'save raises error' do
-
2
assert_raises(NotImplementedError) { form.save }
-
end
-
-
1
test 'not persisted' do
-
1
refute form.persisted?
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DigestJobTest < ActiveSupport::TestCase
-
-
1
def weekly_job
-
4
@_wj ||= DigestJob.new
-
end
-
-
1
alias_method :job, :weekly_job
-
-
1
def daily_job
-
2
@_dj ||= DigestJob.new(:daily)
-
end
-
-
1
def user
-
13
@_u ||= users(:tim)
-
end
-
-
1
test 'default frequency weekly' do
-
1
assert_equal :weekly, job.frequency
-
end
-
-
1
test 'daily job has daily frequency' do
-
1
assert_equal :daily, daily_job.frequency
-
end
-
-
1
test 'not included in weekly users when checked just now' do
-
1
user.update_attribute(:last_checked_subscriptions, Time.zone.now)
-
1
user.update_attribute(:mail_frequency, :weekly)
-
1
refute_includes weekly_job.users, user,
-
"#{user.id} should not be in wk #{weekly_job.users.map(&:id)}"
-
end
-
-
1
test 'not included in daily users when checked just now' do
-
1
skip 'come back to this'
-
user.update_attribute(:last_checked_subscriptions, Time.zone.now)
-
user.update_attribute(:mail_frequency, :daily)
-
expected = daily_job.users
-
refute_includes expected, user,
-
"#{user.id} should not be in daily #{expected.map(&:id)}"
-
end
-
-
1
test 'included in weekly, with buffer' do
-
1
user.update_attribute :mail_frequency, :weekly
-
1
user.update_attribute :last_checked_subscriptions,
-
1.week.ago + 4.hours
-
1
assert_includes weekly_job.users, user
-
end
-
-
1
test 'included in daily, with buffer' do
-
1
user.update_attribute :mail_frequency, :daily
-
1
user.update_attribute :last_checked_subscriptions, 20.hours.ago
-
1
assert_includes daily_job.users, user
-
end
-
-
1
test 'never job can never perform' do
-
1
user.update_attribute :mail_frequency, :never
-
1
user.update_attribute :last_checked_subscriptions, 20.hours.ago
-
1
refute_includes DigestJob.new(:never).users, user
-
end
-
-
1
test 'raises when wrong frequency' do
-
2
assert_raises { DigestJob.new(:milennially) }
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
require 'api_version'
-
-
1
class APIVersionTest < ActiveSupport::TestCase
-
-
1
def v1
-
3
@_v1 ||= APIVersion.new(version: 1)
-
end
-
-
1
def v2
-
3
@_v2 ||= APIVersion.new(version: 2, default: true)
-
end
-
-
1
def request_v1
-
@_r1 ||= OpenStruct.new(headers: {
-
'Accept' => 'application/vnd.api+json; application/org.dd.v1+json'
-
})
-
end
-
-
1
def request_v2
-
@_r2 ||= OpenStruct.new(headers: {
-
'Accept' => 'application/vnd.api+json; application/org.dd.v2+json'
-
})
-
end
-
-
1
def request_no_version
-
@_rno ||= OpenStruct.new(headers: {
-
'Accept' => 'application/vnd.api+json;'
-
})
-
end
-
-
1
test 'version' do
-
1
assert_equal 1, v1.version
-
1
assert_equal 2, v2.version
-
end
-
-
1
test 'default' do
-
1
refute v1.default
-
1
assert v2.default
-
end
-
-
1
test 'matches v1' do
-
1
expected_v1 = { module: 'V1',
-
header: {
-
name: 'Accept',
-
value: 'application/vnd.api+json; application/org.dd.v1'
-
},
-
parameter: { name: 'version', value: '1' },
-
default: false
-
}
-
1
assert_equal expected_v1, v1.params
-
end
-
-
1
test 'matches v2' do
-
1
expected_v2 = { module: 'V2',
-
header: {
-
name: 'Accept',
-
value: 'application/vnd.api+json; application/org.dd.v2'
-
},
-
parameter: { name: 'version', value: '2' },
-
default: true
-
}
-
1
assert_equal expected_v2, v2.params
-
end
-
end
-
1
require 'test_helper'
-
-
1
require 'development_converter'
-
-
1
class DevelopmentConverterTest < ActiveSupport::TestCase
-
-
1
def setup
-
6
stub_geocoder
-
end
-
-
1
def development
-
@_development ||= Development.new(
-
DevelopmentConverter.new(row).to_h
-
20
)
-
end
-
-
1
def row
-
7
CSV.read(fixture_file, headers: true, converters: :all).first
-
end
-
-
1
alias_method :d, :development
-
-
1
def test_development_valid
-
1
assert development.valid?, development.errors.full_messages
-
end
-
-
1
def test_lat_lon
-
1
assert_equal 'POINT(-71.0462 42.4122999999998)', row['location']
-
1
assert_equal [-71.0462, 42.4122999999998], DevelopmentConverter.new(row).location
-
1
assert_equal 42.4123, development.latitude.to_f
-
1
assert_equal -71.0462, development.longitude.to_f
-
end
-
-
1
def test_convert_floor_areas
-
1
expected = {
-
fa_ret: 50,
-
fa_ofcmd: 100,
-
fa_indmf: 150,
-
fa_whs: 200,
-
fa_rnd: 220,
-
fa_edinst: 280,
-
fa_other: 0
-
}
-
1
assert_hash expected
-
end
-
-
1
def test_location
-
1
expected = {
-
latitude: 42.4123,
-
longitude: -71.0462,
-
street_view_latitude: 42.4123,
-
street_view_longitude: -71.0462,
-
street_view_heading: 0,
-
street_view_pitch: 35
-
}
-
1
assert_hash_float expected
-
end
-
-
1
def test_updated_timestamp_persists
-
1
stub_street_view
-
1
stub_walkscore lat: 42.4123, lon: -71.0462
-
1
stub_mbta lat: 42.4123, lon: -71.0462
-
1
assert 1.minute.ago > d.updated_at
-
1
d.save!
-
1
assert 1.minute.ago > d.updated_at
-
end
-
-
1
def test_convert_from_csv
-
1
skip 'failing'
-
CSV.foreach(fixture_file, headers: true, converters: :all) do |row|
-
loc = row['location'].delete('POINT(').delete(')').split(' ')
-
lat = loc.last
-
lon = loc.first
-
stub_geocoder(lat: lat, lon: lon)
-
dev = Development.new(DevelopmentConverter.new(row).to_h)
-
assert dev.valid?, dev.errors.full_messages
-
end
-
end
-
-
1
private
-
-
1
def fixture_file
-
7
'./test/fixtures/csvs/developments.csv'
-
end
-
-
1
def assert_hash(hash)
-
1
hash.each_pair do |key, expected_value|
-
7
assert_equal expected_value, d.send(key)
-
end
-
end
-
-
1
def assert_hash_float(hash)
-
1
hash.each_pair do |key, expected_value|
-
6
assert_equal expected_value, d.send(key).to_f
-
end
-
end
-
-
1
def stub_geocoder(lat: 42.4122999999998, lon: -71.0462)
-
stub_request(:get, "http://maps.googleapis.com/maps/api/geocode/json?language=en&latlng=#{lat},#{lon}&sensor=false").
-
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}).
-
6
to_return(
-
:status => 200,
-
:body => File.read('./test/fixtures/geocoder/200.json'),
-
:headers => {'Content-Type' => 'application/json'}
-
)
-
end
-
-
1
def stub_street_view
-
1
stub_request(:get, "http://maps.googleapis.com/maps/api/streetview?fov=100&heading=0&key=loLOLol&location=42.4123,-71.0462&pitch=35&size=600x600")
-
end
-
-
1
def stub_walkscore(lat: 42.000001, lon: -71.000001)
-
1
file = File.read('test/fixtures/walkscore/200.json')
-
stub_request(:get, "http://api.walkscore.com/score?format=json&lat=#{lat}&lon=#{lon}&wsapikey=").
-
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'api.walkscore.com', 'User-Agent'=>'Ruby'}).
-
1
to_return(:status => 200, :body => file)
-
end
-
-
1
def stub_mbta(lat: 42.000001, lon: 71.000001)
-
1
file = File.read('test/fixtures/mbta/stopsbylocation.json')
-
stub_request(:get, "http://realtime.mbta.com/developer/api/v2/stopsbylocation?api_key=&format=json&lat=#{lat}&lon=#{lon}")
-
1
.to_return(status: 200, body: file)
-
end
-
-
-
end
-
1
require 'test_helper'
-
1
require 'employment_estimator'
-
-
1
class EmploymentEstimatorTest < ActiveSupport::TestCase
-
-
1
def estimator
-
2
@_estimator ||= EmploymentEstimator.new(subject)
-
end
-
-
1
def subject
-
2
@_subject ||= Development.new(fa_ret: 750)
-
end
-
-
1
def test_breakdown
-
1
breakdown = { fa_ret: 1 }
-
1
assert_equal breakdown, estimator.breakdown
-
end
-
-
1
def test_perform
-
1
assert_equal 1, estimator.estimate
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class JSONAPITest < ActiveSupport::TestCase
-
-
1
def setup
-
4
@base_url = 'http://example.com'
-
4
@route_formatter = JSONAPI.configuration.route_formatter
-
4
@search = searches(:exact)
-
end
-
-
1
class MockResource < JSONAPI::Resource
-
end
-
-
1
def resource
-
23
MockResource
-
end
-
-
1
def filters
-
18
resource.filters
-
end
-
-
1
test 'route without /api in path' do
-
1
primary_resource_klass = API::V1::SearchResource
-
-
1
config = {
-
base_url: @base_url,
-
route_formatter: @route_formatter,
-
primary_resource_klass: primary_resource_klass,
-
}
-
-
1
builder = JSONAPI::LinkBuilder.new(config)
-
1
source = primary_resource_klass.new(@search, nil)
-
1
expected_link = "#{@base_url}/searches/#{source.id}"
-
-
1
assert_equal expected_link, builder.self_link(source)
-
end
-
-
1
test '#range_filters' do
-
7
range_filter_names.each { |f| refute_includes filters, f }
-
1
resource.range_filter(range_filter_names.first)
-
1
resource.range_filters(range_filter_names)
-
7
range_filter_names.each { |f| assert_includes filters, f }
-
end
-
-
1
test '#boolean_filters' do
-
4
boolean_filter_names.each { |f| refute_includes filters, f }
-
1
resource.boolean_filters(boolean_filter_names)
-
4
boolean_filter_names.each { |f| assert_includes filters, f }
-
end
-
-
1
test 'singular aliases' do
-
1
assert_respond_to resource, :range_filter
-
1
assert_respond_to resource, :boolean_filter
-
end
-
-
1
def range_filter_names
-
4
%i( sample filter names for ranged scopes )
-
end
-
-
1
def boolean_filter_names
-
3
%i( several boolean attributes )
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class PeriscopeTest < ActiveSupport::TestCase
-
-
1
def klass
-
15
Development
-
end
-
-
1
test 'ranged_scopes' do
-
1
assert_respond_to klass, :ranged_scopes
-
1
assert_respond_to klass, :ranged_scope
-
-
1
refute_respond_to klass, :attr_to_scope
-
1
klass.ranged_scopes(:attr_to_scope)
-
1
assert_respond_to klass, :attr_to_scope
-
2
assert_nothing_raised { klass.periscope(attr_to_scope: [0, 100]) }
-
end
-
-
1
test 'boolean scopes' do
-
1
assert_respond_to klass, :boolean_scopes
-
1
assert_respond_to klass, :boolean_scope
-
-
1
refute_respond_to klass, :bool_to_scope
-
1
klass.boolean_scopes(:bool_to_scope)
-
1
assert_respond_to klass, :bool_to_scope
-
-
1
assert_equal true_sql, klass.periscope(bool_to_scope: :true).to_sql
-
1
assert_equal false_nil_sql, klass.periscope(bool_to_scope: 'false').to_sql
-
1
assert_equal false_nil_sql, klass.periscope(bool_to_scope: :nil).to_sql
-
1
assert_equal false_nil_sql, klass.periscope(bool_to_scope: nil).to_sql
-
end
-
-
1
private
-
-
1
def true_sql
-
1
"SELECT \"developments\".* FROM \"developments\" WHERE \"developments\".\"bool_to_scope\" = 't'"
-
end
-
-
1
def false_nil_sql
-
3
"SELECT \"developments\".* FROM \"developments\" WHERE (\"developments\".\"bool_to_scope\" = 'f' OR \"developments\".\"bool_to_scope\" IS NULL)"
-
end
-
-
end
-
1
require 'test_helper'
-
1
require 'range_parser'
-
-
1
class RangeParserTest < ActiveSupport::TestCase
-
-
1
test 'parses array' do
-
1
assert_equal (1..3), RangeParser.parse([1,3])
-
1
assert_equal (0.1..0.33), RangeParser.parse([0.1,0.33])
-
end
-
-
1
test 'parses array of strings' do
-
1
assert_equal (1..3), RangeParser.parse(['1', '3'])
-
1
assert_equal (0.1..0.33), RangeParser.parse(['0.1', '0.33'])
-
end
-
-
1
test 'parses string of array' do
-
1
assert_equal (1..3), RangeParser.parse('[1,3]')
-
1
assert_equal (11..13), RangeParser.parse('[11,13]')
-
1
assert_equal (0.1..0.33), RangeParser.parse('[0.1,0.33]')
-
end
-
-
1
test 'parses string of array with space' do
-
1
assert_equal (1..3), RangeParser.parse('[1, 3]')
-
1
assert_equal (0.1..0.33), RangeParser.parse('[0.1, 0.33]')
-
end
-
-
1
test 'parses comma-separated string' do
-
1
assert_equal (1..3), RangeParser.parse('1,3')
-
1
assert_equal (0.1..0.33), RangeParser.parse('0.1,0.33')
-
end
-
-
1
test 'parses comma-separated string with spaces' do
-
1
assert_equal (1..3), RangeParser.parse('1 , 3')
-
1
assert_equal (0.1..0.33), RangeParser.parse('0.1 , 0.33')
-
end
-
-
1
test 'parses confused format from JSONAPI' do
-
1
value = ["[11", "13]"]
-
1
assert_equal (11..13), RangeParser.parse(value)
-
end
-
-
1
test 'parses string of array of strings' do
-
2
assert_nothing_raised { RangeParser.parse('["1", "3"]') }
-
1
assert_equal (1..3), RangeParser.parse("['1', '3']")
-
1
assert_equal (1..3), RangeParser.parse('["1", "3"]')
-
1
assert_equal (0.1..0.33), RangeParser.parse('["0.1", "0.33"]')
-
end
-
-
1
test 'parses empty string' do
-
1
['', nil, []].each { |e|
-
3
assert_equal infinity, RangeParser.parse(e)
-
}
-
end
-
-
1
def infinity
-
3
(-Float::INFINITY..Float::INFINITY)
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class SubscriptionMailerTest < ActionMailer::TestCase
-
-
1
def user
-
1
@_user ||= users(:normal)
-
1
@_user.last_checked_subscriptions = Time.parse('Friday, 12 Feb 2016')
-
1
@_user
-
end
-
-
1
test 'digest' do
-
1
mail = SubscriptionMailer.digest(user).deliver_now
-
1
assert_not ActionMailer::Base.deliveries.empty?
-
1
expected = 'Development updates since Friday, 12 Feb 2016'
-
1
assert_equal expected, mail.subject
-
1
assert_equal ['mcloyd@mapc.org'], mail.to
-
1
assert_equal ['no-reply@dd.mapc.org'], mail.from
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class APIKeyTest < ActiveSupport::TestCase
-
-
1
def key
-
6
@_key ||= api_keys(:one)
-
end
-
-
1
test 'valid' do
-
1
assert key.valid?
-
end
-
-
1
test 'requires a user' do
-
1
key.user = nil
-
1
refute key.valid?
-
end
-
-
1
test 'token cannot be changed' do
-
1
assert_raises(ActiveRecord::ActiveRecordError) {
-
1
key.update_attribute(:token, '')
-
}
-
end
-
-
1
test '#to_s results in token' do
-
1
assert_equal key.token, key.to_s
-
end
-
end
-
1
require 'test_helper'
-
-
1
class BroadcastTest < ActiveSupport::TestCase
-
# Everyone gets the same notification,
-
# or same general notification with custom variables.
-
1
def broadcast
-
24
@broadcast ||= broadcasts :new_feature
-
end
-
1
alias_method :cast, :broadcast
-
-
1
test 'valid' do
-
1
assert cast.valid?
-
end
-
-
# Requires same fields as Notification / InboxMessage
-
1
test 'requires a subject line' do
-
1
cast.subject = nil
-
1
assert_not cast.valid?
-
end
-
-
1
test 'requires a body' do
-
1
cast.subject = nil
-
1
assert_not cast.valid?
-
end
-
-
1
test 'requires a scheduled time when scheduling' do
-
1
cast.scheduled_for = nil
-
2
assert_raises(StandardError) { cast.schedule! }
-
end
-
-
1
test 'does not require a scope to save' do
-
# is there a Rails query building GUI engine?
-
# or are we just doing SQL inside a "where" bucket?
-
1
cast.scope = 'manager IS NOT NULL'
-
1
assert cast.valid?
-
end
-
-
1
test 'original state is draft' do
-
1
assert_equal 'draft', Broadcast.new.state
-
end
-
-
1
test 'requires a scope to schedule or deliver' do
-
1
cast.scope = nil
-
2
assert_raise { cast.schedule! }
-
2
assert_raise { cast.deliver! }
-
end
-
-
1
test 'requires a date to schedule but not to deliver' do
-
1
cast.scheduled_for = nil
-
2
assert_raises(StandardError) { cast.schedule! }
-
2
assert_nothing_raised { cast.deliver! }
-
end
-
-
1
test 'requires a scope that returns > 0 records' do
-
1
cast.scope = 'id IS NULL'
-
1
assert_not cast.deliverable?
-
1
assert_not cast.schedulable?
-
end
-
-
1
test 'state predicates' do
-
1
[:draft?, :scheduled?, :delivered?].each { |method|
-
3
assert_respond_to cast, method
-
}
-
end
-
-
1
test 'requires a scope that does not unscope' do
-
# i.e. builds off of default scope
-
# I don't think they can unscope if we're throwing this
-
# in a where clause.
-
1
skip
-
end
-
-
1
test 'calculates count of affected users' do
-
end
-
-
1
test 'deliver' do
-
1
skip 'No mail yet.'
-
assert_difference 'ActionMailer::Base.deliveries.size', +1 do
-
broadcast.deliver!
-
end
-
assert_equal 'delivered', broadcast.state
-
end
-
-
1
test '#schedule!' do
-
# TODO: assert_no_difference in the background job queue count
-
1
broadcast.scheduled_for = 10.days.from_now
-
1
broadcast.schedule!
-
1
assert_equal 'scheduled', broadcast.state
-
end
-
-
1
test 'cannot reschedule a delivered message' do
-
1
skip 'Not yet implemented.'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class ClaimTest < ActiveSupport::TestCase
-
-
1
def user
-
11
@user ||= users :normal
-
end
-
1
alias_method :claimant, :user
-
-
1
def development
-
11
@development ||= developments :one
-
end
-
-
1
def moderator
-
4
@moderator ||= users :moderator
-
end
-
-
1
def claim
-
@claim ||= Claim.new(
-
development: development,
-
claimant: claimant,
-
role: :developer
-
22
)
-
end
-
1
alias_method :c, :claim
-
-
1
def moderated_claim
-
@moderated_claim ||= Claim.new(
-
development: development,
-
claimant: claimant,
-
moderator: moderator
-
10
)
-
end
-
1
alias_method :mc, :moderated_claim
-
-
1
test 'valid' do
-
1
assert claim.valid?
-
end
-
-
1
test 'requires a claimant (user)' do
-
1
claim.claimant = nil
-
1
assert_not claim.valid?
-
end
-
-
1
test 'requires a development' do
-
1
claim.development = nil
-
1
assert_not claim.valid?
-
end
-
-
1
test 'default state is pending' do
-
1
assert_equal 'pending', Claim.new.state
-
end
-
-
1
test 'state predicates' do
-
1
[:pending?, :approved?, :denied?].each { |method|
-
3
assert_respond_to claim, method
-
}
-
end
-
-
1
test 'approval' do
-
1
moderated_claim.approve!
-
1
assert_equal 'approved', moderated_claim.state
-
1
assert_equal nil, moderated_claim.reason
-
end
-
-
1
test 'approval can take a reason hash' do
-
1
mc.approve! reason: "Message"
-
1
assert_equal 'approved', mc.state
-
1
assert_equal mc.reason, "Message"
-
end
-
-
1
test 'denial with a hash message' do
-
1
message = "Reason for deny."
-
1
mc.deny! reason: message
-
1
assert_equal 'denied', mc.state
-
1
assert_equal message, mc.reason
-
end
-
-
1
test 'denial requires a reason' do
-
2
assert_raises(StandardError) { mc.deny! }
-
end
-
-
1
test 'approval requires a moderator' do
-
2
assert_raises(ArgumentError) { claim.approve!(moderator: nil) }
-
2
assert_raises(ArgumentError) { claim.approve!(blerg: :blarg) }
-
end
-
-
1
test 'requires a role' do
-
1
claim.role = ' '
-
1
assert_not claim.valid?
-
1
claim.role = nil
-
1
assert_not claim.valid?
-
end
-
-
1
test 'requires a valid role' do
-
1
[:developer, :owner].each do |role|
-
2
claim.role = role
-
2
assert claim.valid?
-
end
-
1
[:blerg, :blarg].each do |role|
-
2
claim.role = role
-
2
assert_not claim.valid?
-
end
-
end
-
-
# Needing so many collaboratiors suggests the need for
-
# service objects like Claim::Approval and Claim::Denial
-
1
test 'user cannot moderate their own claim unless admin' do
-
1
skip '''
-
Expecting this to fail because we have not yet implemented
-
roles like :admin that would help this pass.
-
'''
-
assert_raises(StandardError) {
-
claim.approve! moderator: claimant
-
}
-
claimant.update_attribute(:moderator, true)
-
assert_raises(StandardError) {
-
claim.approve! moderator: claimant
-
}
-
assert_nothing_raised {
-
claim.approve! moderator: admin
-
}
-
end
-
end
-
1
require 'test_helper'
-
-
1
class CrosswalkTest < ActiveSupport::TestCase
-
1
def crosswalk
-
10
@crosswalk ||= crosswalks :one_mapc
-
end
-
1
alias_method :walk, :crosswalk
-
-
1
test 'valid' do
-
1
assert crosswalk.valid?
-
end
-
-
1
test 'requires an organization' do
-
1
crosswalk.organization = nil
-
1
assert_not crosswalk.valid?
-
end
-
-
1
test 'requires an development' do
-
1
crosswalk.development = nil
-
1
assert_not crosswalk.valid?
-
end
-
-
1
test 'requires an internal ID' do
-
1
crosswalk.internal_id = " "
-
1
assert_not crosswalk.valid?
-
end
-
-
1
test 'generates a link if the organization has a template' do
-
1
crosswalk.organization.url_template = "http://mapc.org/projects/{id}"
-
1
expected = "http://mapc.org/projects/MAPC-1"
-
1
assert_equal expected, crosswalk.url
-
end
-
-
1
test 'generates nil link otherwise' do
-
1
assert_nil crosswalk.url
-
end
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentTeamMembershipTest < ActiveSupport::TestCase
-
1
def membership
-
28
@membership ||= development_team_memberships :one
-
end
-
-
1
alias_method :m, :membership
-
-
1
test 'valid' do
-
1
assert m.valid?
-
end
-
-
1
test 'requires an organization' do
-
1
m.organization = nil
-
1
assert_not m.valid?
-
end
-
-
1
test 'requires a development' do
-
1
m.development = nil
-
1
assert_not m.valid?
-
end
-
-
1
test 'response to a role' do
-
1
assert_respond_to m, :role
-
end
-
-
1
test 'valid roles' do
-
1
roles = [:developer, :architect, :engineer,
-
:contractor, :landlord, :owner]
-
1
roles.each do |role|
-
6
m.role = role
-
6
assert m.valid?
-
end
-
end
-
-
1
test 'invalid roles' do
-
1
m.role = "blerg"
-
1
assert_not m.valid?
-
end
-
-
1
test 'role predicates' do
-
1
roles = [:developer?, :architect?, :engineer?,
-
:contractor?, :landlord?, :owner?]
-
7
roles.each { |role| assert_respond_to m, role }
-
end
-
-
1
test 'role order' do
-
1
roles = DevelopmentTeamMembership.role.values
-
1
assert_equal 'developer', roles.first
-
1
assert_equal 'designer', roles.last
-
end
-
-
1
test 'role order in database' do
-
1
klass = DevelopmentTeamMembership
-
-
1
klass.destroy_all
-
1
klass.new(role: :owner).save(validate: false)
-
1
klass.new(role: :architect).save(validate: false)
-
-
1
first_role = klass.order(:role).first.role
-
1
last_role = klass.order(role: :desc).first.role
-
1
assert_equal 'architect', first_role
-
1
assert_equal 'owner', last_role
-
end
-
-
1
test 'requires a role' do
-
1
m.role = nil
-
1
assert_not m.valid?
-
end
-
-
1
test 'membership needs to be unique in terms of role' do
-
1
dev = developments(:one)
-
1
org = organizations(:mapc)
-
1
role = :architect
-
-
1
new_mem = DevelopmentTeamMembership.new(development: dev, organization: org, role: role)
-
1
dupe = new_mem.dup
-
-
1
new_mem.save!
-
1
refute dupe.valid?
-
1
dupe.role = :designer
-
1
assert dupe.valid?, dupe.errors.full_messages
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentTest < ActiveSupport::TestCase
-
-
1
def setup
-
63
stub_street_view
-
63
stub_walkscore
-
63
stub_mbta
-
end
-
-
1
def development
-
359
@development ||= developments :one
-
end
-
-
1
alias_method :d, :development
-
-
1
test 'valid' do
-
1
assert d.valid?, d.errors.full_messages
-
end
-
-
1
test 'requires a creator' do
-
1
d.creator = nil
-
1
assert_not d.valid?
-
end
-
-
1
test 'requires a completion year' do
-
1
d.year_compl = nil
-
1
assert_not d.valid?
-
end
-
-
1
test 'can read attributes from fields, as methods' do
-
2
assert_nothing_raised { d.name }
-
1
assert_equal 'Godfrey Hotel', d.name
-
end
-
-
1
test 'raises NoMethodError when attribute not present' do
-
2
assert_raises(NoMethodError) { d.blerg }
-
end
-
-
1
test 'raises when attribute absent' do
-
1
assert_raises(NoMethodError) {
-
1
d.assign_attributes ov_hupipe_not: 10
-
}
-
end
-
-
1
test 'literal attributes' do
-
%i( affordable asofright cancelled clusteros commsf
-
created_at crosswalks desc emploss estemp fa_edinst
-
fa_hotel fa_indmf fa_ofcmd fa_other fa_ret fa_rnd fa_whs
-
gqpop lgmultifam location mapc_notes onsitepark other_rate
-
ovr55 phased private prjarea project_url rdv
-
rptdemp singfamhu stalled status total_cost tothu
-
twnhsmmult updated_at year_compl stories height
-
1
).each do |attribute|
-
41
assert_respond_to d, attribute
-
end
-
end
-
-
1
test 'cached dynamic attributes' do
-
1
%i( mixed_use ).each do |attribute|
-
1
assert_respond_to d, attribute
-
end
-
end
-
-
# Attributes
-
-
1
test 'accepts 5-digit zip codes' do
-
1
assert_respond_to d, :zip_code
-
1
assert_respond_to d, :zip
-
1
d.zip_code = '02139'
-
end
-
-
1
test 'accepts 9-digit zip codes' do
-
1
d.zip_code = input = '02139-1112'
-
1
d.save!
-
1
assert_equal '021391112', d.read_attribute(:zip_code)
-
1
assert_equal input, d.zip_code
-
end
-
-
# Associations
-
-
1
test 'associations' do
-
# #recent_changes -> presenter
-
%i( contributors creator crosswalks edits flags history
-
parcel team_members
-
team_memberships walkscore programs
-
1
).each do |attribute|
-
11
assert_respond_to d, attribute
-
end
-
end
-
-
1
test '#mixed_use?' do
-
1
assert_respond_to Development.new, :mixed_use?
-
1
assert_respond_to Development.new, :mixed_use
-
1
refute Development.new.mixed_use?
-
1
refute Development.new(tothu: 1).mixed_use?
-
1
refute Development.new(commsf: 1).mixed_use?
-
1
assert Development.new(tothu: 1, commsf: 1).mixed_use?
-
end
-
-
1
test '#mixed_use? saves' do
-
1
stub_street_view lat: 42.3547661, lon: -71.0615689, heading: 0, pitch: 35
-
1
stub_walkscore lat: 0.0, lon: 0.0
-
1
stub_mbta lat: 0.0, lon: 0.0
-
1
dev = Development.new(tothu: 1, commsf: 1)
-
1
assert dev.mixed_use?
-
1
dev.save!(validate: false)
-
1
assert dev.mixed_use?
-
1
dev.tothu = 0
-
1
refute dev.mixed_use?
-
end
-
-
1
test '#edits' do
-
1
d.edits = []
-
1
assert_empty d.edits
-
1
d.edits << Edit.new
-
1
assert_not_empty d.edits
-
end
-
-
1
test '#history' do
-
1
d.edits.new(applied: true).save(validate: false)
-
1
assert_not_empty d.history
-
end
-
-
1
test '#pending' do
-
1
assert_not_empty d.edits.pending
-
end
-
-
1
test '#contributors' do
-
1
user = users :normal
-
1
d.edits.new(editor: user, state: 'applied').save(validate: false)
-
1
assert_includes d.contributors, user
-
end
-
-
1
test '#contributors pulls in unique users' do
-
1
user = users :tim
-
1
3.times {
-
3
d.edits.new(editor: user, state: 'applied').save(validate: false)
-
}
-
1
d.creator = user
-
1
assert_equal 1, d.contributors.count, d.contributors
-
end
-
-
1
test '#contributors does not include unapplied edits' do
-
1
user = users :tim
-
1
d.edits.new(editor: user, state: 'pending').save(validate: false)
-
1
refute_includes d.contributors, user
-
end
-
-
1
test '#team_members' do
-
1
org = organizations :mapc
-
d.team_memberships.new(
-
organization: org, role: :developer
-
1
).save(validate: false)
-
1
assert_includes d.team_members, org
-
end
-
-
1
test '#crosswalks' do
-
1
org = organizations :mapc
-
1
d.crosswalks.new(organization: org, internal_id: '1-1')
-
1
assert_not_empty d.crosswalks
-
end
-
-
1
test '#programs' do
-
1
d.programs << programs(:massworks)
-
1
d.programs << programs(:forty_b)
-
1
assert_equal 2, d.programs.count
-
1
assert_equal 1, d.programs.incentive.count
-
1
assert_equal 1, d.programs.regulatory.count
-
end
-
-
1
test '#status' do
-
1
d.tothu = d.commsf = 0 # Prevent additional info validation
-
1
[:projected, :planning, :in_construction, :completed].each do |status|
-
4
d.status = status
-
4
assert d.valid?, d.errors.full_messages
-
end
-
1
[:built, :solid, :dead, :stalled].each do |status|
-
4
d.status = status
-
4
assert_not d.valid?
-
end
-
end
-
-
1
test 'status predicates' do
-
1
[:projected?, :planning?, :in_construction?, :completed?].each { |method|
-
4
assert_respond_to d, method
-
}
-
end
-
-
1
test 'boolean predicates' do
-
[:private?, :rdv?, :mixed_use?, :asofright?, :ovr55?,
-
1
:clusteros?, :phased?, :stalled?].each do |method|
-
8
assert_respond_to d, method
-
end
-
end
-
-
1
test 'contributors includes creator' do
-
1
creator = users(:normal)
-
# TODO: clear out edits on this development.
-
1
assert d.creator.present?
-
1
assert_includes d.contributors, creator
-
end
-
-
1
test 'if tagline, needs to be short' do
-
1
d.tagline = ''
-
1
assert d.valid?, d.errors.full_messages
-
-
1
invalid_taglines = [
-
'Invalid.',
-
"Value capture compatible uses gridiron modernist tradition facilitate
-
easement street parking storefront state funding vacancy developed world
-
topography disadvantaged unincorporated community Le Corbusier
-
geospatial analysis."
-
]
-
1
invalid_taglines.each do |tagline|
-
2
d.tagline = tagline
-
2
refute d.valid?, "Is length #{tagline.length}"
-
end
-
end
-
-
1
test 'nearby developments' do
-
1
far_dev = developments(:one)
-
1
far_dev.latitude = 40.000000
-
1
far_dev.longitude = -77.000000
-
1
stub_walkscore(lat: far_dev.latitude, lon: far_dev.longitude)
-
1
stub_mbta(lat: far_dev.latitude, lon: far_dev.longitude)
-
1
far_dev.save!
-
-
1
close_dev = developments(:two)
-
1
close_dev.latitude = 39.010000
-
1
close_dev.longitude = -75.990000
-
1
stub_walkscore(lat: close_dev.latitude, lon: close_dev.longitude)
-
1
stub_mbta(lat: close_dev.latitude, lon: close_dev.longitude)
-
1
close_dev.save!
-
-
1
close_devs = Development.close_to(39.000000, -76.000000).load
-
-
1
assert_equal 1, close_devs.size
-
1
assert_equal close_dev, close_devs.first
-
end
-
-
1
test 'location' do
-
1
assert_equal [42.000001, 71.000001], d.location
-
1
assert_equal [71.000001, 42.000001], d.rlocation
-
end
-
-
1
test '#subscriptions' do
-
1
refute_empty d.subscriptions
-
end
-
-
1
test '#subscribers' do
-
1
refute_empty d.subscribers
-
1
assert_includes d.subscribers, users(:normal)
-
end
-
-
1
test 'range scopes, dates' do
-
1
range_scopes = %i( created_at updated_at )
-
3
range_scopes.each { |scope| assert_respond_to Development, scope }
-
end
-
-
1
test 'range scopes, float and integer' do
-
26
ranged_scopes.each { |scope| assert_respond_to Development, scope }
-
end
-
-
-
1
test 'boolean scopes' do
-
9
boolean_scopes.each { |s| assert_respond_to Development, s }
-
end
-
-
1
test 'boolean scope definition' do
-
1
skip
-
assert_equal 1, Development.hidden(true).count
-
assert_equal 1, Development.hidden.count
-
assert_equal 3, Development.hidden(false).count
-
assert_equal Development.hidden(true), Development.hidden
-
refute_equal Development.hidden(true), Development.hidden(false)
-
end
-
-
# These tests and the params methods could stand some refactoring
-
1
test 'periscope' do
-
1
sql = Development.periscope(periscope_params).to_sql
-
33
all_scopes.each { |scope| assert_includes sql, scope.to_s }
-
end
-
-
1
test 'periscope alt' do
-
1
sql = Development.periscope(periscope_params_alt).to_sql
-
33
all_scopes.each { |scope| assert_includes sql, scope.to_s }
-
end
-
-
1
test '#updated_since?' do
-
1
Time.stub :now, Time.new(2001) do
-
1
edit = d.edits.pending.first
-
1
edit.applied
-
1
edit.save
-
end
-
1
assert d.updated_since?(Date.new(2000))
-
end
-
-
1
test '#updated_since? without history' do
-
1
refute d.updated_since?(Date.new(2000))
-
end
-
-
1
test '#history.since' do
-
1
edit = d.edits.pending.first
-
1
Time.stub :now, Time.new(2000, 1, 2) do
-
1
edit.applied
-
1
edit.save
-
end
-
1
assert_equal [edit], d.history.since(Time.new(2000, 1, 1))
-
end
-
-
1
test '#history.since without history' do
-
1
assert_equal [], d.history.since(Time.new(2000, 1, 2))
-
end
-
-
1
test '#place' do
-
1
assert_respond_to d, :place
-
1
city = places(:boston)
-
1
d.place = city
-
1
assert d.place
-
1
assert_equal d.city, d.place
-
end
-
-
1
test '#municipality if assigned a municipality' do
-
1
assert_respond_to d, :municipality
-
1
muni = places(:boston)
-
1
d.place = muni
-
1
assert_equal muni, d.municipality
-
end
-
-
1
test '#municipality if assigned a neighborhood' do
-
1
hood = places(:back_bay)
-
1
d.place = hood
-
1
assert_equal hood.municipality, d.municipality
-
end
-
-
1
test '#neighborhood if assigned a neighborhood' do
-
1
assert_respond_to d, :neighborhood
-
1
hood = places(:back_bay)
-
1
d.place = hood
-
1
assert_equal hood, d.neighborhood
-
end
-
-
1
test '#neighborhood if assigned a municipality' do
-
1
muni = places(:boston)
-
1
d.place = muni
-
1
assert_equal nil, d.neighborhood
-
end
-
-
1
test 'column bounds' do
-
1
expected = column_bound_keys
-
1
actual = Development.ranged_column_bounds.keys
-
1
assert_equal expected, actual
-
end
-
-
1
def column_bound_keys
-
1
[:created_at, :updated_at, :height, :stories, :year_compl, :prjarea,
-
:singfamhu, :twnhsmmult, :lgmultifam, :tothu, :gqpop, :rptdemp,
-
:emploss, :estemp, :commsf, :hotelrms, :onsitepark, :total_cost,
-
:team_membership_count, :fa_ret, :fa_ofcmd, :fa_indmf, :fa_whs,
-
:fa_rnd, :fa_edinst, :fa_other, :fa_hotel, :other_rate, :affordable,
-
:latitude, :longitude]
-
end
-
-
1
def periscope_params
-
1
hash = Hash.new
-
26
ranged_scopes.each { |key| hash[key] = [0,1] }
-
1
hash.merge(mergeable_hash)
-
end
-
-
1
def periscope_params_alt
-
1
hash = Hash.new
-
26
ranged_scopes.each { |key| hash[key] = 1_234 }
-
1
hash.merge(mergeable_hash)
-
end
-
-
1
def mergeable_hash
-
{ rdv: true, asofright: false, phased: 'false', cancelled: true,
-
2
ovr55: nil, clusteros: 'true', stalled: 'NULL', hidden: true }
-
end
-
-
1
def ranged_scopes
-
5
%i( height stories year_compl affordable
-
prjarea singfamhu twnhsmmult lgmultifam tothu gqpop rptdemp
-
emploss estemp commsf hotelrms onsitepark total_cost fa_ret
-
fa_ofcmd fa_indmf fa_whs fa_rnd fa_edinst fa_other fa_hotel )
-
end
-
-
1
def boolean_scopes
-
3
%i(rdv asofright ovr55 clusteros phased stalled cancelled hidden)
-
end
-
-
1
def all_scopes
-
2
array = [ranged_scopes, boolean_scopes].flatten
-
2
array.delete(:hidden) # Ignores hidden because of the alias, for now.
-
2
array
-
end
-
-
1
test 'street view' do
-
1
assert_respond_to development, :street_view
-
1
assert_respond_to development.street_view, :url
-
1
assert_respond_to development.street_view, :image
-
end
-
-
1
test 'cache street view' do
-
1
stub_street_view
-
1
assert_difference 'development.street_view_image.size', 21904 do
-
1
development.update_attributes street_view_attrs
-
end
-
end
-
-
1
def street_view_attrs
-
1
{ street_view_heading: 0, street_view_pitch: 11 }
-
end
-
-
1
test 'cache walk score' do
-
1
skip
-
assert_respond_to development, :walkscore
-
attrs = { 'id' => nil, street_view_heading: 0, street_view_pitch: 11 }
-
dev = Development.new(d.attributes.merge(attrs))
-
assert_empty dev.walkscore
-
dev.save!
-
assert_equal 98, dev.walkscore.score
-
assert_equal "Walker's Paradise", dev.walkscore.to_h['description']
-
end
-
-
1
test 'associate place' do
-
1
stub_walkscore(lat: 0.00)
-
1
stub_mbta lat: 0.0, lon: 71.000001
-
1
place = places(:boston)
-
1
d.place = nil
-
1
Place.stub :contains, [place] do
-
1
d.update_attribute(:latitude, 0.00)
-
end
-
1
assert_equal place, d.place
-
end
-
-
1
test 'associate no place' do
-
1
stub_walkscore(lat: 0.00)
-
1
stub_mbta lat: 0.0, lon: 71.000001
-
1
d.place = nil
-
1
Place.stub :contains, [] do
-
1
d.update_attribute(:latitude, 0.00)
-
end
-
1
assert_equal nil, d.place
-
end
-
-
1
test 'estimates employment' do
-
1
d.estemp = nil
-
1
d.commsf = d.fa_ret = 0
-
1
d.save!
-
1
assert_equal 0, d.estemp
-
1
d.commsf = d.fa_ret = 750
-
1
d.save!
-
1
assert d.estemp > 0
-
end
-
-
1
test 'out of date' do
-
1
development.created_at = 7.months.ago
-
1
development.updated_at = 7.months.ago
-
1
assert development.out_of_date?
-
-
1
opts = {
-
applied: true,
-
applied_at: Time.now,
-
editor: users(:normal),
-
state: :approved,
-
moderated_at: Time.now
-
}
-
1
development.edits.create!(opts)
-
1
refute development.out_of_date?
-
end
-
-
1
test 'requires housing units and commercial square feet' do
-
1
d.tothu = d.commsf = nil
-
1
refute d.valid?
-
1
d.tothu = d.commsf = 0
-
1
assert d.valid?, d.errors.full_messages
-
end
-
-
1
test 'requires extra housing information' do
-
# If it's in construction or completed, and there's more than
-
# one housing unit, require extra housing information.
-
1
housing_fields = [:singfamhu, :twnhsmmult, :lgmultifam, :gqpop]
-
-
1
[:in_construction, :completed].each do |status|
-
2
d.status = status
-
2
d.tothu = 1
-
2
d.commsf = 0
-
10
housing_fields.each { |attrib| d.send("#{attrib}=", nil) }
-
2
refute d.valid?
-
10
housing_fields.each { |attrib| d.send("#{attrib}=", 0) }
-
2
d.singfamhu = 1 # for sum validation
-
2
assert d.valid?, d.errors.full_messages
-
end
-
-
1
[:in_construction, :completed].each do |status|
-
2
d.status = status
-
2
d.tothu = d.commsf = 0
-
10
housing_fields.each { |attrib| d.send("#{attrib}=", nil) }
-
2
assert d.valid?, d.errors.full_messages
-
end
-
end
-
-
1
test 'requires extra nonres information if in_construction or completed' do
-
1
nonres_fields = [
-
:fa_ret, :fa_ofcmd, :fa_indmf,
-
:fa_whs, :fa_rnd, :fa_edinst,
-
:fa_other, :fa_hotel
-
]
-
-
1
[:in_construction, :completed].each do |status|
-
2
d.status = status
-
2
d.tothu = 0
-
2
d.commsf = 1
-
18
nonres_fields.each { |attrib| d.send("#{attrib}=", nil) }
-
2
refute d.valid?
-
18
nonres_fields.each { |attrib| d.send("#{attrib}=", 0) }
-
2
d.fa_ret = 1 # For sum validation
-
2
assert d.valid?, d.errors.full_messages
-
end
-
-
1
[:in_construction, :completed].each do |status|
-
2
d.status = status
-
2
d.tothu = d.commsf = 0
-
18
nonres_fields.each { |attrib| d.send("#{attrib}=", nil) }
-
2
assert d.valid?, d.errors.full_messages
-
end
-
end
-
-
1
test 'housing units must add up' do
-
1
d.status = :in_construction
-
1
d.tothu = 100
-
1
d.commsf = d.gqpop = 0
-
1
d.singfamhu = d.twnhsmmult = d.lgmultifam = 0
-
1
refute d.valid?
-
1
d.singfamhu = 100
-
1
assert d.valid?, d.errors.full_messages
-
1
d.singfamhu = d.twnhsmmult = 25
-
1
d.lgmultifam = 50
-
1
assert d.valid?, d.errors.full_messages
-
end
-
-
1
test 'commercial square feet must add up' do
-
1
d.status = :in_construction
-
1
d.tothu = 0
-
1
d.commsf = 1000
-
-
1
d.fa_ret = 0
-
1
d.fa_ofcmd = 0
-
1
d.fa_indmf = 0
-
1
d.fa_whs = 0
-
1
d.fa_rnd = 0
-
1
d.fa_edinst = 0
-
1
d.fa_other = 0
-
1
d.fa_hotel = 0
-
-
1
refute d.valid?
-
1
d.fa_ret = 1000
-
1
assert d.valid?, d.errors.full_messages
-
1
d.fa_ret = d.fa_ofcmd = d.fa_hotel = d.fa_other = 250
-
1
assert d.valid?, d.errors.full_messages
-
end
-
-
1
test 'nearest transit station' do
-
1
d.latitude_will_change! # This prompts an update.
-
1
d.save
-
1
assert_respond_to d, :nearest_transit
-
1
assert_equal d.nearest_transit, 'Boylston'
-
end
-
-
1
test 'infer project type' do
-
1
skip
-
end
-
-
1
test 'applied edits result in contributors' do
-
1
skip
-
end
-
-
1
test 'description' do
-
1
skip
-
end
-
-
-
1
private
-
-
1
def stub_street_view(lat: 42.000001, lon: 71.000001, heading: 0, pitch: 11)
-
65
file = ActiveRecord::FixtureSet.file('street_view/godfrey.jpg')
-
stub_request(:get, "http://maps.googleapis.com/maps/api/streetview?fov=100&heading=#{heading}&key=loLOLol&location=#{lat},#{lon}&pitch=#{pitch}&size=600x600").
-
65
to_return(status: 200, body: file)
-
end
-
-
1
def stub_walkscore(lat: 42.000001, lon: 71.000001)
-
68
file = File.read('test/fixtures/walkscore/200.json')
-
stub_request(:get, "http://api.walkscore.com/score?format=json&lat=#{lat}&lon=#{lon}&wsapikey=").
-
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'api.walkscore.com', 'User-Agent'=>'Ruby'}).
-
68
to_return(:status => 200, :body => file)
-
end
-
-
1
def stub_mbta(lat: 42.000001, lon: 71.000001)
-
68
file = File.read('test/fixtures/mbta/stopsbylocation.json')
-
stub_request(:get, "http://realtime.mbta.com/developer/api/v2/stopsbylocation?api_key=&format=json&lat=#{lat}&lon=#{lon}")
-
68
.to_return(status: 200, body: file)
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class EditTest < ActiveSupport::TestCase
-
1
def edit
-
40
@edit ||= edits :one
-
end
-
-
1
def development
-
@development ||= developments :one
-
end
-
1
alias_method :project, :development
-
-
1
test 'valid' do
-
1
assert edit.valid?
-
end
-
-
1
test 'defaults to status :pending' do
-
1
assert_equal 'pending', Edit.new.state
-
end
-
-
1
test 'requires a development' do
-
1
edit.development = nil
-
1
assert_not edit.valid?
-
end
-
-
1
test 'requires an editor (user)' do
-
1
edit.editor = nil
-
1
assert_not edit.valid?
-
end
-
-
1
test 'edited #fields' do
-
1
assert_respond_to edit, :fields
-
end
-
-
1
test 'requires a state' do
-
1
edit.state = nil
-
1
assert_not edit.valid?
-
1
edit.state = :blerg
-
1
assert_not edit.valid?
-
end
-
-
1
test 'requires a log message' do
-
1
edit.log_entry = ''
-
1
assert_not edit.valid?
-
edit.log_entry = 'a' * 24
-
assert_not edit.valid?
-
edit.log_entry = 'a' * 2001
-
assert_not edit.valid?
-
edit.log_entry = 'a' * 257
-
assert edit.valid?
-
end
-
-
1
test 'state predicates' do
-
1
[:pending?, :applied?].each { |method|
-
2
assert_respond_to edit, method
-
}
-
end
-
-
1
test '#conflict' do
-
1
assert_empty edit.conflict
-
1
edit.development.commsf = 13
-
1
refute_empty edit.conflict
-
end
-
-
1
test '#conflict?' do
-
1
refute edit.conflict?
-
1
edit.development.commsf = 13
-
1
assert edit.conflict?
-
end
-
-
1
test '#applyable' do
-
1
assert edit.applyable?, [edit.inspect, edit.conflict?]
-
end
-
-
1
test 'approved' do
-
1
assert_respond_to edit, :approved
-
1
refute edit.moderated_at
-
1
edit.approved
-
1
assert_equal 'approved', edit.state
-
# assert_equal 'approved', edit.reload.state
-
1
assert edit.moderated_at
-
end
-
-
1
test 'declined' do
-
1
assert_respond_to edit, :declined
-
1
refute edit.moderated_at
-
1
edit.declined
-
1
assert_equal 'declined', edit.state
-
# assert_equal 'declined', edit.reload.state
-
1
assert edit.moderated_at
-
end
-
-
1
test 'moderated' do
-
1
refute edit.moderated?
-
1
edit.declined
-
1
assert edit.moderated?
-
end
-
-
1
test 'moderatable?' do
-
1
assert edit.moderatable?, edit.inspect
-
1
edit.declined
-
1
refute edit.moderatable?
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class FieldEditTest < ActiveSupport::TestCase
-
1
def field_edit
-
35
@_field_edit = field_edits :one
-
end
-
1
alias_method :field, :field_edit
-
-
1
test 'valid' do
-
1
assert field.valid?, field.errors.full_messages
-
end
-
-
1
test 'requires a name' do
-
1
field.name = nil
-
1
assert_not field.valid?
-
end
-
-
1
test 'requires a name in Development attributes' do
-
1
field.name = 'blerg'
-
1
assert_not field.valid?
-
end
-
-
1
test 'requires an edit' do
-
1
field.edit = nil
-
1
assert_not field.valid?
-
end
-
-
1
test 'requires a change' do
-
1
field.change = nil
-
1
assert_not field.valid?
-
1
field.change = {}
-
1
assert_not field.valid?
-
end
-
-
1
test 'requires a change that has, at least, :to' do
-
-
1
field.change = { from: 100, to: 101 }
-
1
assert field.valid?
-
1
field.change = { to: true }
-
1
assert field.valid?
-
end
-
-
1
test 'change :to a non-nil false value' do
-
1
field.change = { from: true, to: false }
-
1
assert field.valid?
-
1
field.change = { from: nil, to: false }
-
1
assert field.valid?
-
1
field.change = { from: false, to: nil }
-
1
assert_not field.valid?
-
end
-
-
1
test 'change a string to an empty string' do
-
1
skip 'Not yet sure what to do about this.'
-
field.change = { from: 'x', to: '' }
-
assert_not field.valid?
-
end
-
-
1
test 'requires a change that is really a change' do
-
1
field.change = { from: 100, to: 100 }
-
1
assert_not field.valid?
-
1
field.change = { from: 100, to: 101 }
-
1
assert field.valid?
-
end
-
-
1
test '#from' do
-
1
assert_equal 0, field.from
-
end
-
-
1
test '#to' do
-
1
assert_equal 1000, field.to
-
end
-
-
1
test '#development' do
-
1
assert_respond_to field, :development
-
end
-
-
1
test '#conflict' do
-
1
assert_nil field.conflict
-
1
field.development.commsf = 13
-
1
expected = { current: 13, from: 0 }
-
1
assert_equal expected, field.conflict
-
end
-
-
1
test '#conflict?' do
-
1
refute field.conflict?
-
1
field.development.commsf = 13
-
1
assert field.conflict?
-
end
-
end
-
1
require 'test_helper'
-
-
1
class FlagTest < ActiveSupport::TestCase
-
1
def flag
-
25
@flag ||= flags :one
-
end
-
-
1
test 'valid' do
-
1
assert flag.valid?
-
end
-
-
1
test 'requires a flagger' do
-
1
flag.flagger = nil
-
1
refute flag.valid?
-
end
-
-
1
test 'must give a reason of certain length' do
-
1
flag.reason = nil
-
1
refute flag.valid?
-
1
flag.reason = " "
-
1
refute flag.valid?
-
1
flag.reason = "hello is it me you're " # 22
-
1
refute flag.valid?
-
1
flag.reason = 'a' * 500
-
1
refute flag.valid?
-
end
-
-
1
test 'requires a known (not anonymous or null) flagger' do
-
1
u = User.null
-
1
flag.flagger = u
-
1
refute flag.valid?
-
end
-
-
1
test 'requires a development' do
-
1
flag.development = nil
-
1
refute flag.valid?
-
end
-
-
1
test "changes moderator's inbox count" do
-
1
skip 'This is a tangential collaborator and does not belong here.'
-
assert_difference 'flag.development.moderator.first.inbox.count', +1 do
-
flag.save
-
end
-
end
-
-
1
test 'default state is pending' do
-
1
assert_equal 'pending', Flag.new.state
-
end
-
-
1
test 'state predicates' do
-
1
[:pending?, :open?, :resolved?].each { |method|
-
3
assert_respond_to flag, method
-
}
-
end
-
-
1
test '#submitted / flagged' do
-
1
flag.submitted
-
1
assert_equal 'open', flag.state
-
end
-
-
1
test '#resolved' do
-
1
flag.resolver = users(:normal)
-
2
assert_nothing_raised { flag.resolved }
-
1
assert_equal 'resolved', flag.state
-
end
-
-
1
test '#resolved requires a resolver' do
-
1
flag.resolver = nil
-
2
assert_raises(StandardError) { flag.resolved }
-
end
-
end
-
1
require 'test_helper'
-
-
1
class MembershipTest < ActiveSupport::TestCase
-
-
1
def membership
-
14
@membership = memberships :one
-
end
-
1
alias_method :m, :membership
-
-
1
test 'valid' do
-
1
assert m.valid?
-
end
-
-
1
test 'requires a member' do
-
1
m.member = nil
-
1
assert_not m.valid?
-
end
-
-
1
test 'requires an organization' do
-
1
m.organization = nil
-
1
assert_not m.valid?
-
end
-
-
1
test 'defaults to pending' do
-
1
assert_equal 'pending', Membership.new.state
-
end
-
-
1
test 'state predicates' do
-
1
[:pending?, :invited?, :active?, :inactive?, :declined?].each { |method|
-
5
assert_respond_to membership, method
-
}
-
end
-
-
1
test '#invited' do
-
1
assert_equal 'invited', m.invited.state
-
end
-
-
1
test '#activated' do
-
1
assert_equal 'active', m.activated.state
-
end
-
-
1
test '#deactivated' do
-
1
assert_equal 'inactive', m.deactivated.state
-
end
-
-
1
test '#declined' do
-
1
assert_equal 'declined', m.declined.state
-
end
-
-
# I think this belongs in a controller test
-
1
test 'member can leave an organization' do
-
1
skip 'For now'
-
user = m.user
-
org = m.organization
-
-
user.memberships.each(&:activated)
-
assert_not_empty org.active_members
-
-
user.memberships.each(&:deactivated)
-
assert_empty org.active_members
-
end
-
-
# test 'only administrators can promote members' do
-
# skip 'Roles not yet implemented'
-
# end
-
-
# test 'administrators are notified when someone leaves the org' do
-
# skip 'Roles and notifications not yet implemented'
-
# end
-
-
# test 'administrators are notified when someone wants in' do
-
# skip 'email, notification / inbox'
-
# end
-
end
-
1
require 'test_helper'
-
-
1
class MunicipalityTest < ActiveSupport::TestCase
-
-
1
def municipality
-
5
@_muni ||= places(:boston)
-
end
-
-
1
alias_method :muni, :municipality
-
-
1
test 'valid?' do
-
1
assert muni.valid?
-
end
-
-
1
test 'requires a name' do
-
1
muni.name = ' '
-
1
refute muni.valid?
-
end
-
-
1
test 'has neighborhoods' do
-
1
assert_respond_to muni, :neighborhoods
-
1
refute_empty muni.neighborhoods
-
end
-
-
1
test 'geometry' do
-
1
skip 'Add geometry'
-
end
-
-
1
test 'crosswalks / muni id' do
-
1
skip 'Add a way to have muni_id crosswalk'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class NeighborhoodTest < ActiveSupport::TestCase
-
-
1
def neighborhood
-
5
@_hood ||= places(:back_bay)
-
end
-
-
1
alias_method :hood, :neighborhood
-
-
1
test 'valid?' do
-
1
assert hood.valid?
-
end
-
-
1
test 'requires a name' do
-
1
hood.name = ' '
-
1
refute hood.valid?
-
end
-
-
1
test 'has a municipality' do
-
1
assert_respond_to hood, :municipality
-
1
assert hood.municipality
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class OrganizationTest < ActiveSupport::TestCase
-
1
def organization
-
57
@organization ||= organizations :mapc
-
end
-
1
alias_method :org, :organization
-
-
1
test 'valid' do
-
1
assert org.valid?, org.errors.full_messages
-
end
-
-
1
test 'requires a creator' do
-
1
org.creator = nil
-
1
assert_not org.valid?
-
end
-
-
1
test 'creator is an admin' do
-
1
assert_equal org.creator, org.admin
-
end
-
-
1
test 'when created, builds a membership' do
-
1
assert_difference 'Membership.count', +1 do
-
1
Organization.new(creator: users(:tim)).save(validate: false)
-
end
-
end
-
-
1
test 'requires a name' do
-
1
org.name = nil
-
1
assert_not org.valid?
-
end
-
-
1
test 'requires a short name' do
-
1
org.short_name = nil
-
1
assert_not org.valid?
-
end
-
-
1
test 'if email, requires it to be valid' do
-
1
org.email = nil
-
1
assert org.valid?
-
1
org.email = 'mapc.org'
-
1
assert_not org.valid?
-
1
org.email = 'info@mapc.org'
-
1
assert org.valid?
-
end
-
-
1
test 'location' do
-
1
org.location = nil
-
1
assert org.valid?
-
1
org.location = 'BOS MA'
-
1
assert org.valid?
-
1
org.location = 'Boston, MA'
-
1
assert org.valid?
-
end
-
-
1
test 'can accept an abbreviation' do
-
1
org.abbv = nil
-
1
assert org.valid?
-
1
org.abbv = 'NOTNIL'
-
1
assert org.valid?
-
end
-
-
1
test 'does not require a URL' do
-
1
org.website = nil
-
1
assert org.valid?
-
end
-
-
1
test 'requires a URL that exists' do
-
# Read https://www.igvita.com/2006/09/07/validating-url-in-ruby-on-rails/
-
# and http://stackoverflow.com/questions/5908017/check-if-url-exists-in-ruby
-
1
skip
-
org.website = 'https://lo.lllll'
-
assert_not org.valid?
-
org.website = 'http://homestarrunner.com'
-
assert org.valid?
-
end
-
-
1
test 'has a log' do
-
1
skip "
-
Tracks when:
-
- A member invites another member.
-
- An invited member accepts.
-
- A member leaves.
-
- A member is kicked out.
-
"
-
end
-
-
1
test 'can have many members through memberships' do
-
1
org.memberships.create user: users(:normal)
-
1
org.memberships.create user: users(:moderator)
-
1
assert_not_empty org.members
-
end
-
-
1
test '#active_members' do
-
1
org.memberships.create user: users(:normal)
-
1
org.memberships.create user: users(:moderator), state: :active
-
1
assert_equal 2, org.active_members.count # add one for the creator
-
1
assert_includes org.active_members, users(:moderator)
-
end
-
-
1
test 'members can belong to many organizations' do
-
1
user = users :normal # Already a member of MAPC
-
1
massit = organizations :massit
-
1
assert massit.members << user
-
end
-
-
1
test 'URL template' do
-
1
org.url_template = template('?project={id}')
-
1
expanded = org.url_parser.expand(id: 45)
-
1
expected = template('?project=45')
-
1
assert_equal expanded, expected
-
end
-
-
1
test 'requires valid URL template' do
-
1
org.url_template = template('?project=')
-
1
assert_not org.valid?
-
end
-
-
1
test '#has_url_template?' do
-
1
org.url_template = 'x'
-
1
assert org.has_url_template?
-
1
org.url_template = ' '
-
1
assert_not org.has_url_template?
-
end
-
-
1
test 'crosswalks' do
-
1
skip 'not there'
-
dev = developments :one
-
org.crosswalks.new(development: dev, internal_id: '1-0')
-
assert_not_empty org.crosswalks
-
end
-
-
1
test 'related developments custom method responds correctly' do
-
1
assert_respond_to(org, :developments)
-
end
-
-
1
test 'hashes an email before saving' do
-
1
org.save!
-
1
assert_not_empty org.hashed_email
-
end
-
-
1
test 'tries to hash gravatar_email, then other email' do
-
1
org.email = 'base_email@example.com'
-
1
org.gravatar_email = 'gravatar_email@example.com'
-
1
base_hash = Digest::MD5.hexdigest(org.email.dup)
-
1
grav_hash = Digest::MD5.hexdigest(org.gravatar_email.dup)
-
1
org.save!
-
1
assert_equal grav_hash, org.hashed_email
-
1
org.gravatar_email = nil
-
1
org.save!
-
1
assert_equal base_hash, org.hashed_email
-
end
-
-
1
test 'municipal?' do
-
1
assert_respond_to organization, :municipal
-
1
assert_respond_to organization, :municipal?
-
1
refute Organization.new.municipal?
-
end
-
-
1
private
-
-
1
def webster
-
"
-
Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
-
/ Webster Lake, Webster, Massachusetts, United States of America
-
".strip.gsub(/\s+/, ' ')
-
end
-
-
1
def template(part)
-
3
"http://www.bostonredevelopmentauthority.org/document-center#{part}"
-
end
-
end
-
1
require 'test_helper'
-
-
1
class PlaceProfileTest < ActiveSupport::TestCase
-
-
1
def place_profile
-
42
@place_profile ||= place_profiles :one
-
end
-
1
alias_method :profile, :place_profile
-
-
1
def geojson
-
{
-
'type' => 'Polygon',
-
'coordinates' => [
-
[
-
[1.0, 0.0],
-
[0.5000000000000001, 0.8660254037844386],
-
[-0.4999999999999998, 0.8660254037844388],
-
[-1.0, 1.224646799147353e-16],
-
[-0.5000000000000004, -0.8660254037844384],
-
[0.4999999999999993, -0.866025403784439],
-
[1.0, 0.0]
-
]
-
]
-
2
}
-
end
-
-
1
test 'valid' do
-
1
assert profile.valid?
-
end
-
-
1
test 'requires a center point' do
-
1
profile.latitude = profile.longitude = nil
-
1
assert_not profile.valid?
-
end
-
-
1
test 'requires a reasonable latitude' do
-
1
[90.00000000000001, -90.00000000000001].each do |pt|
-
2
profile.latitude = pt
-
2
assert_not profile.valid?
-
end
-
1
profile.latitude = 0
-
1
assert profile.valid?
-
end
-
-
1
test 'requires a reasonable longitude' do
-
1
[180.0000000000001, -180.0000000000001].each do |pt|
-
2
profile.longitude = pt
-
2
assert_not profile.valid?
-
end
-
1
profile.longitude = 0
-
1
assert profile.valid?
-
end
-
-
1
test 'requires a radius' do
-
1
profile.radius = nil
-
1
assert_not profile.valid?
-
end
-
-
1
test '#to_point' do
-
1
profile.longitude = 10
-
1
profile.latitude = 20
-
1
assert_equal [10, 20], profile.to_point
-
end
-
-
1
test 'coordinates equal named attributes' do
-
1
profile.longitude = profile.x
-
1
profile.latitude = profile.y
-
end
-
-
1
test '#polygon builds a geojson hexagon around the center point' do
-
1
profile.x = profile.y = 0
-
1
profile.radius = 1
-
1
profile.save
-
1
assert_equal geojson['type'], profile.polygon['type']
-
-
# See if the coordinates are within a ridiculously small
-
# tolerance. Testing equality results in very slightly
-
# different rounding on the continuous integration platform.
-
1
geo_coords = geojson['coordinates'].flatten
-
1
poly_coords = profile.polygon['coordinates'].flatten
-
1
geo_coords.each_with_index { |coord, i|
-
14
assert_in_delta coord, poly_coords[i], 0.00000000000001
-
}
-
end
-
-
1
test 'gets information from KnowPlace' do
-
1
skip """
-
- Need VCR, or equivalent, or a mock response.
-
- Need KnowPlace to be in a certain state to receive this.
-
"""
-
end
-
-
1
test '#expired?' do
-
1
profile.expires_at = 10.minutes.from_now
-
1
assert_not profile.expired?
-
1
profile.expires_at = 10.minutes.ago
-
1
assert profile.expired?
-
end
-
-
1
test 'sets expiration when saves a response' do
-
1
profile.expires_at = 10.minutes.ago
-
1
profile.response = {}
-
1
profile.save
-
1
assert profile.expires_at > 10.days.from_now, profile.expires_at
-
end
-
-
1
test 'checks expiration on intialization' do
-
# When the model is loaded from the database, an
-
# after_find hook checks to see if Time.now is past the
-
# model's expiration date. It sets expired to TRUE, and maybe
-
# some other actions.
-
1
profile.expires_at = 10.minutes.ago
-
1
assert profile.expired?
-
end
-
end
-
1
require 'test_helper'
-
-
1
class PlaceTest < ActiveSupport::TestCase
-
-
1
def place
-
2
@_place ||= places(:boston)
-
end
-
-
1
test '#developments' do
-
1
assert_respond_to place, :developments
-
end
-
-
1
test '#updated_since?' do
-
1
assert_respond_to place, :updated_since?
-
end
-
-
1
test '#updated_since? without developments' do
-
1
new_place = Place.new
-
1
assert_empty new_place.developments
-
1
refute new_place.updated_since?
-
end
-
-
1
test '#updated_since? with developments' do
-
1
skip 'at 2016-07-01 10:22:57 -0400'
-
development = developments(:one)
-
place.developments << development
-
edit = development.edits.first
-
Time.stub :now, Time.new(2000) do
-
edit.applied
-
edit.save
-
end
-
refute_empty development.history
-
assert place.updated_since?(Time.new(1999))
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class ProgramTest < ActiveSupport::TestCase
-
1
def program
-
19
@program ||= programs :forty_b
-
end
-
-
1
test 'valid' do
-
1
assert program.valid?
-
end
-
-
1
test 'requires a name' do
-
1
program.name = nil
-
1
assert_not program.valid?
-
end
-
-
1
test 'requires a description' do
-
1
program.description = nil
-
1
assert_not program.valid?
-
end
-
-
1
test 'requires a type' do
-
1
program.description = nil
-
1
assert_not program.valid?
-
end
-
-
1
test 'requires a valid type' do
-
1
[:regulatory, :incentive].each do |type|
-
2
program.type = type
-
2
assert program.valid?
-
end
-
1
[:random, :types].each do |type|
-
2
program.type = type
-
2
assert_not program.valid?
-
end
-
end
-
-
1
test 'type predicates' do
-
1
[:regulatory?, :incentive?].each { |type|
-
2
assert_respond_to program, type
-
}
-
end
-
-
1
test 'takes a URL' do
-
1
program.url = nil
-
1
assert program.valid?
-
end
-
-
1
test 'sorts by sort order' do
-
1
massworks = programs(:massworks)
-
1
assert_equal massworks, Program.first
-
end
-
end
-
1
require 'test_helper'
-
-
1
class SearchTest < ActiveSupport::TestCase
-
1
def search
-
26
@_search ||= searches(:exact)
-
end
-
-
1
def saved_search
-
2
@_saved_search ||= searches(:saved)
-
end
-
-
1
alias_method :saved, :saved_search
-
-
1
test 'valid' do
-
1
assert search.valid?
-
end
-
-
1
test 'requires a current_user' do
-
1
search.user = nil
-
1
assert_not search.valid?
-
end
-
-
1
test 'query' do
-
1
refute_empty search.query
-
1
assert_instance_of Hash, search.query
-
end
-
-
1
test 'results' do
-
1
refute_empty search.results, search.inspect
-
end
-
-
1
test 'exact' do
-
# Warning: Code Smell
-
# Requires collaborator (Development) to have the right scopes
-
1
assert_equal 1, search.results.count
-
1
assert_equal developments(:stable_one).id, search.results.first.id
-
end
-
-
1
test 'range' do
-
1
ranged_search = searches(:ranged)
-
1
assert_equal 1, ranged_search.results.count
-
end
-
-
1
test 'responds to #developments' do
-
1
assert_respond_to search, :developments
-
end
-
-
1
test '#updated_since?' do
-
1
development = developments(:one)
-
1
Time.stub :now, Time.new(2010) do
-
1
edit = development.edits.pending.first
-
1
edit.applied
-
1
edit.save
-
end
-
1
search.stub :developments, Development.all do
-
1
assert search.updated_since?(Date.new(2000))
-
end
-
end
-
-
1
test '#updated_since? without history' do
-
1
search.stub :developments, Development.new.history do
-
1
refute search.updated_since?(Date.new(2000))
-
end
-
end
-
-
1
test '#updated_since? ignores updated_at' do
-
1
development = developments(:one)
-
1
Time.stub :now, Time.new(2010) do
-
1
development.touch(:updated_at)
-
end
-
1
search.stub :developments, Development.new.history do
-
1
refute search.updated_since?(Date.new(2000))
-
end
-
end
-
-
1
test '#unsaved?' do
-
1
assert search.unsaved?
-
1
refute saved.unsaved?
-
end
-
-
1
test '#saved?' do
-
1
refute search.saved?
-
1
assert saved.saved?
-
end
-
-
1
test 'autogenerates a title if saved:true' do
-
1
refute search.title.presence
-
1
search.saved = true
-
1
search.save
-
1
assert search.title.presence
-
end
-
-
1
test 'does not autogen a title if saved:false' do
-
1
refute search.title.presence
-
1
search.saved = false
-
1
search.save
-
1
refute search.title.presence
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class StreetViewTest < ActiveSupport::TestCase
-
-
1
test 'never raises, has default URL' do
-
1
assert_equal expected_default_url, StreetView.new(Development.new).url
-
end
-
-
1
test 'given a development, builds a url' do
-
1
assert_equal expected_url, StreetView.new(developments(:one)).url
-
end
-
-
1
test 'given a size, builds a url' do
-
1
assert_equal sized_url, StreetView.new(developments(:one), size: 300).url
-
end
-
-
1
test 'fresh image' do
-
1
file = ActiveRecord::FixtureSet.file('street_view/godfrey.jpg')
-
stub_request(:get, 'http://maps.googleapis.com/maps/api/streetview?fov=100&heading=35&key=loLOLol&location=43.000001,70.000001&pitch=28&size=600x600').
-
1
to_return(status: 200, body: file)
-
1
assert StreetView.new(developments(:two)).image.present?
-
end
-
-
1
test 'no fresh image' do
-
1
skip
-
# This may not be a useful test.
-
stub_request(:get, 'http://maps.googleapis.com/maps/api/streetview?fov=100&heading=35&key=loLOLol&location=43.000001,70.000001&pitch=28&size=600x600').
-
to_return(status: 200, body: '')
-
refute StreetView.new(developments(:two)).image.present?
-
end
-
-
1
test 'width and height' do
-
1
actual = StreetView.new(developments(:one), width: 70, height: 80).url
-
1
assert_equal width_height_url, actual
-
end
-
-
1
def expected_default_url
-
1
expected = 'http://maps.googleapis.com/maps/api/streetview?size=600x600'
-
1
expected << '&location=42.3547661,-71.0615689&fov=100&heading=0&pitch=35'
-
1
expected << '&key=loLOLol'
-
end
-
-
1
def expected_url
-
1
expected = 'http://maps.googleapis.com/maps/api/streetview?size=600x600'
-
1
expected << '&location=42.000001,71.000001&fov=100&heading=235&pitch=35'
-
1
expected << '&key=loLOLol'
-
end
-
-
1
def sized_url
-
1
expected = 'http://maps.googleapis.com/maps/api/streetview?size=300x300'
-
1
expected << '&location=42.000001,71.000001&fov=100&heading=235&pitch=35'
-
1
expected << '&key=loLOLol'
-
end
-
-
1
def width_height_url
-
1
expected = 'http://maps.googleapis.com/maps/api/streetview?size=70x80'
-
1
expected << '&location=42.000001,71.000001&fov=100&heading=235&pitch=35'
-
1
expected << '&key=loLOLol'
-
end
-
end
-
1
require 'test_helper'
-
-
1
class SubscriptionTest < ActiveSupport::TestCase
-
1
def subscription
-
13
@_subscription ||= subscriptions(:one)
-
end
-
-
1
def subscription_two
-
@_subscription_two ||= subscriptions(:two)
-
end
-
-
1
class BadThing < ActiveRecord::Base
-
1
self.table_name = 'users'
-
end
-
-
1
class ValidSubscribable < BadThing
-
1
def developments ; Array.new ; end
-
end
-
-
1
test 'valid?' do
-
1
assert subscription.valid?
-
end
-
-
1
test 'requires a user' do
-
1
subscription.user = nil
-
1
refute subscription.valid?
-
end
-
-
1
test 'requires a subscribable' do
-
1
subscription.subscribable = nil
-
1
refute subscription.valid?
-
end
-
-
1
test 'subscribables must be a Development or respond to #developments' do
-
1
subscription.subscribable = BadThing.new
-
1
refute subscription.valid?
-
1
subscription.subscribable = ValidSubscribable.new
-
1
assert subscription.valid?
-
end
-
-
1
test 'subscribables can be Development' do
-
1
[Development.new, Search.new, Place.new].each {|watch_me|
-
3
subscription.subscribable = watch_me
-
}
-
1
assert subscription.valid?
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class UserTest < ActiveSupport::TestCase
-
-
1
def user
-
37
@user ||= users :normal
-
end
-
-
1
def new_user
-
@new_user ||= User.new(
-
first_name: 'Mad',
-
last_name: 'Max',
-
email: 'zip@zap.zop',
-
password: 'zipzapzop'
-
6
)
-
end
-
-
1
def mock_subscribable
-
mock = Minitest::Mock.new
-
mock.expect :developments, []
-
mock
-
end
-
-
1
test '#valid?' do
-
1
assert user.valid?, user.errors.full_messages
-
1
assert new_user.valid?, new_user.errors.full_messages
-
end
-
-
1
test 'requires a first name' do
-
1
new_user.first_name = nil
-
1
assert_not new_user.valid?
-
end
-
-
1
test 'requires a last name' do
-
1
new_user.last_name = nil
-
1
assert_not new_user.valid?
-
end
-
-
1
test 'hashes email before saving' do
-
1
user.save
-
1
assert_not_empty user.hashed_email
-
end
-
-
1
test 'assigns API key upon creation' do
-
1
new_user = User.new(first_name: 'm', last_name: 'c', email: 'e@ma.il',
-
password: 'password')
-
1
refute new_user.api_key
-
1
new_user.save!
-
1
assert new_user.reload.api_key, user.inspect
-
end
-
-
1
test "cannot change user's API key once set" do
-
1
[APIKey.new, nil].each do |value|
-
2
assert_raises(ActiveRecord::ActiveRecordError) {
-
2
user.update_attribute(:api_key, value)
-
}
-
end
-
end
-
-
1
test "can change user's API key before saving" do
-
1
new_user = User.new
-
1
new_user.api_key = APIKey.new
-
1
assert new_user.api_key
-
end
-
-
1
test "#searches returns user's saved searches" do
-
1
saved_search = searches(:saved)
-
1
assert_equal user, saved_search.user
-
1
assert_equal [saved_search.id], user.searches.map(&:id)
-
end
-
-
1
test '#subscriptions' do
-
1
refute_empty user.subscriptions
-
end
-
-
# TODO: Add Place to this list.
-
1
test '#subscription can include all subscribable classes' do
-
1
%w( Development Search ).each do |klass|
-
2
assert_includes user.subscriptions.map(&:subscribable_type), klass
-
end
-
end
-
-
1
test 'last checked subscriptions' do
-
1
Time.stub :now, Time.new(2000) do
-
1
new_user = User.new
-
1
new_user.save!(validate: false)
-
1
assert new_user.last_checked_subscriptions, new_user.inspect
-
# Not returning, probably because Time.now is being called at
-
# the database level in the prevent_null_last_check migration
-
# assert_equal user.last_checked_subscriptions, Time.new(2000)
-
end
-
end
-
-
# TODO: Fix the duplicated logic and the overuse of database
-
# interaction in these tests.
-
-
1
test '#subscribe_to' do
-
1
assert_respond_to user, :subscribe_to
-
1
assert_respond_to user, :subscribe
-
-
1
subscribable = developments(:one)
-
1
user.subscriptions = []
-
1
user.save
-
-
1
assert_difference 'Subscription.count', +1 do
-
1
user.subscribe(subscribable)
-
end
-
end
-
-
1
test '#unsubscribe_from' do
-
1
assert_respond_to user, :unsubscribe_from
-
1
assert_respond_to user, :unsubscribe
-
1
subscribable = developments(:one)
-
1
user.subscribe(subscribable)
-
1
assert_difference 'Subscription.count', -1 do
-
1
user.unsubscribe(subscribable)
-
end
-
end
-
-
1
test '#subscribed_to?' do
-
1
assert_respond_to user, :subscribed_to?
-
1
assert_respond_to user, :subscribed?
-
-
1
subscribable = developments(:one)
-
1
user.subscriptions = []
-
1
user.save
-
-
1
refute user.subscribed_to?(subscribable)
-
1
user.subscriptions.create(subscribable: subscribable)
-
1
assert user.subscribed_to?(subscribable)
-
end
-
-
1
test 'changes last subscription date frequency changes to non-never' do
-
1
peter = users(:peter_pan)
-
1
peter.update_attribute(:mail_frequency, :weekly)
-
1
assert peter.last_checked_subscriptions > 2.weeks.ago
-
end
-
-
1
test 'no change if going between non-nevers' do
-
1
assert_no_difference 'user.last_checked_subscriptions' do
-
1
user.update_attribute(:mail_frequency, :weekly)
-
end
-
end
-
-
1
test 'no change if going between nevers' do
-
1
peter = users(:peter_pan)
-
1
assert_no_difference 'peter.last_checked_subscriptions' do
-
1
peter.update_attribute(:mail_frequency, :never)
-
end
-
end
-
-
1
test 'creator is an admin of organization' do
-
1
assert_respond_to user, :admin_of?
-
1
assert user.admin_of? organizations(:mapc)
-
1
refute user.admin_of? organizations(:bra)
-
end
-
-
1
test 'org admins can be added' do
-
1
org = organizations(:bra)
-
1
refute user.admin_of?(org)
-
1
mem = user.memberships.create!(organization: org, role: :admin, state: :active)
-
1
assert user.admin_of?(org)
-
1
mem.destroy if mem
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class VerificationTest < ActiveSupport::TestCase
-
1
def verification
-
29
@v ||= verifications :one
-
end
-
1
alias_method :v, :verification
-
-
1
test 'valid' do
-
1
assert verification.valid?, verification.errors.full_messages
-
end
-
-
1
test 'requires a user' do
-
1
v.user = nil
-
1
assert_not v.valid?
-
end
-
-
1
test 'requires a verifier to verify' do
-
1
v.verifier = nil
-
1
assert_not v.verifiable?
-
2
assert_raises(StandardError) { v.verified }
-
end
-
-
1
test 'requires a reason to verify' do
-
1
reasons = [
-
nil,
-
'This is reason enough, no?',
-
'a' * 1001
-
]
-
1
reasons.each do |reason|
-
3
v.reason = reason
-
3
assert_not v.verifiable?
-
6
assert_raises(StandardError) { v.verified }
-
end
-
end
-
-
1
test 'state predicates' do
-
1
[:pending?, :requested?].each { |method|
-
2
assert_respond_to v, method
-
}
-
end
-
-
1
test '#new' do
-
1
assert_equal 'pending', Verification.new.state
-
end
-
-
1
test '#requested' do
-
1
v.requested
-
1
assert_equal 'requested', v.state
-
end
-
-
1
test '#verified' do
-
1
v.verified
-
1
assert_equal 'verified', v.state
-
end
-
-
1
test '#rejected' do
-
1
v.rejected
-
1
assert_equal 'rejected', v.state
-
end
-
-
1
test '#open' do
-
1
assert v.open?
-
end
-
-
1
test '#closed' do
-
1
v.state = :verified
-
1
assert v.closed?
-
1
v.state = :rejected
-
1
assert v.closed?
-
end
-
end
-
1
require 'test_helper'
-
-
1
class ChangePresenterTest < ActiveSupport::TestCase
-
-
1
def presenter
-
18
@_presenter ||= ChangePresenter.new(field_edits(:one))
-
end
-
-
1
def item
-
9
presenter.item
-
end
-
-
1
alias_method :pres, :presenter
-
-
1
test 'numbers' do
-
1
item.change = { from: 100.0, to: 200 }
-
1
assert_equal 'changed Commercial Square Feet from 100.0 to 200.0', pres.text
-
1
item.change = { from: 200, to: nil }
-
1
assert_equal 'changed Commercial Square Feet from 200 to 0', pres.text
-
1
item.change = { from: nil, to: 200 }
-
1
assert_equal 'changed Commercial Square Feet from 0 to 200', pres.text
-
end
-
-
1
test 'booleans' do
-
1
item.change = { from: true, to: false }
-
1
assert_equal 'set Commercial Square Feet to false', pres.text
-
1
item.change = { from: false, to: true }
-
1
assert_equal 'set Commercial Square Feet to true', pres.text
-
1
item.change = { from: nil, to: true }
-
1
assert_equal 'set Commercial Square Feet to true', pres.text
-
1
item.change = { from: true, to: nil }
-
1
assert_equal 'set Commercial Square Feet to false', pres.text
-
end
-
-
1
test 'strings' do
-
1
item.change = { from: 'Godfrey', to: 'The Godfrey.' }
-
1
expect = "changed Commercial Square Feet from 'Godfrey' to 'The Godfrey.'"
-
1
assert_equal expect, pres.text
-
end
-
-
1
test 'unexpected' do
-
1
item.change = { from: Class, to: Object }
-
2
assert_raises(ArgumentError) { pres.text }
-
end
-
-
1
test 'changeable attributes have human names' do
-
1
development = developments(:one)
-
62
attributes = development.attributes.select { |_k, v| !v.is_a? String }
-
19
deletable_attributes.each { |key| attributes.delete(key) }
-
1
attributes.each_pair do |key, _v|
-
41
expected = key.to_s.titleize
-
41
actual = Development.human_attribute_name(key)
-
41
refute_equal expected, actual
-
end
-
end
-
-
1
private
-
-
1
def deletable_attributes
-
1
%w( id state creator_id fields phased status stalled parcel_id
-
city stories total_cost private latitude height longitude place_id
-
walkscore point
-
)
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentPresenterTest < ActiveSupport::TestCase
-
-
1
def presenter
-
35
@_presenter ||= DevelopmentPresenter.new(developments(:one))
-
end
-
-
1
def item
-
14
presenter.item
-
end
-
-
1
alias_method :pres, :presenter
-
-
1
test '#contributors' do
-
1
assert_respond_to pres, :contributors
-
end
-
-
1
test '#recent_history' do
-
1
assert_respond_to pres, :recent_history
-
end
-
-
1
test '#related' do
-
1
assert_respond_to pres, :related
-
end
-
-
1
test '#neighborhood not yet implemented' do
-
2
assert_raises(NotImplementedError) { pres.neighborhood }
-
end
-
-
1
test 'related developments are also wrapped' do
-
1
pres.related.each do |development|
-
assert_respond_to development, :recent_history
-
end
-
end
-
-
1
test '#team' do
-
1
assert_respond_to pres, :team
-
end
-
-
1
test 'employment with estimated only' do
-
1
item.rptdemp = nil
-
1
item.estemp = 1000
-
1
assert_equal 1000, pres.employment
-
end
-
-
1
test 'employment with reported only' do
-
1
item.rptdemp = 1001
-
1
item.estemp = nil
-
1
assert_equal 1001, pres.employment
-
end
-
-
1
test 'employment with estimated and reported uses reported' do
-
1
item.rptdemp = 0
-
1
item.estemp = 1
-
1
assert_equal 0, pres.employment
-
end
-
-
1
test 'employment works with strings' do
-
1
item.rptdemp = '100'
-
1
item.estemp = '101'
-
1
assert_equal 100, pres.employment
-
end
-
-
1
test 'employment with nothing given returns nil, not an integer' do
-
1
item.rptdemp = item.estemp = nil
-
1
assert_equal nil, pres.employment
-
1
refute_equal 0, pres.employment
-
end
-
-
1
test 'tagline' do
-
1
assert_respond_to pres, :tagline
-
end
-
-
1
test 'address' do
-
1
expected = '505 Washington Street, Boston MA 02111'
-
1
assert_equal expected, pres.display_address
-
end
-
-
1
test 'short address' do
-
1
expected = '505 Washington Street, Boston'
-
1
assert_equal expected, pres.display_address(short: true)
-
end
-
-
1
test '#disable_moderation?' do
-
1
assert_not_empty item.edits.pending
-
1
assert_equal false, pres.disable_moderation?
-
1
item.edits.pending.destroy_all
-
1
assert_equal true, pres.disable_moderation?
-
end
-
-
1
test '#pending' do
-
1
assert_equal item.edits.pending, pres.pending
-
end
-
-
1
test '#housing_attributes' do
-
1
assert_equal({ }, pres.housing_attributes)
-
1
item.singfamhu = 1
-
1
refute_empty pres.housing_attributes
-
1
assert_equal({ 'singfamhu' => 1 }, pres.housing_attributes)
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DigestPresenterTest < ActiveSupport::TestCase
-
-
1
def user
-
@_user ||= users(:digestible)
-
end
-
-
1
def presenter
-
@_presenter ||= DigestPresenter.new(user)
-
end
-
-
1
def item
-
presenter.item
-
end
-
-
1
alias_method :pres, :presenter
-
-
1
test '#user' do
-
1
skip
-
assert_respond_to pres, :user
-
assert_equal item, pres.user
-
assert user.last_checked_subscriptions < Time.at(0)
-
end
-
-
1
test '#subscriptions' do
-
1
skip
-
assert_respond_to pres, :subscriptions
-
assert_equal pres.subscriptions, item.subscriptions_needing_update
-
end
-
-
1
test '#searches' do
-
1
skip
-
assert_respond_to pres, :searches
-
assert_equal 1, pres.searches.count # Only returns saved searches
-
end
-
-
1
test '#places' do
-
1
skip
-
assert_respond_to pres, :places
-
end
-
-
1
test '#developments' do
-
1
skip
-
assert_respond_to pres, :developments
-
expected = item.subscriptions_needing_update.count
-
actual = pres.developments.count
-
-
assert_equal expected, actual
-
assert_equal 2, actual
-
end
-
-
1
test '#unique_developments' do
-
1
skip 'Should return developments not in searches, places'
-
end
-
-
1
test 'user_last_checked' do
-
1
skip
-
assert_equal user.last_checked_subscriptions, pres.user_last_checked
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class EditPresenterTest < ActiveSupport::TestCase
-
-
1
def presenter
-
8
@_presenter ||= EditPresenter.new(edits(:one))
-
end
-
-
1
def item
-
2
presenter.item
-
end
-
-
1
alias_method :pres, :presenter
-
-
1
test '#editor is presented' do
-
1
assert_respond_to pres, :editor
-
1
assert_respond_to pres.editor, :short_name
-
end
-
-
1
test '#changes' do
-
1
assert_respond_to pres, :changes
-
end
-
-
1
test '#time_ago when applied' do
-
1
item.applied_at = 10.hours.ago
-
1
item.applied = true
-
1
assert_equal 'about 10 hours ago', pres.time_ago
-
end
-
-
1
test '#time_ago when not applied' do
-
1
expected = 'less than a minute ago'
-
1
edit = Edit.new
-
1
edit.save(validate: false)
-
1
actual = EditPresenter.new(edit).time_ago
-
1
assert_equal expected, actual
-
end
-
-
1
test '#time is an alias of #time_ago' do
-
1
assert_equal pres.time_ago, pres.time
-
end
-
end
-
1
class ReportPresenterTest < ActiveSupport::TestCase
-
-
1
def search
-
11
@search ||= Search.new
-
end
-
-
1
def report
-
16
@report ||= ReportPresenter.new(search)
-
end
-
-
1
def stubbed_developments
-
2
Development.where(status: :projected)
-
end
-
-
1
test 'responds to search attributes' do
-
1
%i( results developments ).each { |attribute|
-
2
assert_respond_to report, attribute
-
}
-
end
-
-
1
test '#developments returns all developments' do
-
1
search.stub :results, Development.all do
-
1
assert_equal Development.all, report.developments
-
assert_equal Development.all, report.results
-
end
-
end
-
-
1
test '#numeric_fields' do
-
1
assert_respond_to report, :numeric_fields
-
end
-
-
1
test '#boolean_fields' do
-
1
assert_respond_to report, :boolean_fields
-
end
-
-
1
test 'sums numeric fields by status' do
-
1
search.stub :results, stubbed_developments do
-
1
assert_equal 14, report.projected[:tothu]
-
end
-
end
-
-
1
test 'counts boolean fields set to true' do
-
1
search.stub :results, stubbed_developments do
-
1
assert_equal 2, report.projected[:rdv]
-
end
-
end
-
-
1
test 'can specify whether fields are nested' do
-
1
skip
-
end
-
-
1
test 'shortcuts' do
-
1
%i( projected planning in_construction completed ).each do |status|
-
4
assert_equal report.statuses.send(status), report.send(status)
-
end
-
end
-
-
1
test 'to CSV' do
-
1
csv = report.to_csv
-
1
assert_equal 'id,', csv[0..2]
-
1
assert_equal 5, csv.lines.count
-
end
-
-
end
-
-
# # booleans
-
# - mixed_use
-
-
# total_cost
-
# - employment
-
# emploss
-
1
require 'test_helper'
-
-
1
class StatusInfoTest < ActiveSupport::TestCase
-
-
1
def presenter
-
25
@_presenter ||= StatusInfo.new(developments(:one))
-
end
-
-
1
def item
-
13
presenter.item
-
end
-
-
1
alias_method :pres, :presenter
-
-
1
test '#status_with_year' do
-
1
Time.stub :now, Time.new(2000) do
-
1
item.year_compl = 2100
-
1
statuses.each_pair do |status, text|
-
4
item.status = status
-
4
assert_equal text, pres.status_with_year
-
end
-
end
-
end
-
-
1
test 'year or year range' do
-
1
Time.stub :now, Time.new(2000) do
-
[{ year: 2000, expected: '2000' },
-
{ year: 2009, expected: '2009' },
-
{ year: 2010, expected: '2010-2020' },
-
{ year: 2011, expected: '2010-2020' },
-
{ year: 1989, expected: '1989' },
-
{ year: 2100, expected: '2100-2110' },
-
1
{ year: 2099, expected: '2090-2100' }].each do |set|
-
7
item.year_compl = set[:year]
-
7
assert_equal set[:expected], pres.year
-
end
-
end
-
end
-
-
1
test 'status icon' do
-
1
item.status = :projected
-
1
assert_equal :find, pres.status_icon
-
end
-
-
1
def statuses
-
{ projected: 'Projected (for 2100-2110)',
-
planning: 'Planning (est. 2100-2110)',
-
in_construction: 'In Construction (est. 2100-2110)',
-
1
completed: 'Completed (2100)' }
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class UserPresenterTest < ActiveSupport::TestCase
-
-
1
def presenter
-
8
@_presenter ||= UserPresenter.new(users(:lower_case))
-
end
-
-
1
def item
-
presenter.item
-
end
-
-
1
alias_method :pres, :presenter
-
-
1
test 'first name and last name' do
-
1
assert_equal 'Matt', pres.first_name
-
1
assert_equal 'Gardner', pres.last_name
-
end
-
-
1
test 'short name' do
-
1
assert_equal 'Matt G.', pres.short_name
-
end
-
-
1
test 'full_name' do
-
1
assert_equal 'Matt Gardner', pres.full_name
-
end
-
-
1
test 'gravatar id' do
-
1
pres.save
-
1
expected = '72dedd9e525e529e37b724e8aba4997f'
-
1
assert_equal expected, pres.hashed_email
-
end
-
-
1
test 'gravatar url' do
-
1
pres.save
-
1
expected = 'https://secure.gravatar.com/avatar/72dedd9e525e529e37b724e8aba4997f?s=120&d=identicon'
-
1
assert_equal expected, pres.gravatar_url
-
end
-
end
-
1
require 'test_helper'
-
-
1
class RouteTest < ActionDispatch::IntegrationTest
-
-
1
test 'default api version' do
-
1
rte = { controller: 'api/v1/searches', action: 'index' }
-
1
assert_routing('http://api.test.host/searches', rte)
-
end
-
-
1
test 'api version parameter' do
-
1
rte = { controller: 'api/v1/searches', action: 'index' }
-
1
assert_routing('http://api.test.host/searches?api_version=1', rte)
-
end
-
-
1
test 'api version in header' do
-
1
env = ActionDispatch::TestRequest::DEFAULT_ENV
-
1
env['action_dispatch.request.accepts'] = 'application/org.dd.v1'
-
1
rte = { controller: 'api/v1/searches', action: 'index' }
-
1
assert_routing('http://api.test.host/searches', rte)
-
end
-
-
1
test 'development show goes to DevelopmentsController' do
-
1
assert_routing 'http://test.host/developments/1', {
-
controller: 'developments', action: 'show', id: '1'
-
}
-
end
-
-
1
test 'development index goes to Ember app' do
-
1
assert_routing 'http://test.host/developments', {
-
ember_app: :searchapp, controller: 'developments', action: 'index'
-
}
-
end
-
-
1
test 'development edit goes to Ember app' do
-
1
edit_route = 'http://test.host/developments/1/edit'
-
1
assert_routing edit_route, {
-
ember_app: :searchapp, controller: 'developments', action: 'edit', id: '1'
-
}
-
end
-
-
1
test 'development new goes to Ember app' do
-
1
new_route = 'http://test.host/developments/new'
-
1
assert_routing new_route, {
-
ember_app: :searchapp, controller: 'developments', action: 'new'
-
}
-
end
-
-
1
test 'wildcard after search' do
-
1
base = 'http://test.host/developments/'
-
1
assert_routing base + 'map', route_for('map')
-
1
assert_routing base + 'table', route_for('table')
-
end
-
-
1
private
-
-
1
def route_for(path)
-
{
-
ember_app: :searchapp,
-
controller: 'developments',
-
action: 'index',
-
rest: "/#{path}"
-
2
}
-
end
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentSerializerTest < ActiveSupport::TestCase
-
-
1
def development
-
6
@_d = developments :one
-
6
@_d.team_memberships = [
-
DevelopmentTeamMembership.create(
-
development: @_d,
-
role: 'landlord',
-
organization: organizations(:mapc)
-
)
-
]
-
6
@_d
-
end
-
-
1
def serializer
-
3
@_base ||= DevelopmentSerializer.new(nil)
-
end
-
-
1
def serializer_with_development
-
7
@_development ||= DevelopmentSerializer.new(development, max_team_size: 1)
-
end
-
-
1
def serializer_only
-
2
@_only ||= DevelopmentSerializer.new(development, only: 'name')
-
end
-
-
1
def serializer_except
-
3
@_e ||= DevelopmentSerializer.new(development, except: [:name, 'address'])
-
end
-
-
1
alias_method :base, :serializer
-
1
alias_method :dev, :serializer_with_development
-
1
alias_method :only, :serializer_only
-
1
alias_method :except, :serializer_except
-
-
1
test '#to_row' do
-
1
assert_respond_to base, :to_row
-
end
-
-
1
test '#to_row produces csv row of values' do
-
1
Time.stub :now, Time.at(0) do
-
1
actual_row = dev.to_row
-
1
expected_row.each_with_index do |expected_value, index|
-
# Cast to string to avoid annoying value issues
-
61
assert_equal expected_value.to_s, actual_row[index].to_s
-
end
-
end
-
end
-
-
1
test '#to_row includes development team' do
-
1
assert_includes dev.to_row, 'landlord'
-
end
-
-
1
test '#to_header with an #attribute-less object' do
-
1
assert_respond_to base, :to_header
-
1
assert_equal [], base.to_header
-
end
-
-
1
test '#to_header with an object' do
-
1
assert_equal expected_header, dev.to_header,
-
"""
-
1
Extra value in actual header: #{e = (dev.to_header - expected_header).first}
-
At index: #{dev.to_header.index(e)}
-
"""
-
end
-
-
1
test '#to_header shows development team' do
-
1
assert_includes dev.to_header, 'team_member_1_name'
-
1
assert_includes dev.to_header, 'team_member_1_role'
-
end
-
-
1
test 'can allow (only) certain attributes' do
-
1
refute_includes ['505 Washington Street'], only.to_row
-
1
refute_includes ['address'], only.to_header
-
end
-
-
1
test 'can block (except) attributes' do
-
1
refute_includes except.to_row, 'Godfrey Hotel'
-
1
refute_includes except.to_row, '505 Washington Street'
-
1
refute_includes except.to_header, 'name'
-
end
-
-
1
private
-
-
1
def expected_row
-
1
csv.to_a[1]
-
end
-
-
1
def expected_header
-
2
csv.headers
-
end
-
-
1
def csv
-
3
CSV.parse(csv_file, headers: true)
-
end
-
-
1
def csv_file
-
3
File.read 'test/fixtures/csvs/serializer_test.csv'
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentTeamSerializerTest < ActiveSupport::TestCase
-
1
def serializer
-
2
@_base ||= DevelopmentTeamSerializer.new(developments(:one), 1)
-
end
-
-
1
def nine_team_members
-
2
@_niner ||= DevelopmentTeamSerializer.new(developments(:one), 9)
-
end
-
1
alias_method :base, :serializer
-
1
alias_method :niner, :nine_team_members
-
-
1
test '#to_header' do
-
1
assert_equal header, base.to_header
-
end
-
-
1
test '#to_header with more projects' do
-
1
header = niner.to_header
-
1
assert_equal 63, header.count
-
1
assert_equal 'team_member_1_name', header.first
-
1
assert_equal 'team_member_9_role', header.last
-
end
-
-
1
test '#to_row' do
-
1
assert_equal row, base.to_row
-
end
-
-
1
test '#to_row with more projects' do
-
1
row = niner.to_row
-
1
assert_equal 63, row.count
-
1
assert_equal 6, row.compact.count # there are 2 nil values
-
1
assert_equal row.first, row.first
-
1
assert_equal nil, row.last
-
end
-
-
1
private
-
-
1
def header
-
# Not clear why it's picking up extra nils.
-
1
csv.headers.compact
-
end
-
-
1
def row
-
1
csv.to_a[1]
-
end
-
-
1
def csv
-
2
file = File.open('test/fixtures/csvs/team.csv')
-
2
CSV.parse(file, headers: true)
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class DevelopmentsSerializerTest < ActiveSupport::TestCase
-
-
1
def development
-
5
@_d = developments :one
-
5
@_d.team_memberships = [
-
DevelopmentTeamMembership.create(
-
development: @_d,
-
role: 'landlord',
-
organization: organizations(:mapc)
-
)
-
]
-
5
@_d
-
end
-
-
1
def development_two
-
3
@_d = developments :two
-
end
-
-
1
def serializer
-
4
@_base ||= DevelopmentsSerializer.new([development, development_two])
-
end
-
1
alias_method :base, :serializer
-
-
1
test '#developments' do
-
1
refute_empty base.developments
-
end
-
-
1
test 'prevents empty developments' do
-
2
assert_raises(ArgumentError) { DevelopmentsSerializer.new([]) }
-
end
-
-
1
test '#to_header' do
-
1
assert_equal 1, development.team_memberships.count
-
1
assert_equal 1, development.team_members.count
-
1
assert_equal expected_header, base.to_header
-
end
-
-
1
test '#to_csv' do
-
1
assert_respond_to base, :to_csv
-
1
Time.stub :now, Time.at(0) do
-
1
assert_equal expected_csv.to_s, base.to_csv
-
end
-
end
-
-
1
private
-
-
1
def expected_header
-
1
expected_csv.headers
-
end
-
-
1
def expected_csv
-
2
CSV.parse(csv_file, headers: true)
-
end
-
-
1
def csv_file
-
2
File.read 'test/fixtures/csvs/developments_serializer.csv'
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class EditApplicationTest < ActiveSupport::TestCase
-
1
def application
-
15
@_application ||= EditApplication.new(edits(:one))
-
end
-
-
1
def edit
-
4
application.edit
-
end
-
-
1
def development
-
4
application.development
-
end
-
-
1
test '#edit' do
-
1
assert_equal application.edit.id, edits(:one).id
-
end
-
-
1
test '#performable?' do
-
1
assert application.performable?, "Is edit applyable? #{application.edit.applyable?}"
-
end
-
-
1
test 'not #performable?' do
-
1
edit.applied = true
-
1
refute application.performable?
-
end
-
-
1
test 'perform! sets :applied' do
-
1
application.perform!
-
1
assert edit.applied?, edit.state.inspect
-
1
assert edit.applied_at
-
end
-
-
1
test 'perform! applies edits' do
-
1
assert_equal 0, development.commsf
-
1
application.perform!
-
1
assert_equal 1000, development.commsf
-
end
-
-
1
test 'perform! applies and saves edits' do
-
1
assert_equal 0, development.commsf
-
1
application.perform!
-
1
assert_equal 1000, development.reload.commsf
-
end
-
-
1
test 'perform! when conflict returns false' do
-
1
conflict = EditApplication.new(edits(:conflict))
-
1
refute conflict.perform! # Should not change anything
-
1
assert_equal 'pending', conflict.edit.state
-
1
assert_equal 0, conflict.development.commsf
-
end
-
-
1
test 'ignore conflict and apply edit' do
-
1
conflict = EditApplication.new(edits(:conflict))
-
1
refute conflict.perform!
-
1
conflict.edit.ignore_conflicts = true
-
1
conflict.perform!
-
1
assert conflict.edit.applied?
-
1
assert_equal 100, conflict.development.commsf
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class EditApprovalTest < ActiveSupport::TestCase
-
1
def approval
-
16
@_approval ||= EditApproval.new(edits(:one))
-
end
-
-
1
def edit
-
10
approval.edit
-
end
-
-
1
def development
-
approval.edit.development
-
end
-
-
1
test 'precondition: edit is valid' do
-
1
assert edit.valid?
-
end
-
-
1
test 'raises with invalid edit' do
-
1
assert_raises(StandardError) do
-
1
EditApproval.new(Edit.new)
-
end
-
end
-
-
1
test '#edit' do
-
1
assert_equal approval.edit.id, edits(:one).id
-
end
-
-
1
test '#development' do
-
1
assert_equal approval.development.id, developments(:one).id
-
end
-
-
1
test '#performable?' do
-
1
assert approval.performable?, [edit.inspect]
-
end
-
-
1
test 'not #performable?' do
-
1
edit.applied = true
-
1
refute approval.performable?, [edit.inspect, edit.conflict?]
-
end
-
-
1
test '#perform! approves the edit' do
-
1
approval.perform!
-
1
assert_equal 'approved', edit.state
-
1
assert edit.approved?
-
1
assert edit.moderated_at
-
end
-
-
1
test '#perform! applies the changes' do
-
1
approval.perform!
-
1
assert edit.applied?
-
1
assert edit.applied_at
-
end
-
-
end
-
1
require 'test_helper'
-
-
1
class EditDeclineTest < ActiveSupport::TestCase
-
1
def decline
-
5
@_decline ||= EditDecline.new(edits(:one))
-
end
-
-
1
def edit
-
4
decline.edit
-
end
-
-
1
def development
-
decline.edit.development
-
end
-
-
1
test 'precondition: edit is valid' do
-
1
assert edit.valid?
-
end
-
-
1
test '#perform! declines the edit' do
-
1
decline.perform!
-
1
assert_equal 'declined', edit.state
-
1
assert edit.declined?
-
1
assert edit.moderated_at
-
end
-
end
-
1
module SessionHelpers
-
-
1
def sign_up_with(email, password, options = {})
-
visit = options.fetch(:visit) { false }
-
submit = options.fetch(:submit) { false }
-
-
visit signup_path if visit
-
-
fill_in 'Email', with: email
-
fill_in 'Password', with: password
-
fill_in 'Password confirmation', with: password
-
click_button 'Sign up' if submit
-
end
-
-
1
def sign_in(user, options = {})
-
18
visit signin_path if options.fetch(:visit, false)
-
36
fill_in 'Email', with: options.fetch(:email) { user.email }
-
fill_in 'Password', with: options.fetch(:password) { user.password }
-
check_remember_box(options)
-
click_button 'Log in' if options.fetch(:submit, false)
-
end
-
-
1
def sign_out(*)
-
# Might try `visit signout_path, method: :delete`
-
5
click_link 'Log out'
-
end
-
-
1
def request_password_reset_for(user, options = {})
-
visit new_password_reset_path
-
fill_in 'Email', with: options.fetch(:email) { user.email }
-
click_button 'Request password reset'
-
end
-
-
1
def set_password(options = {})
-
password = options.fetch(:password) { 'v4lidp4ssw0rd' }
-
confirm = options.fetch(:confirmation) { password }
-
fill_in 'Password', with: password
-
fill_in 'Password confirmation', with: confirm
-
click_button 'Update password'
-
end
-
-
1
private
-
-
1
def check_remember_box(options = {})
-
box = 'Remember me'
-
checked = options.fetch(:remember) { true }
-
checked ? check(box) : uncheck(box)
-
end
-
-
end
-
1
module EmberCli
-
1
class EmberController < ::ActionController::Base
-
1
def index
-
render layout: false
-
end
-
-
1
def ember_app
-
params[:ember_app]
-
end
-
1
helper_method :ember_app
-
end
-
end
-
1
require "html_page/capture"
-
-
1
module EmberRailsHelper
-
1
def render_ember_app(name, &block)
-
EmberCli[name].build
-
-
markup_capturer = HtmlPage::Capture.new(self, &block)
-
-
head, body = markup_capturer.capture
-
-
render inline: EmberCli[name].index_html(head: head, body: body)
-
end
-
end
-
1
module EmberCli
-
1
class HtmlConstraint
-
1
def matches?(request)
-
3
matches = request.format.to_s =~ /html/ || -1
-
-
3
matches > -1
-
end
-
end
-
end
-
1
require "ember_cli/html_constraint"
-
-
1
module ActionDispatch
-
1
module Routing
-
1
class Mapper
-
1
def mount_ember_app(app_name, to:, **options)
-
3
routing_options = options.deep_merge(
-
defaults: { ember_app: app_name },
-
)
-
-
3
routing_options.reverse_merge!(
-
controller: "ember_cli/ember",
-
action: "index",
-
format: :html,
-
)
-
-
3
scope constraints: ::EmberCli::HtmlConstraint.new do
-
3
get("#{to}(*rest)", routing_options)
-
end
-
-
3
mount_ember_assets(app_name, to: to)
-
end
-
-
1
def mount_ember_assets(app_name, to: "/")
-
3
app = ::EmberCli[app_name]
-
-
3
if app.mountable?
-
3
mount app.to_rack => to
-
end
-
end
-
end
-
end
-
end
-
1
require 'delegate'
-
1
require 'active_support/core_ext/string/filters'
-
-
1
module ActionMailer
-
-
# The <tt>ActionMailer::MessageDelivery</tt> class is used by
-
# <tt>ActionMailer::Base</tt> when creating a new mailer.
-
# <tt>MessageDelivery</tt> is a wrapper (+Delegator+ subclass) around a lazy
-
# created <tt>Mail::Message</tt>. You can get direct access to the
-
# <tt>Mail::Message</tt>, deliver the email or schedule the email to be sent
-
# through Active Job.
-
#
-
# Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object
-
# Notifier.welcome(User.first).deliver_now # sends the email
-
# Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job
-
# Notifier.welcome(User.first).message # a Mail::Message object
-
1
class MessageDelivery < Delegator
-
1
def initialize(mailer, mail_method, *args) #:nodoc:
-
1
@mailer = mailer
-
1
@mail_method = mail_method
-
1
@args = args
-
end
-
-
1
def __getobj__ #:nodoc:
-
1
@obj ||= @mailer.send(:new, @mail_method, *@args).message
-
end
-
-
1
def __setobj__(obj) #:nodoc:
-
@obj = obj
-
end
-
-
# Returns the Mail::Message object
-
1
def message
-
1
__getobj__
-
end
-
-
# Enqueues the email to be delivered through Active Job. When the
-
# job runs it will send the email using +deliver_now!+. That means
-
# that the message will be sent bypassing checking +perform_deliveries+
-
# and +raise_delivery_errors+, so use with caution.
-
#
-
# Notifier.welcome(User.first).deliver_later!
-
# Notifier.welcome(User.first).deliver_later!(wait: 1.hour)
-
# Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now)
-
#
-
# Options:
-
#
-
# * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
-
# * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
-
# * <tt>:queue</tt> - Enqueue the email on the specified queue
-
1
def deliver_later!(options={})
-
enqueue_delivery :deliver_now!, options
-
end
-
-
# Enqueues the email to be delivered through Active Job. When the
-
# job runs it will send the email using +deliver_now+.
-
#
-
# Notifier.welcome(User.first).deliver_later
-
# Notifier.welcome(User.first).deliver_later(wait: 1.hour)
-
# Notifier.welcome(User.first).deliver_later(wait_until: 10.hours.from_now)
-
#
-
# Options:
-
#
-
# * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
-
# * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
-
# * <tt>:queue</tt> - Enqueue the email on the specified queue
-
1
def deliver_later(options={})
-
enqueue_delivery :deliver_now, options
-
end
-
-
# Delivers an email without checking +perform_deliveries+ and +raise_delivery_errors+,
-
# so use with caution.
-
#
-
# Notifier.welcome(User.first).deliver_now!
-
#
-
1
def deliver_now!
-
message.deliver!
-
end
-
-
# Delivers an email:
-
#
-
# Notifier.welcome(User.first).deliver_now
-
#
-
1
def deliver_now
-
1
message.deliver
-
end
-
-
1
def deliver! #:nodoc:
-
ActiveSupport::Deprecation.warn(<<-MSG.squish)
-
`#deliver!` is deprecated and will be removed in Rails 5. Use
-
`#deliver_now!` to deliver immediately or `#deliver_later!` to
-
deliver through Active Job.
-
MSG
-
-
deliver_now!
-
end
-
-
1
def deliver #:nodoc:
-
ActiveSupport::Deprecation.warn(<<-MSG.squish)
-
`#deliver` is deprecated and will be removed in Rails 5. Use
-
`#deliver_now` to deliver immediately or `#deliver_later` to
-
deliver through Active Job.
-
MSG
-
-
deliver_now
-
end
-
-
1
private
-
-
1
def enqueue_delivery(delivery_method, options={})
-
args = @mailer.name, @mail_method.to_s, delivery_method.to_s, *@args
-
ActionMailer::DeliveryJob.set(options).perform_later(*args)
-
end
-
end
-
end
-
1
require 'active_support/test_case'
-
1
require 'rails-dom-testing'
-
-
1
module ActionMailer
-
1
class NonInferrableMailerError < ::StandardError
-
1
def initialize(name)
-
super "Unable to determine the mailer to test from #{name}. " +
-
"You'll need to specify it using tests YourMailer in your " +
-
"test case definition"
-
end
-
end
-
-
1
class TestCase < ActiveSupport::TestCase
-
1
module Behavior
-
1
extend ActiveSupport::Concern
-
-
1
include ActiveSupport::Testing::ConstantLookup
-
1
include TestHelper
-
1
include Rails::Dom::Testing::Assertions::SelectorAssertions
-
1
include Rails::Dom::Testing::Assertions::DomAssertions
-
-
1
included do
-
1
class_attribute :_mailer_class
-
1
setup :initialize_test_deliveries
-
1
setup :set_expected_mail
-
1
teardown :restore_test_deliveries
-
end
-
-
1
module ClassMethods
-
1
def tests(mailer)
-
case mailer
-
when String, Symbol
-
self._mailer_class = mailer.to_s.camelize.constantize
-
when Module
-
self._mailer_class = mailer
-
else
-
raise NonInferrableMailerError.new(mailer)
-
end
-
end
-
-
1
def mailer_class
-
if mailer = self._mailer_class
-
mailer
-
else
-
tests determine_default_mailer(name)
-
end
-
end
-
-
1
def determine_default_mailer(name)
-
mailer = determine_constant_from_test_name(name) do |constant|
-
Class === constant && constant < ActionMailer::Base
-
end
-
raise NonInferrableMailerError.new(name) if mailer.nil?
-
mailer
-
end
-
end
-
-
1
protected
-
-
1
def initialize_test_deliveries
-
1
set_delivery_method :test
-
1
@old_perform_deliveries = ActionMailer::Base.perform_deliveries
-
1
ActionMailer::Base.perform_deliveries = true
-
end
-
-
1
def restore_test_deliveries
-
1
restore_delivery_method
-
1
ActionMailer::Base.perform_deliveries = @old_perform_deliveries
-
1
ActionMailer::Base.deliveries.clear
-
end
-
-
1
def set_delivery_method(method)
-
1
@old_delivery_method = ActionMailer::Base.delivery_method
-
1
ActionMailer::Base.delivery_method = method
-
end
-
-
1
def restore_delivery_method
-
1
ActionMailer::Base.delivery_method = @old_delivery_method
-
end
-
-
1
def set_expected_mail
-
1
@expected = Mail.new
-
1
@expected.content_type ["text", "plain", { "charset" => charset }]
-
1
@expected.mime_version = '1.0'
-
end
-
-
1
private
-
-
1
def charset
-
1
"UTF-8"
-
end
-
-
1
def encode(subject)
-
Mail::Encodings.q_value_encode(subject, charset)
-
end
-
-
1
def read_fixture(action)
-
IO.readlines(File.join(Rails.root, 'test', 'fixtures', self.class.mailer_class.name.underscore, action))
-
end
-
end
-
-
1
include Behavior
-
end
-
end
-
1
module ActionMailer
-
# Provides helper methods for testing Action Mailer, including #assert_emails
-
# and #assert_no_emails
-
1
module TestHelper
-
# Asserts that the number of emails sent matches the given number.
-
#
-
# def test_emails
-
# assert_emails 0
-
# ContactMailer.welcome.deliver_now
-
# assert_emails 1
-
# ContactMailer.welcome.deliver_now
-
# assert_emails 2
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# emails to be sent.
-
#
-
# def test_emails_again
-
# assert_emails 1 do
-
# ContactMailer.welcome.deliver_now
-
# end
-
#
-
# assert_emails 2 do
-
# ContactMailer.welcome.deliver_now
-
# ContactMailer.welcome.deliver_now
-
# end
-
# end
-
1
def assert_emails(number)
-
if block_given?
-
original_count = ActionMailer::Base.deliveries.size
-
yield
-
new_count = ActionMailer::Base.deliveries.size
-
assert_equal number, new_count - original_count, "#{number} emails expected, but #{new_count - original_count} were sent"
-
else
-
assert_equal number, ActionMailer::Base.deliveries.size
-
end
-
end
-
-
# Assert that no emails have been sent.
-
#
-
# def test_emails
-
# assert_no_emails
-
# ContactMailer.welcome.deliver_now
-
# assert_emails 1
-
# end
-
#
-
# If a block is passed, that block should not cause any emails to be sent.
-
#
-
# def test_emails_again
-
# assert_no_emails do
-
# # No emails should be sent from this block
-
# end
-
# end
-
#
-
# Note: This assertion is simply a shortcut for:
-
#
-
# assert_emails 0
-
1
def assert_no_emails(&block)
-
assert_emails 0, &block
-
end
-
end
-
end
-
1
module ActionController
-
1
module Testing
-
1
extend ActiveSupport::Concern
-
-
1
include RackDelegation
-
-
# TODO : Rewrite tests using controller.headers= to use Rack env
-
1
def headers=(new_headers)
-
@_response ||= ActionDispatch::Response.new
-
@_response.headers.replace(new_headers)
-
end
-
-
# Behavior specific to functional tests
-
1
module Functional # :nodoc:
-
1
def set_response!(request)
-
end
-
-
1
def recycle!
-
96
@_url_options = nil
-
96
self.formats = nil
-
96
self.params = nil
-
end
-
end
-
-
1
module ClassMethods
-
1
def before_filters
-
_process_action_callbacks.find_all{|x| x.kind == :before}.map{|x| x.name}
-
end
-
end
-
end
-
end
-
1
require 'rack/session/abstract/id'
-
1
require 'active_support/core_ext/object/to_query'
-
1
require 'active_support/core_ext/module/anonymous'
-
1
require 'active_support/core_ext/hash/keys'
-
1
require 'active_support/deprecation'
-
-
1
require 'rails-dom-testing'
-
-
1
module ActionController
-
1
module TemplateAssertions
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
3
setup :setup_subscriptions
-
3
teardown :teardown_subscriptions
-
end
-
-
1
RENDER_TEMPLATE_INSTANCE_VARIABLES = %w{partials templates layouts files}.freeze
-
-
1
def setup_subscriptions
-
71
RENDER_TEMPLATE_INSTANCE_VARIABLES.each do |instance_variable|
-
284
instance_variable_set("@_#{instance_variable}", Hash.new(0))
-
end
-
-
71
@_subscribers = []
-
-
@_subscribers << ActiveSupport::Notifications.subscribe("render_template.action_view") do |_name, _start, _finish, _id, payload|
-
4
path = payload[:layout]
-
4
if path
-
3
@_layouts[path] += 1
-
3
if path =~ /^layouts\/(.*)/
-
3
@_layouts[$1] += 1
-
end
-
end
-
71
end
-
-
@_subscribers << ActiveSupport::Notifications.subscribe("!render_template.action_view") do |_name, _start, _finish, _id, payload|
-
27
if virtual_path = payload[:virtual_path]
-
27
partial = virtual_path =~ /^.*\/_[^\/]*$/
-
-
27
if partial
-
21
@_partials[virtual_path] += 1
-
21
@_partials[virtual_path.split("/").last] += 1
-
end
-
-
27
@_templates[virtual_path] += 1
-
else
-
path = payload[:identifier]
-
if path
-
@_files[path] += 1
-
@_files[path.split("/").last] += 1
-
end
-
end
-
71
end
-
end
-
-
1
def teardown_subscriptions
-
71
return unless defined?(@_subscribers)
-
-
71
@_subscribers.each do |subscriber|
-
142
ActiveSupport::Notifications.unsubscribe(subscriber)
-
end
-
end
-
-
1
def process(*args)
-
50
reset_template_assertion
-
50
super
-
end
-
-
1
def reset_template_assertion
-
50
RENDER_TEMPLATE_INSTANCE_VARIABLES.each do |instance_variable|
-
200
ivar_name = "@_#{instance_variable}"
-
200
if instance_variable_defined?(ivar_name)
-
200
instance_variable_get(ivar_name).clear
-
end
-
end
-
end
-
-
# Asserts that the request was rendered with the appropriate template file or partials.
-
#
-
# # assert that the "new" view template was rendered
-
# assert_template "new"
-
#
-
# # assert that the exact template "admin/posts/new" was rendered
-
# assert_template %r{\Aadmin/posts/new\Z}
-
#
-
# # assert that the layout 'admin' was rendered
-
# assert_template layout: 'admin'
-
# assert_template layout: 'layouts/admin'
-
# assert_template layout: :admin
-
#
-
# # assert that no layout was rendered
-
# assert_template layout: nil
-
# assert_template layout: false
-
#
-
# # assert that the "_customer" partial was rendered twice
-
# assert_template partial: '_customer', count: 2
-
#
-
# # assert that no partials were rendered
-
# assert_template partial: false
-
#
-
# # assert that a file was rendered
-
# assert_template file: "README.rdoc"
-
#
-
# # assert that no file was rendered
-
# assert_template file: nil
-
# assert_template file: false
-
#
-
# In a view test case, you can also assert that specific locals are passed
-
# to partials:
-
#
-
# # assert that the "_customer" partial was rendered with a specific object
-
# assert_template partial: '_customer', locals: { customer: @customer }
-
1
def assert_template(options = {}, message = nil)
-
# Force body to be read in case the template is being streamed.
-
response.body
-
-
case options
-
when NilClass, Regexp, String, Symbol
-
options = options.to_s if Symbol === options
-
rendered = @_templates
-
msg = message || sprintf("expecting <%s> but rendering with <%s>",
-
options.inspect, rendered.keys)
-
matches_template =
-
case options
-
when String
-
!options.empty? && rendered.any? do |t, num|
-
options_splited = options.split(File::SEPARATOR)
-
t_splited = t.split(File::SEPARATOR)
-
t_splited.last(options_splited.size) == options_splited
-
end
-
when Regexp
-
rendered.any? { |t,num| t.match(options) }
-
when NilClass
-
rendered.blank?
-
end
-
assert matches_template, msg
-
when Hash
-
options.assert_valid_keys(:layout, :partial, :locals, :count, :file)
-
-
if options.key?(:layout)
-
expected_layout = options[:layout]
-
msg = message || sprintf("expecting layout <%s> but action rendered <%s>",
-
expected_layout, @_layouts.keys)
-
-
case expected_layout
-
when String, Symbol
-
assert_includes @_layouts.keys, expected_layout.to_s, msg
-
when Regexp
-
assert(@_layouts.keys.any? {|l| l =~ expected_layout }, msg)
-
when nil, false
-
assert(@_layouts.empty?, msg)
-
end
-
end
-
-
if options[:file]
-
assert_includes @_files.keys, options[:file]
-
elsif options.key?(:file)
-
assert @_files.blank?, "expected no files but #{@_files.keys} was rendered"
-
end
-
-
if expected_partial = options[:partial]
-
if expected_locals = options[:locals]
-
if defined?(@_rendered_views)
-
view = expected_partial.to_s.sub(/^_/, '').sub(/\/_(?=[^\/]+\z)/, '/')
-
-
partial_was_not_rendered_msg = "expected %s to be rendered but it was not." % view
-
assert_includes @_rendered_views.rendered_views, view, partial_was_not_rendered_msg
-
-
msg = 'expecting %s to be rendered with %s but was with %s' % [expected_partial,
-
expected_locals,
-
@_rendered_views.locals_for(view)]
-
assert(@_rendered_views.view_rendered?(view, options[:locals]), msg)
-
else
-
warn "the :locals option to #assert_template is only supported in a ActionView::TestCase"
-
end
-
elsif expected_count = options[:count]
-
actual_count = @_partials[expected_partial]
-
msg = message || sprintf("expecting %s to be rendered %s time(s) but rendered %s time(s)",
-
expected_partial, expected_count, actual_count)
-
assert(actual_count == expected_count.to_i, msg)
-
else
-
msg = message || sprintf("expecting partial <%s> but action rendered <%s>",
-
options[:partial], @_partials.keys)
-
assert_includes @_partials, expected_partial, msg
-
end
-
elsif options.key?(:partial)
-
assert @_partials.empty?,
-
"Expected no partials to be rendered"
-
end
-
else
-
raise ArgumentError, "assert_template only accepts a String, Symbol, Hash, Regexp, or nil"
-
end
-
end
-
end
-
-
1
class TestRequest < ActionDispatch::TestRequest #:nodoc:
-
1
DEFAULT_ENV = ActionDispatch::TestRequest::DEFAULT_ENV.dup
-
1
DEFAULT_ENV.delete 'PATH_INFO'
-
-
1
def initialize(env = {})
-
72
super
-
-
72
self.session = TestSession.new
-
72
self.session_options = TestSession::DEFAULT_OPTIONS.merge(:id => SecureRandom.hex(16))
-
end
-
-
1
def assign_parameters(routes, controller_path, action, parameters = {})
-
50
parameters = parameters.symbolize_keys.merge(:controller => controller_path, :action => action)
-
50
extra_keys = routes.extra_keys(parameters)
-
46
non_path_parameters = get? ? query_parameters : request_parameters
-
46
parameters.each do |key, value|
-
145
if value.is_a?(Array) && (value.frozen? || value.any?(&:frozen?))
-
value = value.map{ |v| v.duplicable? ? v.dup : v }
-
58
elsif value.is_a?(Hash) && (value.frozen? || value.any?{ |k,v| v.frozen? })
-
value = Hash[value.map{ |k,v| [k, v.duplicable? ? v.dup : v] }]
-
elsif value.frozen? && value.duplicable?
-
value = value.dup
-
end
-
-
145
if extra_keys.include?(key)
-
29
non_path_parameters[key] = value
-
else
-
116
if value.is_a?(Array)
-
value = value.map(&:to_param)
-
else
-
116
value = value.to_param
-
end
-
-
116
path_parameters[key] = value
-
end
-
end
-
-
# Clear the combined params hash in case it was already referenced.
-
46
@env.delete("action_dispatch.request.parameters")
-
-
# Clear the filter cache variables so they're not stale
-
46
@filtered_parameters = @filtered_env = @filtered_path = nil
-
-
46
params = self.request_parameters.dup
-
46
%w(controller action only_path).each do |k|
-
138
params.delete(k)
-
138
params.delete(k.to_sym)
-
end
-
46
data = params.to_query
-
-
46
@env['CONTENT_LENGTH'] = data.length.to_s
-
46
@env['rack.input'] = StringIO.new(data)
-
end
-
-
1
def recycle!
-
50
@formats = nil
-
1967
@env.delete_if { |k, v| k =~ /^(action_dispatch|rack)\.request/ }
-
1947
@env.delete_if { |k, v| k =~ /^action_dispatch\.rescue/ }
-
50
@method = @request_method = nil
-
50
@fullpath = @ip = @remote_ip = @protocol = nil
-
50
@env['action_dispatch.request.query_parameters'] = {}
-
50
@set_cookies ||= {}
-
50
@set_cookies.update(Hash[cookie_jar.instance_variable_get("@set_cookies").map{ |k,o| [k,o[:value]] }])
-
50
deleted_cookies = cookie_jar.instance_variable_get("@delete_cookies")
-
50
@set_cookies.reject!{ |k,v| deleted_cookies.include?(k) }
-
50
cookie_jar.update(rack_cookies)
-
50
cookie_jar.update(cookies)
-
50
cookie_jar.update(@set_cookies)
-
50
cookie_jar.recycle!
-
end
-
-
1
private
-
-
1
def default_env
-
72
DEFAULT_ENV
-
end
-
end
-
-
1
class TestResponse < ActionDispatch::TestResponse
-
1
def recycle!
-
50
initialize
-
end
-
end
-
-
1
class LiveTestResponse < Live::Response
-
1
def recycle!
-
@body = nil
-
initialize
-
end
-
-
1
def body
-
@body ||= super
-
end
-
-
# Was the response successful?
-
1
alias_method :success?, :successful?
-
-
# Was the URL not found?
-
1
alias_method :missing?, :not_found?
-
-
# Were we redirected?
-
1
alias_method :redirect?, :redirection?
-
-
# Was there a server-side error?
-
1
alias_method :error?, :server_error?
-
end
-
-
# Methods #destroy and #load! are overridden to avoid calling methods on the
-
# @store object, which does not exist for the TestSession class.
-
1
class TestSession < Rack::Session::Abstract::SessionHash #:nodoc:
-
1
DEFAULT_OPTIONS = Rack::Session::Abstract::ID::DEFAULT_OPTIONS
-
-
1
def initialize(session = {})
-
72
super(nil, nil)
-
72
@id = SecureRandom.hex(16)
-
72
@data = stringify_keys(session)
-
72
@loaded = true
-
end
-
-
1
def exists?
-
true
-
end
-
-
1
def keys
-
@data.keys
-
end
-
-
1
def values
-
@data.values
-
end
-
-
1
def destroy
-
clear
-
end
-
-
1
def fetch(key, *args, &block)
-
@data.fetch(key.to_s, *args, &block)
-
end
-
-
1
private
-
-
1
def load!
-
@id
-
end
-
end
-
-
# Superclass for ActionController functional tests. Functional tests allow you to
-
# test a single controller action per test method. This should not be confused with
-
# integration tests (see ActionDispatch::IntegrationTest), which are more like
-
# "stories" that can involve multiple controllers and multiple actions (i.e. multiple
-
# different HTTP requests).
-
#
-
# == Basic example
-
#
-
# Functional tests are written as follows:
-
# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+ or +head+ method to simulate
-
# an HTTP request.
-
# 2. Then, one asserts whether the current state is as expected. "State" can be anything:
-
# the controller's HTTP response, the database contents, etc.
-
#
-
# For example:
-
#
-
# class BooksControllerTest < ActionController::TestCase
-
# def test_create
-
# # Simulate a POST response with the given HTTP parameters.
-
# post(:create, book: { title: "Love Hina" })
-
#
-
# # Assert that the controller tried to redirect us to
-
# # the created book's URI.
-
# assert_response :found
-
#
-
# # Assert that the controller really put the book in the database.
-
# assert_not_nil Book.find_by(title: "Love Hina")
-
# end
-
# end
-
#
-
# You can also send a real document in the simulated HTTP request.
-
#
-
# def test_create
-
# json = {book: { title: "Love Hina" }}.to_json
-
# post :create, json
-
# end
-
#
-
# == Special instance variables
-
#
-
# ActionController::TestCase will also automatically provide the following instance
-
# variables for use in the tests:
-
#
-
# <b>@controller</b>::
-
# The controller instance that will be tested.
-
# <b>@request</b>::
-
# An ActionController::TestRequest, representing the current HTTP
-
# request. You can modify this object before sending the HTTP request. For example,
-
# you might want to set some session properties before sending a GET request.
-
# <b>@response</b>::
-
# An ActionController::TestResponse object, representing the response
-
# of the last HTTP response. In the above example, <tt>@response</tt> becomes valid
-
# after calling +post+. If the various assert methods are not sufficient, then you
-
# may use this object to inspect the HTTP response in detail.
-
#
-
# (Earlier versions of \Rails required each functional test to subclass
-
# Test::Unit::TestCase and define @controller, @request, @response in +setup+.)
-
#
-
# == Controller is automatically inferred
-
#
-
# ActionController::TestCase will automatically infer the controller under test
-
# from the test class name. If the controller cannot be inferred from the test
-
# class name, you can explicitly set it with +tests+.
-
#
-
# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase
-
# tests WidgetController
-
# end
-
#
-
# == \Testing controller internals
-
#
-
# In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions
-
# can be used against. These collections are:
-
#
-
# * assigns: Instance variables assigned in the action that are available for the view.
-
# * session: Objects being saved in the session.
-
# * flash: The flash objects currently in the session.
-
# * cookies: \Cookies being sent to the user on this request.
-
#
-
# These collections can be used just like any other hash:
-
#
-
# assert_not_nil assigns(:person) # makes sure that a @person instance variable was set
-
# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave"
-
# assert flash.empty? # makes sure that there's nothing in the flash
-
#
-
# For historic reasons, the assigns hash uses string-based keys. So <tt>assigns[:person]</tt> won't work, but <tt>assigns["person"]</tt> will. To
-
# appease our yearning for symbols, though, an alternative accessor has been devised using a method call instead of index referencing.
-
# So <tt>assigns(:person)</tt> will work just like <tt>assigns["person"]</tt>, but again, <tt>assigns[:person]</tt> will not work.
-
#
-
# On top of the collections, you have the complete url that a given action redirected to available in <tt>redirect_to_url</tt>.
-
#
-
# For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another
-
# action call which can then be asserted against.
-
#
-
# == Manipulating session and cookie variables
-
#
-
# Sometimes you need to set up the session and cookie variables for a test.
-
# To do this just assign a value to the session or cookie collection:
-
#
-
# session[:key] = "value"
-
# cookies[:key] = "value"
-
#
-
# To clear the cookies for a test just clear the cookie collection:
-
#
-
# cookies.clear
-
#
-
# == \Testing named routes
-
#
-
# If you're using named routes, they can be easily tested using the original named routes' methods straight in the test case.
-
#
-
# assert_redirected_to page_url(title: 'foo')
-
1
class TestCase < ActiveSupport::TestCase
-
1
module Behavior
-
1
extend ActiveSupport::Concern
-
1
include ActionDispatch::TestProcess
-
1
include ActiveSupport::Testing::ConstantLookup
-
1
include Rails::Dom::Testing::Assertions
-
-
1
attr_reader :response, :request
-
-
1
module ClassMethods
-
-
# Sets the controller class name. Useful if the name can't be inferred from test class.
-
# Normalizes +controller_class+ before using.
-
#
-
# tests WidgetController
-
# tests :widget
-
# tests 'widget'
-
1
def tests(controller_class)
-
case controller_class
-
when String, Symbol
-
self.controller_class = "#{controller_class.to_s.camelize}Controller".constantize
-
when Class
-
self.controller_class = controller_class
-
else
-
raise ArgumentError, "controller class must be a String, Symbol, or Class"
-
end
-
end
-
-
1
def controller_class=(new_class)
-
10
self._controller_class = new_class
-
end
-
-
1
def controller_class
-
63
if current_controller_class = self._controller_class
-
53
current_controller_class
-
else
-
10
self.controller_class = determine_default_controller_class(name)
-
end
-
end
-
-
1
def determine_default_controller_class(name)
-
determine_constant_from_test_name(name) do |constant|
-
Class === constant && constant < ActionController::Metal
-
end
-
end
-
end
-
-
# Simulate a GET request with the given parameters.
-
#
-
# - +action+: The controller action to call.
-
# - +parameters+: The HTTP parameters that you want to pass. This may
-
# be +nil+, a hash, or a string that is appropriately encoded
-
# (<tt>application/x-www-form-urlencoded</tt> or <tt>multipart/form-data</tt>).
-
# - +session+: A hash of parameters to store in the session. This may be +nil+.
-
# - +flash+: A hash of parameters to store in the flash. This may be +nil+.
-
#
-
# You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
-
# +post+, +patch+, +put+, +delete+, and +head+.
-
#
-
# Note that the request method is not verified. The different methods are
-
# available to make the tests more expressive.
-
1
def get(action, *args)
-
21
process(action, "GET", *args)
-
end
-
-
# Simulate a POST request with the given parameters and set/volley the response.
-
# See +get+ for more details.
-
1
def post(action, *args)
-
17
process(action, "POST", *args)
-
end
-
-
# Simulate a PATCH request with the given parameters and set/volley the response.
-
# See +get+ for more details.
-
1
def patch(action, *args)
-
6
process(action, "PATCH", *args)
-
end
-
-
# Simulate a PUT request with the given parameters and set/volley the response.
-
# See +get+ for more details.
-
1
def put(action, *args)
-
process(action, "PUT", *args)
-
end
-
-
# Simulate a DELETE request with the given parameters and set/volley the response.
-
# See +get+ for more details.
-
1
def delete(action, *args)
-
6
process(action, "DELETE", *args)
-
end
-
-
# Simulate a HEAD request with the given parameters and set/volley the response.
-
# See +get+ for more details.
-
1
def head(action, *args)
-
process(action, "HEAD", *args)
-
end
-
-
1
def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
-
@request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
-
@request.env['HTTP_ACCEPT'] ||= [Mime::JS, Mime::HTML, Mime::XML, 'text/xml', Mime::ALL].join(', ')
-
__send__(request_method, action, parameters, session, flash).tap do
-
@request.env.delete 'HTTP_X_REQUESTED_WITH'
-
@request.env.delete 'HTTP_ACCEPT'
-
end
-
end
-
1
alias xhr :xml_http_request
-
-
1
def paramify_values(hash_or_array_or_value)
-
275
case hash_or_array_or_value
-
when Hash
-
366
Hash[hash_or_array_or_value.map{|key, value| [key, paramify_values(value)] }]
-
when Array
-
hash_or_array_or_value.map {|i| paramify_values(i)}
-
when Rack::Test::UploadedFile, ActionDispatch::Http::UploadedFile
-
hash_or_array_or_value
-
else
-
135
hash_or_array_or_value.to_param
-
end
-
end
-
-
# Simulate a HTTP request to +action+ by specifying request method,
-
# parameters and set/volley the response.
-
#
-
# - +action+: The controller action to call.
-
# - +http_method+: Request method used to send the http request. Possible values
-
# are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+.
-
# - +parameters+: The HTTP parameters. This may be +nil+, a hash, or a
-
# string that is appropriately encoded (+application/x-www-form-urlencoded+
-
# or +multipart/form-data+).
-
# - +session+: A hash of parameters to store in the session. This may be +nil+.
-
# - +flash+: A hash of parameters to store in the flash. This may be +nil+.
-
#
-
# Example calling +create+ action and sending two params:
-
#
-
# process :create, 'POST', user: { name: 'Gaurish Sharma', email: 'user@example.com' }
-
#
-
# Example sending parameters, +nil+ session and setting a flash message:
-
#
-
# process :view, 'GET', { id: 7 }, nil, { notice: 'This is flash message' }
-
#
-
# To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+ and +HEAD+ requests
-
# prefer using #get, #post, #patch, #put, #delete and #head methods
-
# respectively which will make tests more expressive.
-
#
-
# Note that the request method is not verified.
-
1
def process(action, http_method = 'GET', *args)
-
50
check_required_ivars
-
-
50
if args.first.is_a?(String) && http_method != 'HEAD'
-
@request.env['RAW_POST_DATA'] = args.shift
-
end
-
-
50
parameters, session, flash = args
-
50
parameters ||= {}
-
-
# Ensure that numbers and symbols passed as params are converted to
-
# proper params, as is the case when engaging rack.
-
50
parameters = paramify_values(parameters) if html_format?(parameters)
-
-
50
@html_document = nil
-
50
@html_scanner_document = nil
-
-
50
unless @controller.respond_to?(:recycle!)
-
46
@controller.extend(Testing::Functional)
-
end
-
-
50
@request.recycle!
-
50
@response.recycle!
-
50
@controller.recycle!
-
-
50
@request.env['REQUEST_METHOD'] = http_method
-
-
50
controller_class_name = @controller.class.anonymous? ?
-
"anonymous" :
-
@controller.class.controller_path
-
-
50
@request.assign_parameters(@routes, controller_class_name, action.to_s, parameters)
-
-
46
@request.session.update(session) if session
-
46
@request.flash.update(flash || {})
-
-
46
@controller.request = @request
-
46
@controller.response = @response
-
-
46
build_request_uri(action, parameters)
-
-
46
name = @request.parameters[:action]
-
-
46
@controller.recycle!
-
46
@controller.process(name)
-
-
46
if cookies = @request.env['action_dispatch.cookies']
-
46
unless @response.committed?
-
46
cookies.write(@response)
-
end
-
end
-
46
@response.prepare!
-
-
46
@assigns = @controller.respond_to?(:view_assigns) ? @controller.view_assigns : {}
-
-
46
if flash_value = @request.flash.to_session_value
-
1
@request.session['flash'] = flash_value
-
end
-
-
46
@response
-
end
-
-
1
def setup_controller_request_and_response
-
63
@controller = nil unless defined? @controller
-
-
63
response_klass = TestResponse
-
-
63
if klass = self.class.controller_class
-
63
if klass < ActionController::Live
-
response_klass = LiveTestResponse
-
end
-
63
unless @controller
-
63
begin
-
63
@controller = klass.new
-
rescue
-
warn "could not construct controller #{klass}" if $VERBOSE
-
end
-
end
-
end
-
-
63
@request = build_request
-
63
@response = build_response response_klass
-
63
@response.request = @request
-
-
63
if @controller
-
63
@controller.request = @request
-
63
@controller.params = {}
-
end
-
end
-
-
1
def build_request
-
63
TestRequest.new
-
end
-
-
1
def build_response(klass)
-
63
klass.new
-
end
-
-
1
included do
-
1
include ActionController::TemplateAssertions
-
1
include ActionDispatch::Assertions
-
1
class_attribute :_controller_class
-
1
setup :setup_controller_request_and_response
-
end
-
-
1
private
-
-
1
def document_root_element
-
html_document.root
-
end
-
-
1
def check_required_ivars
-
# Sanity check for required instance variables so we can give an
-
# understandable error message.
-
50
[:@routes, :@controller, :@request, :@response].each do |iv_name|
-
200
if !instance_variable_defined?(iv_name) || instance_variable_get(iv_name).nil?
-
raise "#{iv_name} is nil: make sure you set it in your test's setup method."
-
end
-
end
-
end
-
-
1
def build_request_uri(action, parameters)
-
46
unless @request.env["PATH_INFO"]
-
44
options = @controller.respond_to?(:url_options) ? @controller.__send__(:url_options).merge(parameters) : parameters
-
44
options.update(
-
:action => action,
-
:relative_url_root => nil,
-
:_recall => @request.path_parameters)
-
-
44
if route_name = options.delete(:use_route)
-
ActiveSupport::Deprecation.warn <<-MSG.squish
-
Passing the `use_route` option in functional tests are deprecated.
-
Support for this option in the `process` method (and the related
-
`get`, `head`, `post`, `patch`, `put` and `delete` helpers) will
-
be removed in the next version without replacement.
-
-
Functional tests are essentially unit tests for controllers and
-
they should not require knowledge to how the application's routes
-
are configured. Instead, you should explicitly pass the appropiate
-
params to the `process` method.
-
-
Previously the engines guide also contained an incorrect example
-
that recommended using this option to test an engine's controllers
-
within the dummy application. That recommendation was incorrect
-
and has since been corrected. Instead, you should override the
-
`@routes` variable in the test case with `Foo::Engine.routes`. See
-
the updated engines guide for details.
-
MSG
-
end
-
-
44
url, query_string = @routes.path_for(options, route_name).split("?", 2)
-
-
44
@request.env["SCRIPT_NAME"] = @controller.config.relative_url_root
-
44
@request.env["PATH_INFO"] = url
-
44
@request.env["QUERY_STRING"] = query_string || ""
-
end
-
end
-
-
1
def html_format?(parameters)
-
50
return true unless parameters.key?(:format)
-
3
Mime.fetch(parameters[:format]) { Mime['html'] }.html?
-
end
-
end
-
-
1
include Behavior
-
end
-
end
-
-
1
module ActionDispatch
-
# Provides callbacks to be executed before and after dispatching the request.
-
1
class Callbacks
-
1
include ActiveSupport::Callbacks
-
-
1
define_callbacks :call
-
-
1
class << self
-
1
delegate :to_prepare, :to_cleanup, :to => "ActionDispatch::Reloader"
-
-
1
def before(*args, &block)
-
set_callback(:call, :before, *args, &block)
-
end
-
-
1
def after(*args, &block)
-
set_callback(:call, :after, *args, &block)
-
end
-
end
-
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
error = nil
-
23
result = run_callbacks :call do
-
23
begin
-
23
@app.call(env)
-
rescue => error
-
end
-
end
-
23
raise error if error
-
23
result
-
end
-
end
-
end
-
1
require 'action_dispatch/http/request'
-
1
require 'action_dispatch/middleware/exception_wrapper'
-
1
require 'action_dispatch/routing/inspector'
-
-
1
module ActionDispatch
-
# This middleware is responsible for logging exceptions and
-
# showing a debugging page in case the request is local.
-
1
class DebugExceptions
-
1
RESCUES_TEMPLATE_PATH = File.expand_path('../templates', __FILE__)
-
-
1
def initialize(app, routes_app = nil)
-
1
@app = app
-
1
@routes_app = routes_app
-
end
-
-
1
def call(env)
-
23
_, headers, body = response = @app.call(env)
-
-
23
if headers['X-Cascade'] == 'pass'
-
body.close if body.respond_to?(:close)
-
raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
-
end
-
-
23
response
-
rescue Exception => exception
-
raise exception if env['action_dispatch.show_exceptions'] == false
-
render_exception(env, exception)
-
end
-
-
1
private
-
-
1
def render_exception(env, exception)
-
wrapper = ExceptionWrapper.new(env, exception)
-
log_error(env, wrapper)
-
-
if env['action_dispatch.show_detailed_exceptions']
-
request = Request.new(env)
-
traces = wrapper.traces
-
-
trace_to_show = 'Application Trace'
-
if traces[trace_to_show].empty? && wrapper.rescue_template != 'routing_error'
-
trace_to_show = 'Full Trace'
-
end
-
-
if source_to_show = traces[trace_to_show].first
-
source_to_show_id = source_to_show[:id]
-
end
-
-
template = ActionView::Base.new([RESCUES_TEMPLATE_PATH],
-
request: request,
-
exception: wrapper.exception,
-
traces: traces,
-
show_source_idx: source_to_show_id,
-
trace_to_show: trace_to_show,
-
routes_inspector: routes_inspector(exception),
-
source_extracts: wrapper.source_extracts,
-
line_number: wrapper.line_number,
-
file: wrapper.file
-
)
-
file = "rescues/#{wrapper.rescue_template}"
-
-
if request.xhr?
-
body = template.render(template: file, layout: false, formats: [:text])
-
format = "text/plain"
-
else
-
body = template.render(template: file, layout: 'rescues/layout')
-
format = "text/html"
-
end
-
render(wrapper.status_code, body, format)
-
else
-
raise exception
-
end
-
end
-
-
1
def render(status, body, format)
-
[status, {'Content-Type' => "#{format}; charset=#{Response.default_charset}", 'Content-Length' => body.bytesize.to_s}, [body]]
-
end
-
-
1
def log_error(env, wrapper)
-
logger = logger(env)
-
return unless logger
-
-
exception = wrapper.exception
-
-
trace = wrapper.application_trace
-
trace = wrapper.framework_trace if trace.empty?
-
-
ActiveSupport::Deprecation.silence do
-
message = "\n#{exception.class} (#{exception.message}):\n"
-
message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
-
message << " " << trace.join("\n ")
-
logger.fatal("#{message}\n\n")
-
end
-
end
-
-
1
def logger(env)
-
env['action_dispatch.logger'] || stderr_logger
-
end
-
-
1
def stderr_logger
-
@stderr_logger ||= ActiveSupport::Logger.new($stderr)
-
end
-
-
1
def routes_inspector(exception)
-
if @routes_app.respond_to?(:routes) && (exception.is_a?(ActionController::RoutingError) || exception.is_a?(ActionView::Template::Error))
-
ActionDispatch::Routing::RoutesInspector.new(@routes_app.routes.routes)
-
end
-
end
-
end
-
end
-
1
require 'action_controller/metal/exceptions'
-
1
require 'active_support/core_ext/module/attribute_accessors'
-
-
1
module ActionDispatch
-
1
class ExceptionWrapper
-
1
cattr_accessor :rescue_responses
-
1
@@rescue_responses = Hash.new(:internal_server_error)
-
1
@@rescue_responses.merge!(
-
'ActionController::RoutingError' => :not_found,
-
'AbstractController::ActionNotFound' => :not_found,
-
'ActionController::MethodNotAllowed' => :method_not_allowed,
-
'ActionController::UnknownHttpMethod' => :method_not_allowed,
-
'ActionController::NotImplemented' => :not_implemented,
-
'ActionController::UnknownFormat' => :not_acceptable,
-
'ActionController::InvalidAuthenticityToken' => :unprocessable_entity,
-
'ActionController::InvalidCrossOriginRequest' => :unprocessable_entity,
-
'ActionDispatch::ParamsParser::ParseError' => :bad_request,
-
'ActionController::BadRequest' => :bad_request,
-
'ActionController::ParameterMissing' => :bad_request
-
)
-
-
1
cattr_accessor :rescue_templates
-
1
@@rescue_templates = Hash.new('diagnostics')
-
1
@@rescue_templates.merge!(
-
'ActionView::MissingTemplate' => 'missing_template',
-
'ActionController::RoutingError' => 'routing_error',
-
'AbstractController::ActionNotFound' => 'unknown_action',
-
'ActionView::Template::Error' => 'template_error'
-
)
-
-
1
attr_reader :env, :exception, :line_number, :file
-
-
1
def initialize(env, exception)
-
@env = env
-
@exception = original_exception(exception)
-
-
expand_backtrace if exception.is_a?(SyntaxError) || exception.try(:original_exception).try(:is_a?, SyntaxError)
-
end
-
-
1
def rescue_template
-
@@rescue_templates[@exception.class.name]
-
end
-
-
1
def status_code
-
self.class.status_code_for_exception(@exception.class.name)
-
end
-
-
1
def application_trace
-
clean_backtrace(:silent)
-
end
-
-
1
def framework_trace
-
clean_backtrace(:noise)
-
end
-
-
1
def full_trace
-
clean_backtrace(:all)
-
end
-
-
1
def traces
-
appplication_trace_with_ids = []
-
framework_trace_with_ids = []
-
full_trace_with_ids = []
-
-
full_trace.each_with_index do |trace, idx|
-
trace_with_id = { id: idx, trace: trace }
-
-
if application_trace.include?(trace)
-
appplication_trace_with_ids << trace_with_id
-
else
-
framework_trace_with_ids << trace_with_id
-
end
-
-
full_trace_with_ids << trace_with_id
-
end
-
-
{
-
"Application Trace" => appplication_trace_with_ids,
-
"Framework Trace" => framework_trace_with_ids,
-
"Full Trace" => full_trace_with_ids
-
}
-
end
-
-
1
def self.status_code_for_exception(class_name)
-
Rack::Utils.status_code(@@rescue_responses[class_name])
-
end
-
-
1
def source_extracts
-
backtrace.map do |trace|
-
file, line = trace.split(":")
-
line_number = line.to_i
-
-
{
-
code: source_fragment(file, line_number),
-
line_number: line_number
-
}
-
end
-
end
-
-
1
private
-
-
1
def backtrace
-
Array(@exception.backtrace)
-
end
-
-
1
def original_exception(exception)
-
if registered_original_exception?(exception)
-
exception.original_exception
-
else
-
exception
-
end
-
end
-
-
1
def registered_original_exception?(exception)
-
exception.respond_to?(:original_exception) && @@rescue_responses.has_key?(exception.original_exception.class.name)
-
end
-
-
1
def clean_backtrace(*args)
-
if backtrace_cleaner
-
backtrace_cleaner.clean(backtrace, *args)
-
else
-
backtrace
-
end
-
end
-
-
1
def backtrace_cleaner
-
@backtrace_cleaner ||= @env['action_dispatch.backtrace_cleaner']
-
end
-
-
1
def source_fragment(path, line)
-
return unless Rails.respond_to?(:root) && Rails.root
-
full_path = Rails.root.join(path)
-
if File.exist?(full_path)
-
File.open(full_path, "r") do |file|
-
start = [line - 3, 0].max
-
lines = file.each_line.drop(start).take(6)
-
Hash[*(start+1..(lines.count+start)).zip(lines).flatten]
-
end
-
end
-
end
-
-
1
def expand_backtrace
-
@exception.backtrace.unshift(
-
@exception.to_s.split("\n")
-
).flatten!
-
end
-
end
-
end
-
1
require 'active_support/core_ext/hash/keys'
-
-
1
module ActionDispatch
-
1
class Request < Rack::Request
-
# Access the contents of the flash. Use <tt>flash["notice"]</tt> to
-
# read a notice you put there or <tt>flash["notice"] = "hello"</tt>
-
# to put a new one.
-
1
def flash
-
144
@env[Flash::KEY] ||= Flash::FlashHash.from_session_value(session["flash"])
-
end
-
end
-
-
# The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed
-
# to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create
-
# action that sets <tt>flash[:notice] = "Post successfully created"</tt> before redirecting to a display action that can
-
# then expose the flash to its template. Actually, that exposure is automatically done.
-
#
-
# class PostsController < ActionController::Base
-
# def create
-
# # save post
-
# flash[:notice] = "Post successfully created"
-
# redirect_to @post
-
# end
-
#
-
# def show
-
# # doesn't need to assign the flash notice to the template, that's done automatically
-
# end
-
# end
-
#
-
# show.html.erb
-
# <% if flash[:notice] %>
-
# <div class="notice"><%= flash[:notice] %></div>
-
# <% end %>
-
#
-
# Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available:
-
#
-
# flash.alert = "You must be logged in"
-
# flash.notice = "Post successfully created"
-
#
-
# This example places a string in the flash. And of course, you can put as many as you like at a time too. If you want to pass
-
# non-primitive types, you will have to handle that in your application. Example: To show messages with links, you will have to
-
# use sanitize helper.
-
#
-
# Just remember: They'll be gone by the time the next action has been performed.
-
#
-
# See docs on the FlashHash class for more details about the flash.
-
1
class Flash
-
1
KEY = 'action_dispatch.request.flash_hash'.freeze
-
-
1
class FlashNow #:nodoc:
-
1
attr_accessor :flash
-
-
1
def initialize(flash)
-
4
@flash = flash
-
end
-
-
1
def []=(k, v)
-
4
k = k.to_s
-
4
@flash[k] = v
-
4
@flash.discard(k)
-
4
v
-
end
-
-
1
def [](k)
-
@flash[k.to_s]
-
end
-
-
# Convenience accessor for <tt>flash.now[:alert]=</tt>.
-
1
def alert=(message)
-
self[:alert] = message
-
end
-
-
# Convenience accessor for <tt>flash.now[:notice]=</tt>.
-
1
def notice=(message)
-
self[:notice] = message
-
end
-
end
-
-
1
class FlashHash
-
1
include Enumerable
-
-
1
def self.from_session_value(value) #:nodoc:
-
69
flash = case value
-
when FlashHash # Rails 3.1, 3.2
-
new(value.instance_variable_get(:@flashes), value.instance_variable_get(:@used))
-
when Hash # Rails 4.0
-
2
new(value['flashes'], value['discard'])
-
else
-
67
new
-
end
-
-
69
flash.tap(&:sweep)
-
end
-
-
# Builds a hash containing the discarded values and the hashes
-
# representing the flashes.
-
# If there are no values in @flashes, returns nil.
-
1
def to_session_value #:nodoc:
-
51
return nil if empty?
-
6
{'discard' => @discard.to_a, 'flashes' => @flashes}
-
end
-
-
1
def initialize(flashes = {}, discard = []) #:nodoc:
-
69
@discard = Set.new(stringify_array(discard))
-
69
@flashes = flashes.stringify_keys
-
69
@now = nil
-
end
-
-
1
def initialize_copy(other)
-
5
if other.now_is_loaded?
-
3
@now = other.now.dup
-
3
@now.flash = self
-
end
-
5
super
-
end
-
-
1
def []=(k, v)
-
5
k = k.to_s
-
5
@discard.delete k
-
5
@flashes[k] = v
-
end
-
-
1
def [](k)
-
5
@flashes[k.to_s]
-
end
-
-
1
def update(h) #:nodoc:
-
46
@discard.subtract stringify_array(h.keys)
-
46
@flashes.update h.stringify_keys
-
46
self
-
end
-
-
1
def keys
-
@flashes.keys
-
end
-
-
1
def key?(name)
-
@flashes.key? name.to_s
-
end
-
-
1
def delete(key)
-
key = key.to_s
-
@discard.delete key
-
@flashes.delete key
-
self
-
end
-
-
1
def to_hash
-
@flashes.dup
-
end
-
-
1
def empty?
-
74
@flashes.empty?
-
end
-
-
1
def clear
-
@discard.clear
-
@flashes.clear
-
end
-
-
1
def each(&block)
-
23
@flashes.each(&block)
-
end
-
-
1
alias :merge! :update
-
-
1
def replace(h) #:nodoc:
-
@discard.clear
-
@flashes.replace h.stringify_keys
-
self
-
end
-
-
# Sets a flash that will not be available to the next action, only to the current.
-
#
-
# flash.now[:message] = "Hello current action"
-
#
-
# This method enables you to use the flash as a central messaging system in your app.
-
# When you need to pass an object to the next action, you use the standard flash assign (<tt>[]=</tt>).
-
# When you need to pass an object to the current action, you use <tt>now</tt>, and your object will
-
# vanish when the current action is done.
-
#
-
# Entries set via <tt>now</tt> are accessed the same way as standard entries: <tt>flash['my-key']</tt>.
-
#
-
# Also, brings two convenience accessors:
-
#
-
# flash.now.alert = "Beware now!"
-
# # Equivalent to flash.now[:alert] = "Beware now!"
-
#
-
# flash.now.notice = "Good luck now!"
-
# # Equivalent to flash.now[:notice] = "Good luck now!"
-
1
def now
-
7
@now ||= FlashNow.new(self)
-
end
-
-
# Keeps either the entire current flash or a specific flash entry available for the next action:
-
#
-
# flash.keep # keeps the entire flash
-
# flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded
-
1
def keep(k = nil)
-
k = k.to_s if k
-
@discard.subtract Array(k || keys)
-
k ? self[k] : self
-
end
-
-
# Marks the entire flash or a single flash entry to be discarded by the end of the current action:
-
#
-
# flash.discard # discard the entire flash at the end of the current action
-
# flash.discard(:warning) # discard only the "warning" entry at the end of the current action
-
1
def discard(k = nil)
-
4
k = k.to_s if k
-
4
@discard.merge Array(k || keys)
-
4
k ? self[k] : self
-
end
-
-
# Mark for removal entries that were kept, and delete unkept ones.
-
#
-
# This method is called automatically by filters, so you generally don't need to care about it.
-
1
def sweep #:nodoc:
-
70
@discard.each { |k| @flashes.delete k }
-
69
@discard.replace @flashes.keys
-
end
-
-
# Convenience accessor for <tt>flash[:alert]</tt>.
-
1
def alert
-
self[:alert]
-
end
-
-
# Convenience accessor for <tt>flash[:alert]=</tt>.
-
1
def alert=(message)
-
self[:alert] = message
-
end
-
-
# Convenience accessor for <tt>flash[:notice]</tt>.
-
1
def notice
-
self[:notice]
-
end
-
-
# Convenience accessor for <tt>flash[:notice]=</tt>.
-
1
def notice=(message)
-
self[:notice] = message
-
end
-
-
1
protected
-
1
def now_is_loaded?
-
5
@now
-
end
-
-
1
def stringify_array(array)
-
115
array.map do |item|
-
1
item.kind_of?(Symbol) ? item.to_s : item
-
end
-
end
-
end
-
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
@app.call(env)
-
ensure
-
23
session = Request::Session.find(env) || {}
-
23
flash_hash = env[KEY]
-
-
23
if flash_hash && (flash_hash.present? || session.key?('flash'))
-
5
session["flash"] = flash_hash.to_session_value
-
5
env[KEY] = flash_hash.dup
-
end
-
-
if (!session.respond_to?(:loaded?) || session.loaded?) && # (reset_session uses {}, which doesn't implement #loaded?)
-
23
session.key?('flash') && session['flash'].nil?
-
session.delete('flash')
-
end
-
end
-
end
-
end
-
1
module ActionDispatch
-
# When called, this middleware renders an error page. By default if an HTML
-
# response is expected it will render static error pages from the `/public`
-
# directory. For example when this middleware receives a 500 response it will
-
# render the template found in `/public/500.html`.
-
# If an internationalized locale is set, this middleware will attempt to render
-
# the template in `/public/500.<locale>.html`. If an internationalized template
-
# is not found it will fall back on `/public/500.html`.
-
#
-
# When a request with a content type other than HTML is made, this middleware
-
# will attempt to convert error information into the appropriate response type.
-
1
class PublicExceptions
-
1
attr_accessor :public_path
-
-
1
def initialize(public_path)
-
1
@public_path = public_path
-
end
-
-
1
def call(env)
-
status = env["PATH_INFO"][1..-1]
-
request = ActionDispatch::Request.new(env)
-
content_type = request.formats.first
-
body = { :status => status, :error => Rack::Utils::HTTP_STATUS_CODES.fetch(status.to_i, Rack::Utils::HTTP_STATUS_CODES[500]) }
-
-
render(status, content_type, body)
-
end
-
-
1
private
-
-
1
def render(status, content_type, body)
-
format = "to_#{content_type.to_sym}" if content_type
-
if format && body.respond_to?(format)
-
render_format(status, content_type, body.public_send(format))
-
else
-
render_html(status)
-
end
-
end
-
-
1
def render_format(status, content_type, body)
-
[status, {'Content-Type' => "#{content_type}; charset=#{ActionDispatch::Response.default_charset}",
-
'Content-Length' => body.bytesize.to_s}, [body]]
-
end
-
-
1
def render_html(status)
-
path = "#{public_path}/#{status}.#{I18n.locale}.html"
-
path = "#{public_path}/#{status}.html" unless (found = File.exist?(path))
-
-
if found || File.exist?(path)
-
render_format(status, 'text/html', File.read(path))
-
else
-
[404, { "X-Cascade" => "pass" }, []]
-
end
-
end
-
end
-
end
-
1
require 'active_support/deprecation/reporting'
-
-
1
module ActionDispatch
-
# ActionDispatch::Reloader provides prepare and cleanup callbacks,
-
# intended to assist with code reloading during development.
-
#
-
# Prepare callbacks are run before each request, and cleanup callbacks
-
# after each request. In this respect they are analogs of ActionDispatch::Callback's
-
# before and after callbacks. However, cleanup callbacks are not called until the
-
# request is fully complete -- that is, after #close has been called on
-
# the response body. This is important for streaming responses such as the
-
# following:
-
#
-
# self.response_body = lambda { |response, output|
-
# # code here which refers to application models
-
# }
-
#
-
# Cleanup callbacks will not be called until after the response_body lambda
-
# is evaluated, ensuring that it can refer to application models and other
-
# classes before they are unloaded.
-
#
-
# By default, ActionDispatch::Reloader is included in the middleware stack
-
# only in the development environment; specifically, when +config.cache_classes+
-
# is false. Callbacks may be registered even when it is not included in the
-
# middleware stack, but are executed only when <tt>ActionDispatch::Reloader.prepare!</tt>
-
# or <tt>ActionDispatch::Reloader.cleanup!</tt> are called manually.
-
#
-
1
class Reloader
-
1
include ActiveSupport::Callbacks
-
1
include ActiveSupport::Deprecation::Reporting
-
-
1
define_callbacks :prepare
-
1
define_callbacks :cleanup
-
-
# Add a prepare callback. Prepare callbacks are run before each request, prior
-
# to ActionDispatch::Callback's before callbacks.
-
1
def self.to_prepare(*args, &block)
-
4
unless block_given?
-
warn "to_prepare without a block is deprecated. Please use a block"
-
end
-
4
set_callback(:prepare, *args, &block)
-
end
-
-
# Add a cleanup callback. Cleanup callbacks are run after each request is
-
# complete (after #close is called on the response body).
-
1
def self.to_cleanup(*args, &block)
-
unless block_given?
-
warn "to_cleanup without a block is deprecated. Please use a block"
-
end
-
set_callback(:cleanup, *args, &block)
-
end
-
-
# Execute all prepare callbacks.
-
1
def self.prepare!
-
1
new(nil).prepare!
-
end
-
-
# Execute all cleanup callbacks.
-
1
def self.cleanup!
-
new(nil).cleanup!
-
end
-
-
1
def initialize(app, condition=nil)
-
1
@app = app
-
1
@condition = condition || lambda { true }
-
1
@validated = true
-
end
-
-
1
def call(env)
-
@validated = @condition.call
-
prepare!
-
-
response = @app.call(env)
-
response[2] = ::Rack::BodyProxy.new(response[2]) { cleanup! }
-
-
response
-
rescue Exception
-
cleanup!
-
raise
-
end
-
-
1
def prepare! #:nodoc:
-
1
run_callbacks :prepare if validated?
-
end
-
-
1
def cleanup! #:nodoc:
-
run_callbacks :cleanup if validated?
-
ensure
-
@validated = true
-
end
-
-
1
private
-
-
1
def validated? #:nodoc:
-
1
@validated
-
end
-
end
-
end
-
1
require 'ipaddr'
-
-
1
module ActionDispatch
-
# This middleware calculates the IP address of the remote client that is
-
# making the request. It does this by checking various headers that could
-
# contain the address, and then picking the last-set address that is not
-
# on the list of trusted IPs. This follows the precedent set by e.g.
-
# {the Tomcat server}[https://issues.apache.org/bugzilla/show_bug.cgi?id=50453],
-
# with {reasoning explained at length}[http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection]
-
# by @gingerlime. A more detailed explanation of the algorithm is given
-
# at GetIp#calculate_ip.
-
#
-
# Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2]
-
# requires. Some Rack servers simply drop preceding headers, and only report
-
# the value that was {given in the last header}[http://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers].
-
# If you are behind multiple proxy servers (like NGINX to HAProxy to Unicorn)
-
# then you should test your Rack server to make sure your data is good.
-
#
-
# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING.
-
# This middleware assumes that there is at least one proxy sitting around
-
# and setting headers with the client's remote IP address. If you don't use
-
# a proxy, because you are hosted on e.g. Heroku without SSL, any client can
-
# claim to have any IP address by setting the X-Forwarded-For header. If you
-
# care about that, then you need to explicitly drop or ignore those headers
-
# sometime before this middleware runs.
-
1
class RemoteIp
-
1
class IpSpoofAttackError < StandardError; end
-
-
# The default trusted IPs list simply includes IP addresses that are
-
# guaranteed by the IP specification to be private addresses. Those will
-
# not be the ultimate client IP in production, and so are discarded. See
-
# http://en.wikipedia.org/wiki/Private_network for details.
-
1
TRUSTED_PROXIES = [
-
"127.0.0.1", # localhost IPv4
-
"::1", # localhost IPv6
-
"fc00::/7", # private IPv6 range fc00::/7
-
"10.0.0.0/8", # private IPv4 range 10.x.x.x
-
"172.16.0.0/12", # private IPv4 range 172.16.0.0 .. 172.31.255.255
-
"192.168.0.0/16", # private IPv4 range 192.168.x.x
-
6
].map { |proxy| IPAddr.new(proxy) }
-
-
1
attr_reader :check_ip, :proxies
-
-
# Create a new +RemoteIp+ middleware instance.
-
#
-
# The +check_ip_spoofing+ option is on by default. When on, an exception
-
# is raised if it looks like the client is trying to lie about its own IP
-
# address. It makes sense to turn off this check on sites aimed at non-IP
-
# clients (like WAP devices), or behind proxies that set headers in an
-
# incorrect or confusing way (like AWS ELB).
-
#
-
# The +custom_proxies+ argument can take an Array of string, IPAddr, or
-
# Regexp objects which will be used instead of +TRUSTED_PROXIES+. If a
-
# single string, IPAddr, or Regexp object is provided, it will be used in
-
# addition to +TRUSTED_PROXIES+. Any proxy setup will put the value you
-
# want in the middle (or at the beginning) of the X-Forwarded-For list,
-
# with your proxy servers after it. If your proxies aren't removed, pass
-
# them in via the +custom_proxies+ parameter. That way, the middleware will
-
# ignore those IP addresses, and return the one that you want.
-
1
def initialize(app, check_ip_spoofing = true, custom_proxies = nil)
-
1
@app = app
-
1
@check_ip = check_ip_spoofing
-
1
@proxies = if custom_proxies.blank?
-
1
TRUSTED_PROXIES
-
elsif custom_proxies.respond_to?(:any?)
-
custom_proxies
-
else
-
Array(custom_proxies) + TRUSTED_PROXIES
-
end
-
end
-
-
# Since the IP address may not be needed, we store the object here
-
# without calculating the IP to keep from slowing down the majority of
-
# requests. For those requests that do need to know the IP, the
-
# GetIp#calculate_ip method will calculate the memoized client IP address.
-
1
def call(env)
-
23
env["action_dispatch.remote_ip"] = GetIp.new(env, self)
-
23
@app.call(env)
-
end
-
-
# The GetIp class exists as a way to defer processing of the request data
-
# into an actual IP address. If the ActionDispatch::Request#remote_ip method
-
# is called, this class will calculate the value and then memoize it.
-
1
class GetIp
-
1
def initialize(env, middleware)
-
23
@env = env
-
23
@check_ip = middleware.check_ip
-
23
@proxies = middleware.proxies
-
end
-
-
# Sort through the various IP address headers, looking for the IP most
-
# likely to be the address of the actual remote client making this
-
# request.
-
#
-
# REMOTE_ADDR will be correct if the request is made directly against the
-
# Ruby process, on e.g. Heroku. When the request is proxied by another
-
# server like HAProxy or NGINX, the IP address that made the original
-
# request will be put in an X-Forwarded-For header. If there are multiple
-
# proxies, that header may contain a list of IPs. Other proxy services
-
# set the Client-Ip header instead, so we check that too.
-
#
-
# As discussed in {this post about Rails IP Spoofing}[http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/],
-
# while the first IP in the list is likely to be the "originating" IP,
-
# it could also have been set by the client maliciously.
-
#
-
# In order to find the first address that is (probably) accurate, we
-
# take the list of IPs, remove known and trusted proxies, and then take
-
# the last address left, which was presumably set by one of those proxies.
-
1
def calculate_ip
-
# Set by the Rack web server, this is a single value.
-
remote_addr = ips_from('REMOTE_ADDR').last
-
-
# Could be a CSV list and/or repeated headers that were concatenated.
-
client_ips = ips_from('HTTP_CLIENT_IP').reverse
-
forwarded_ips = ips_from('HTTP_X_FORWARDED_FOR').reverse
-
-
# +Client-Ip+ and +X-Forwarded-For+ should not, generally, both be set.
-
# If they are both set, it means that this request passed through two
-
# proxies with incompatible IP header conventions, and there is no way
-
# for us to determine which header is the right one after the fact.
-
# Since we have no idea, we give up and explode.
-
should_check_ip = @check_ip && client_ips.last && forwarded_ips.last
-
if should_check_ip && !forwarded_ips.include?(client_ips.last)
-
# We don't know which came from the proxy, and which from the user
-
raise IpSpoofAttackError, "IP spoofing attack?! " +
-
"HTTP_CLIENT_IP=#{@env['HTTP_CLIENT_IP'].inspect} " +
-
"HTTP_X_FORWARDED_FOR=#{@env['HTTP_X_FORWARDED_FOR'].inspect}"
-
end
-
-
# We assume these things about the IP headers:
-
#
-
# - X-Forwarded-For will be a list of IPs, one per proxy, or blank
-
# - Client-Ip is propagated from the outermost proxy, or is blank
-
# - REMOTE_ADDR will be the IP that made the request to Rack
-
ips = [forwarded_ips, client_ips, remote_addr].flatten.compact
-
-
# If every single IP option is in the trusted list, just return REMOTE_ADDR
-
filter_proxies(ips).first || remote_addr
-
end
-
-
# Memoizes the value returned by #calculate_ip and returns it for
-
# ActionDispatch::Request to use.
-
1
def to_s
-
@ip ||= calculate_ip
-
end
-
-
1
protected
-
-
1
def ips_from(header)
-
# Split the comma-separated list into an array of strings
-
ips = @env[header] ? @env[header].strip.split(/[,\s]+/) : []
-
ips.select do |ip|
-
begin
-
# Only return IPs that are valid according to the IPAddr#new method
-
range = IPAddr.new(ip).to_range
-
# we want to make sure nobody is sneaking a netmask in
-
range.begin == range.end
-
rescue ArgumentError
-
nil
-
end
-
end
-
end
-
-
1
def filter_proxies(ips)
-
ips.reject do |ip|
-
@proxies.any? { |proxy| proxy === ip }
-
end
-
end
-
-
end
-
-
end
-
end
-
1
require 'securerandom'
-
1
require 'active_support/core_ext/string/access'
-
-
1
module ActionDispatch
-
# Makes a unique request id available to the action_dispatch.request_id env variable (which is then accessible through
-
# ActionDispatch::Request#uuid) and sends the same id to the client via the X-Request-Id header.
-
#
-
# The unique request id is either based on the X-Request-Id header in the request, which would typically be generated
-
# by a firewall, load balancer, or the web server, or, if this header is not available, a random uuid. If the
-
# header is accepted from the outside world, we sanitize it to a max of 255 chars and alphanumeric and dashes only.
-
#
-
# The unique request id can be used to trace a request end-to-end and would typically end up being part of log files
-
# from multiple pieces of the stack.
-
1
class RequestId
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
env["action_dispatch.request_id"] = external_request_id(env) || internal_request_id
-
46
@app.call(env).tap { |_status, headers, _body| headers["X-Request-Id"] = env["action_dispatch.request_id"] }
-
end
-
-
1
private
-
1
def external_request_id(env)
-
23
if request_id = env["HTTP_X_REQUEST_ID"].presence
-
request_id.gsub(/[^\w\-]/, "").first(255)
-
end
-
end
-
-
1
def internal_request_id
-
23
SecureRandom.uuid
-
end
-
end
-
end
-
1
require 'rack/utils'
-
1
require 'rack/request'
-
1
require 'rack/session/abstract/id'
-
1
require 'action_dispatch/middleware/cookies'
-
1
require 'action_dispatch/request/session'
-
-
1
module ActionDispatch
-
1
module Session
-
1
class SessionRestoreError < StandardError #:nodoc:
-
1
attr_reader :original_exception
-
-
1
def initialize(const_error)
-
@original_exception = const_error
-
-
super("Session contains objects whose class definition isn't available.\n" +
-
"Remember to require the classes for all objects kept in the session.\n" +
-
"(Original exception: #{const_error.message} [#{const_error.class}])\n")
-
end
-
end
-
-
1
module Compatibility
-
1
def initialize(app, options = {})
-
1
options[:key] ||= '_session_id'
-
1
super
-
end
-
-
1
def generate_sid
-
3
sid = SecureRandom.hex(16)
-
3
sid.encode!(Encoding::UTF_8)
-
3
sid
-
end
-
-
1
protected
-
-
1
def initialize_sid
-
1
@default_options.delete(:sidbits)
-
1
@default_options.delete(:secure_random)
-
end
-
end
-
-
1
module StaleSessionCheck
-
1
def load_session(env)
-
stale_session_check! { super }
-
end
-
-
1
def extract_session_id(env)
-
stale_session_check! { super }
-
end
-
-
1
def stale_session_check!
-
51
yield
-
rescue ArgumentError => argument_error
-
if argument_error.message =~ %r{undefined class/module ([\w:]*\w)}
-
begin
-
# Note that the regexp does not allow $1 to end with a ':'
-
$1.constantize
-
rescue LoadError, NameError => e
-
raise ActionDispatch::Session::SessionRestoreError, e, e.backtrace
-
end
-
retry
-
else
-
raise
-
end
-
end
-
end
-
-
1
module SessionObject # :nodoc:
-
1
def prepare_session(env)
-
23
Request::Session.create(self, env, @default_options)
-
end
-
-
1
def loaded_session?(session)
-
28
!session.is_a?(Request::Session) || session.loaded?
-
end
-
end
-
-
1
class AbstractStore < Rack::Session::Abstract::ID
-
1
include Compatibility
-
1
include StaleSessionCheck
-
1
include SessionObject
-
-
1
private
-
-
1
def set_cookie(env, session_id, cookie)
-
request = ActionDispatch::Request.new(env)
-
request.cookie_jar[key] = cookie
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/hash/keys'
-
1
require 'action_dispatch/middleware/session/abstract_store'
-
1
require 'rack/session/cookie'
-
-
1
module ActionDispatch
-
1
module Session
-
# This cookie-based session store is the Rails default. It is
-
# dramatically faster than the alternatives.
-
#
-
# Sessions typically contain at most a user_id and flash message; both fit
-
# within the 4K cookie size limit. A CookieOverflow exception is raised if
-
# you attempt to store more than 4K of data.
-
#
-
# The cookie jar used for storage is automatically configured to be the
-
# best possible option given your application's configuration.
-
#
-
# If you only have secret_token set, your cookies will be signed, but
-
# not encrypted. This means a user cannot alter their +user_id+ without
-
# knowing your app's secret key, but can easily read their +user_id+. This
-
# was the default for Rails 3 apps.
-
#
-
# If you have secret_key_base set, your cookies will be encrypted. This
-
# goes a step further than signed cookies in that encrypted cookies cannot
-
# be altered or read by users. This is the default starting in Rails 4.
-
#
-
# If you have both secret_token and secret_key base set, your cookies will
-
# be encrypted, and signed cookies generated by Rails 3 will be
-
# transparently read and encrypted to provide a smooth upgrade path.
-
#
-
# Configure your session store in config/initializers/session_store.rb:
-
#
-
# Rails.application.config.session_store :cookie_store, key: '_your_app_session'
-
#
-
# Configure your secret key in config/secrets.yml:
-
#
-
# development:
-
# secret_key_base: 'secret key'
-
#
-
# To generate a secret key for an existing application, run `rake secret`.
-
#
-
# If you are upgrading an existing Rails 3 app, you should leave your
-
# existing secret_token in place and simply add the new secret_key_base.
-
# Note that you should wait to set secret_key_base until you have 100% of
-
# your userbase on Rails 4 and are reasonably sure you will not need to
-
# rollback to Rails 3. This is because cookies signed based on the new
-
# secret_key_base in Rails 4 are not backwards compatible with Rails 3.
-
# You are free to leave your existing secret_token in place, not set the
-
# new secret_key_base, and ignore the deprecation warnings until you are
-
# reasonably sure that your upgrade is otherwise complete. Additionally,
-
# you should take care to make sure you are not relying on the ability to
-
# decode signed cookies generated by your app in external applications or
-
# JavaScript before upgrading.
-
#
-
# Note that changing the secret key will invalidate all existing sessions!
-
1
class CookieStore < Rack::Session::Abstract::ID
-
1
include Compatibility
-
1
include StaleSessionCheck
-
1
include SessionObject
-
-
1
def initialize(app, options={})
-
1
super(app, options.merge!(:cookie_only => true))
-
end
-
-
1
def destroy_session(env, session_id, options)
-
new_sid = generate_sid unless options[:drop]
-
# Reset hash and Assign the new session id
-
env["action_dispatch.request.unsigned_session_cookie"] = new_sid ? { "session_id" => new_sid } : {}
-
new_sid
-
end
-
-
1
def load_session(env)
-
5
stale_session_check! do
-
5
data = unpacked_cookie_data(env)
-
5
data = persistent_session_id!(data)
-
5
[data["session_id"], data]
-
end
-
end
-
-
1
private
-
-
1
def extract_session_id(env)
-
23
stale_session_check! do
-
23
unpacked_cookie_data(env)["session_id"]
-
end
-
end
-
-
1
def unpacked_cookie_data(env)
-
28
env["action_dispatch.request.unsigned_session_cookie"] ||= begin
-
23
stale_session_check! do
-
23
if data = get_cookie(env)
-
2
data.stringify_keys!
-
end
-
23
data || {}
-
end
-
end
-
end
-
-
1
def persistent_session_id!(data, sid=nil)
-
5
data ||= {}
-
5
data["session_id"] ||= sid || generate_sid
-
5
data
-
end
-
-
1
def set_session(env, sid, session_data, options)
-
5
session_data["session_id"] = sid
-
5
session_data
-
end
-
-
1
def set_cookie(env, session_id, cookie)
-
5
cookie_jar(env)[@key] = cookie
-
end
-
-
1
def get_cookie(env)
-
23
cookie_jar(env)[@key]
-
end
-
-
1
def cookie_jar(env)
-
28
request = ActionDispatch::Request.new(env)
-
28
request.cookie_jar.signed_or_encrypted
-
end
-
end
-
end
-
end
-
1
require 'action_dispatch/http/request'
-
1
require 'action_dispatch/middleware/exception_wrapper'
-
-
1
module ActionDispatch
-
# This middleware rescues any exception returned by the application
-
# and calls an exceptions app that will wrap it in a format for the end user.
-
#
-
# The exceptions app should be passed as parameter on initialization
-
# of ShowExceptions. Every time there is an exception, ShowExceptions will
-
# store the exception in env["action_dispatch.exception"], rewrite the
-
# PATH_INFO to the exception status code and call the rack app.
-
#
-
# If the application returns a "X-Cascade" pass response, this middleware
-
# will send an empty response as result with the correct status code.
-
# If any exception happens inside the exceptions app, this middleware
-
# catches the exceptions and returns a FAILSAFE_RESPONSE.
-
1
class ShowExceptions
-
1
FAILSAFE_RESPONSE = [500, { 'Content-Type' => 'text/plain' },
-
["500 Internal Server Error\n" \
-
"If you are the administrator of this website, then please read this web " \
-
"application's log file and/or the web server's log file to find out what " \
-
"went wrong."]]
-
-
1
def initialize(app, exceptions_app)
-
1
@app = app
-
1
@exceptions_app = exceptions_app
-
end
-
-
1
def call(env)
-
23
@app.call(env)
-
rescue Exception => exception
-
if env['action_dispatch.show_exceptions'] == false
-
raise exception
-
else
-
render_exception(env, exception)
-
end
-
end
-
-
1
private
-
-
1
def render_exception(env, exception)
-
wrapper = ExceptionWrapper.new(env, exception)
-
status = wrapper.status_code
-
env["action_dispatch.exception"] = wrapper.exception
-
env["action_dispatch.original_path"] = env["PATH_INFO"]
-
env["PATH_INFO"] = "/#{status}"
-
response = @exceptions_app.call(env)
-
response[1]['X-Cascade'] == 'pass' ? pass_response(status) : response
-
rescue Exception => failsafe_error
-
$stderr.puts "Error during failsafe response: #{failsafe_error}\n #{failsafe_error.backtrace * "\n "}"
-
FAILSAFE_RESPONSE
-
end
-
-
1
def pass_response(status)
-
[status, {"Content-Type" => "text/html; charset=#{Response.default_charset}", "Content-Length" => "0"}, []]
-
end
-
end
-
end
-
1
require 'rack/utils'
-
1
require 'active_support/core_ext/uri'
-
-
1
module ActionDispatch
-
# This middleware returns a file's contents from disk in the body response.
-
# When initialized it can accept an optional 'Cache-Control' header which
-
# will be set when a response containing a file's contents is delivered.
-
#
-
# This middleware will render the file specified in `env["PATH_INFO"]`
-
# where the base path is in the +root+ directory. For example if the +root+
-
# is set to `public/` then a request with `env["PATH_INFO"]` of
-
# `assets/application.js` will return a response with contents of a file
-
# located at `public/assets/application.js` if the file exists. If the file
-
# does not exist a 404 "File not Found" response will be returned.
-
1
class FileHandler
-
1
def initialize(root, cache_control)
-
1
@root = root.chomp('/')
-
1
@compiled_root = /^#{Regexp.escape(root)}/
-
1
headers = cache_control && { 'Cache-Control' => cache_control }
-
1
@file_server = ::Rack::File.new(@root, headers)
-
end
-
-
1
def match?(path)
-
23
path = URI.parser.unescape(path)
-
23
return false unless path.valid_encoding?
-
-
23
paths = [path, "#{path}#{ext}", "#{path}/index#{ext}"].map { |v|
-
69
Rack::Utils.clean_path_info v
-
}
-
-
23
if match = paths.detect { |p|
-
69
path = File.join(@root, p.force_encoding('UTF-8'))
-
69
begin
-
69
File.file?(path) && File.readable?(path)
-
rescue SystemCallError
-
false
-
end
-
-
}
-
return ::Rack::Utils.escape(match)
-
end
-
end
-
-
1
def call(env)
-
path = env['PATH_INFO']
-
gzip_path = gzip_file_path(path)
-
-
if gzip_path && gzip_encoding_accepted?(env)
-
env['PATH_INFO'] = gzip_path
-
status, headers, body = @file_server.call(env)
-
if status == 304
-
return [status, headers, body]
-
end
-
headers['Content-Encoding'] = 'gzip'
-
headers['Content-Type'] = content_type(path)
-
else
-
status, headers, body = @file_server.call(env)
-
end
-
-
headers['Vary'] = 'Accept-Encoding' if gzip_path
-
-
return [status, headers, body]
-
ensure
-
env['PATH_INFO'] = path
-
end
-
-
1
private
-
1
def ext
-
46
::ActionController::Base.default_static_extension
-
end
-
-
1
def content_type(path)
-
::Rack::Mime.mime_type(::File.extname(path), 'text/plain')
-
end
-
-
1
def gzip_encoding_accepted?(env)
-
env['HTTP_ACCEPT_ENCODING'] =~ /\bgzip\b/i
-
end
-
-
1
def gzip_file_path(path)
-
can_gzip_mime = content_type(path) =~ /\A(?:text\/|application\/javascript)/
-
gzip_path = "#{path}.gz"
-
if can_gzip_mime && File.exist?(File.join(@root, ::Rack::Utils.unescape(gzip_path)))
-
gzip_path
-
else
-
false
-
end
-
end
-
end
-
-
# This middleware will attempt to return the contents of a file's body from
-
# disk in the response. If a file is not found on disk, the request will be
-
# delegated to the application stack. This middleware is commonly initialized
-
# to serve assets from a server's `public/` directory.
-
#
-
# This middleware verifies the path to ensure that only files
-
# living in the root directory can be rendered. A request cannot
-
# produce a directory traversal using this middleware. Only 'GET' and 'HEAD'
-
# requests will result in a file being returned.
-
1
class Static
-
1
def initialize(app, path, cache_control=nil)
-
1
@app = app
-
1
@file_handler = FileHandler.new(path, cache_control)
-
end
-
-
1
def call(env)
-
23
case env['REQUEST_METHOD']
-
when 'GET', 'HEAD'
-
23
path = env['PATH_INFO'].chomp('/')
-
23
if match = @file_handler.match?(path)
-
env["PATH_INFO"] = match
-
return @file_handler.call(env)
-
end
-
end
-
-
23
@app.call(env)
-
end
-
end
-
end
-
1
require 'rack/session/abstract/id'
-
-
1
module ActionDispatch
-
1
class Request < Rack::Request
-
# Session is responsible for lazily loading the session from store.
-
1
class Session # :nodoc:
-
1
ENV_SESSION_KEY = Rack::Session::Abstract::ENV_SESSION_KEY # :nodoc:
-
1
ENV_SESSION_OPTIONS_KEY = Rack::Session::Abstract::ENV_SESSION_OPTIONS_KEY # :nodoc:
-
-
# Singleton object used to determine if an optional param wasn't specified
-
1
Unspecified = Object.new
-
-
1
def self.create(store, env, default_options)
-
23
session_was = find env
-
23
session = Request::Session.new(store, env)
-
23
session.merge! session_was if session_was
-
-
23
set(env, session)
-
23
Options.set(env, Request::Session::Options.new(store, env, default_options))
-
23
session
-
end
-
-
1
def self.find(env)
-
46
env[ENV_SESSION_KEY]
-
end
-
-
1
def self.set(env, session)
-
95
env[ENV_SESSION_KEY] = session
-
end
-
-
1
class Options #:nodoc:
-
1
def self.set(env, options)
-
95
env[ENV_SESSION_OPTIONS_KEY] = options
-
end
-
-
1
def self.find(env)
-
94
env[ENV_SESSION_OPTIONS_KEY]
-
end
-
-
1
def initialize(by, env, default_options)
-
23
@by = by
-
23
@env = env
-
23
@delegate = default_options.dup
-
end
-
-
1
def [](key)
-
155
if key == :id
-
66
@delegate.fetch(key) {
-
23
@delegate[:id] = @by.send(:extract_session_id, @env)
-
}
-
else
-
89
@delegate[key]
-
end
-
end
-
-
6
def []=(k,v); @delegate[k] = v; end
-
6
def to_hash; @delegate.dup; end
-
19
def values_at(*args); @delegate.values_at(*args); end
-
end
-
-
1
def initialize(by, env)
-
23
@by = by
-
23
@env = env
-
23
@delegate = {}
-
23
@loaded = false
-
23
@exists = nil # we haven't checked yet
-
end
-
-
1
def id
-
66
options[:id]
-
end
-
-
1
def options
-
94
Options.find @env
-
end
-
-
1
def destroy
-
clear
-
options = self.options || {}
-
new_sid = @by.send(:destroy_session, @env, options[:id], options)
-
options[:id] = new_sid # Reset session id with a new value or nil
-
-
# Load the new sid to be written with the response
-
@loaded = false
-
load_for_write!
-
end
-
-
1
def [](key)
-
51
load_for_read!
-
51
@delegate[key.to_s]
-
end
-
-
1
def has_key?(key)
-
23
load_for_read!
-
23
@delegate.key?(key.to_s)
-
end
-
1
alias :key? :has_key?
-
1
alias :include? :has_key?
-
-
1
def keys
-
@delegate.keys
-
end
-
-
1
def values
-
@delegate.values
-
end
-
-
1
def []=(key, value)
-
6
load_for_write!
-
6
@delegate[key.to_s] = value
-
end
-
-
1
def clear
-
load_for_write!
-
@delegate.clear
-
end
-
-
1
def to_hash
-
5
load_for_read!
-
17
@delegate.dup.delete_if { |_,v| v.nil? }
-
end
-
-
1
def update(hash)
-
load_for_write!
-
@delegate.update stringify_keys(hash)
-
end
-
-
1
def delete(key)
-
load_for_write!
-
@delegate.delete key.to_s
-
end
-
-
1
def fetch(key, default=Unspecified, &block)
-
load_for_read!
-
if default == Unspecified
-
@delegate.fetch(key.to_s, &block)
-
else
-
@delegate.fetch(key.to_s, default, &block)
-
end
-
end
-
-
1
def inspect
-
if loaded?
-
super
-
else
-
"#<#{self.class}:0x#{(object_id << 1).to_s(16)} not yet loaded>"
-
end
-
end
-
-
1
def exists?
-
61
return @exists unless @exists.nil?
-
61
@exists = @by.send(:session_exists?, @env)
-
end
-
-
1
def loaded?
-
136
@loaded
-
end
-
-
1
def empty?
-
load_for_read!
-
@delegate.empty?
-
end
-
-
1
def merge!(other)
-
load_for_write!
-
@delegate.merge!(other)
-
end
-
-
1
private
-
-
1
def load_for_read!
-
79
load! if !loaded? && exists?
-
end
-
-
1
def load_for_write!
-
6
load! unless loaded?
-
end
-
-
1
def load!
-
5
id, session = @by.load_session @env
-
5
options[:id] = id
-
5
@delegate.replace(stringify_keys(session))
-
5
@loaded = true
-
end
-
-
1
def stringify_keys(other)
-
5
other.each_with_object({}) { |(key, value), hash|
-
8
hash[key.to_s] = value
-
}
-
end
-
end
-
end
-
end
-
1
module ActionDispatch
-
1
class Request < Rack::Request
-
1
class Utils # :nodoc:
-
-
1
mattr_accessor :perform_deep_munge
-
1
self.perform_deep_munge = true
-
-
1
class << self
-
# Remove nils from the params hash
-
1
def deep_munge(hash, keys = [])
-
133
return hash unless perform_deep_munge
-
-
133
hash.each do |k, v|
-
2
keys << k
-
2
case v
-
when Array
-
v.grep(Hash) { |x| deep_munge(x, keys) }
-
v.compact!
-
if v.empty?
-
hash[k] = nil
-
ActiveSupport::Notifications.instrument("deep_munge.action_controller", keys: keys)
-
end
-
when Hash
-
deep_munge(v, keys)
-
end
-
2
keys.pop
-
end
-
-
133
hash
-
end
-
end
-
end
-
end
-
end
-
-
1
require 'delegate'
-
1
require 'active_support/core_ext/string/strip'
-
-
1
module ActionDispatch
-
1
module Routing
-
1
class RouteWrapper < SimpleDelegator
-
1
def endpoint
-
app.dispatcher? ? "#{controller}##{action}" : rack_app.inspect
-
end
-
-
1
def constraints
-
requirements.except(:controller, :action)
-
end
-
-
1
def rack_app
-
app.app
-
end
-
-
1
def verb
-
super.source.gsub(/[$^]/, '')
-
end
-
-
1
def path
-
super.spec.to_s
-
end
-
-
1
def name
-
super.to_s
-
end
-
-
1
def regexp
-
__getobj__.path.to_regexp
-
end
-
-
1
def json_regexp
-
str = regexp.inspect.
-
sub('\\A' , '^').
-
sub('\\Z' , '$').
-
sub('\\z' , '$').
-
sub(/^\// , '').
-
sub(/\/[a-z]*$/ , '').
-
gsub(/\(\?#.+\)/ , '').
-
gsub(/\(\?-\w+:/ , '(').
-
gsub(/\s/ , '')
-
Regexp.new(str).source
-
end
-
-
1
def reqs
-
@reqs ||= begin
-
reqs = endpoint
-
reqs += " #{constraints}" unless constraints.empty?
-
reqs
-
end
-
end
-
-
1
def controller
-
requirements[:controller] || ':controller'
-
end
-
-
1
def action
-
requirements[:action] || ':action'
-
end
-
-
1
def internal?
-
controller.to_s =~ %r{\Arails/(info|mailers|welcome)} || path =~ %r{\A#{Rails.application.config.assets.prefix}\z}
-
end
-
-
1
def engine?
-
rack_app.respond_to?(:routes)
-
end
-
end
-
-
##
-
# This class is just used for displaying route information when someone
-
# executes `rake routes` or looks at the RoutingError page.
-
# People should not use this class.
-
1
class RoutesInspector # :nodoc:
-
1
def initialize(routes)
-
@engines = {}
-
@routes = routes
-
end
-
-
1
def format(formatter, filter = nil)
-
routes_to_display = filter_routes(filter)
-
-
routes = collect_routes(routes_to_display)
-
-
if routes.none?
-
formatter.no_routes
-
return formatter.result
-
end
-
-
formatter.header routes
-
formatter.section routes
-
-
@engines.each do |name, engine_routes|
-
formatter.section_title "Routes for #{name}"
-
formatter.section engine_routes
-
end
-
-
formatter.result
-
end
-
-
1
private
-
-
1
def filter_routes(filter)
-
if filter
-
@routes.select { |route| route.defaults[:controller] == filter }
-
else
-
@routes
-
end
-
end
-
-
1
def collect_routes(routes)
-
routes.collect do |route|
-
RouteWrapper.new(route)
-
end.reject do |route|
-
route.internal?
-
end.collect do |route|
-
collect_engine_routes(route)
-
-
{ name: route.name,
-
verb: route.verb,
-
path: route.path,
-
reqs: route.reqs,
-
regexp: route.json_regexp }
-
end
-
end
-
-
1
def collect_engine_routes(route)
-
name = route.endpoint
-
return unless route.engine?
-
return if @engines[name]
-
-
routes = route.rack_app.routes
-
if routes.is_a?(ActionDispatch::Routing::RouteSet)
-
@engines[name] = collect_routes(routes.routes)
-
end
-
end
-
end
-
-
1
class ConsoleFormatter
-
1
def initialize
-
@buffer = []
-
end
-
-
1
def result
-
@buffer.join("\n")
-
end
-
-
1
def section_title(title)
-
@buffer << "\n#{title}:"
-
end
-
-
1
def section(routes)
-
@buffer << draw_section(routes)
-
end
-
-
1
def header(routes)
-
@buffer << draw_header(routes)
-
end
-
-
1
def no_routes
-
@buffer << <<-MESSAGE.strip_heredoc
-
You don't have any routes defined!
-
-
Please add some routes in config/routes.rb.
-
-
For more information about routes, see the Rails guide: http://guides.rubyonrails.org/routing.html.
-
MESSAGE
-
end
-
-
1
private
-
1
def draw_section(routes)
-
header_lengths = ['Prefix', 'Verb', 'URI Pattern'].map(&:length)
-
name_width, verb_width, path_width = widths(routes).zip(header_lengths).map(&:max)
-
-
routes.map do |r|
-
"#{r[:name].rjust(name_width)} #{r[:verb].ljust(verb_width)} #{r[:path].ljust(path_width)} #{r[:reqs]}"
-
end
-
end
-
-
1
def draw_header(routes)
-
name_width, verb_width, path_width = widths(routes)
-
-
"#{"Prefix".rjust(name_width)} #{"Verb".ljust(verb_width)} #{"URI Pattern".ljust(path_width)} Controller#Action"
-
end
-
-
1
def widths(routes)
-
[routes.map { |r| r[:name].length }.max || 0,
-
routes.map { |r| r[:verb].length }.max || 0,
-
routes.map { |r| r[:path].length }.max || 0]
-
end
-
end
-
-
1
class HtmlTableFormatter
-
1
def initialize(view)
-
@view = view
-
@buffer = []
-
end
-
-
1
def section_title(title)
-
@buffer << %(<tr><th colspan="4">#{title}</th></tr>)
-
end
-
-
1
def section(routes)
-
@buffer << @view.render(partial: "routes/route", collection: routes)
-
end
-
-
# the header is part of the HTML page, so we don't construct it here.
-
1
def header(routes)
-
end
-
-
1
def no_routes
-
@buffer << <<-MESSAGE.strip_heredoc
-
<p>You don't have any routes defined!</p>
-
<ul>
-
<li>Please add some routes in <tt>config/routes.rb</tt>.</li>
-
<li>
-
For more information about routes, please see the Rails guide
-
<a href="http://guides.rubyonrails.org/routing.html">Rails Routing from the Outside In</a>.
-
</li>
-
</ul>
-
MESSAGE
-
end
-
-
1
def result
-
@view.raw @view.render(layout: "routes/table") {
-
@view.raw @buffer.join("\n")
-
}
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/array/extract_options'
-
-
1
module ActionDispatch
-
1
module Routing
-
1
class RoutesProxy #:nodoc:
-
1
include ActionDispatch::Routing::UrlFor
-
-
1
attr_accessor :scope, :routes
-
1
alias :_routes :routes
-
-
1
def initialize(routes, scope)
-
20
@routes, @scope = routes, scope
-
end
-
-
1
def url_options
-
58
scope.send(:_with_routes, routes) do
-
58
scope.url_options
-
end
-
end
-
-
1
def respond_to?(method, include_private = false)
-
1
super || routes.url_helpers.respond_to?(method)
-
end
-
-
1
def method_missing(method, *args)
-
4
if routes.url_helpers.respond_to?(method)
-
4
self.class.class_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def #{method}(*args)
-
options = args.extract_options!
-
args << url_options.merge((options || {}).symbolize_keys)
-
routes.url_helpers.#{method}(*args)
-
end
-
RUBY
-
4
send(method, *args)
-
else
-
super
-
end
-
end
-
end
-
end
-
end
-
1
require 'rails-dom-testing'
-
-
1
module ActionDispatch
-
1
module Assertions
-
1
autoload :ResponseAssertions, 'action_dispatch/testing/assertions/response'
-
1
autoload :RoutingAssertions, 'action_dispatch/testing/assertions/routing'
-
-
1
extend ActiveSupport::Concern
-
-
1
include ResponseAssertions
-
1
include RoutingAssertions
-
1
include Rails::Dom::Testing::Assertions
-
-
1
def html_document
-
@html_document ||= if @response.content_type.to_s =~ /xml$/
-
Nokogiri::XML::Document.parse(@response.body)
-
else
-
Nokogiri::HTML::Document.parse(@response.body)
-
end
-
end
-
end
-
end
-
-
1
module ActionDispatch
-
1
module Assertions
-
# A small suite of assertions that test responses from \Rails applications.
-
1
module ResponseAssertions
-
# Asserts that the response is one of the following types:
-
#
-
# * <tt>:success</tt> - Status code was in the 200-299 range
-
# * <tt>:redirect</tt> - Status code was in the 300-399 range
-
# * <tt>:missing</tt> - Status code was 404
-
# * <tt>:error</tt> - Status code was in the 500-599 range
-
#
-
# You can also pass an explicit status number like <tt>assert_response(501)</tt>
-
# or its symbolic equivalent <tt>assert_response(:not_implemented)</tt>.
-
# See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list.
-
#
-
# # assert that the response was a redirection
-
# assert_response :redirect
-
#
-
# # assert that the response code was status code 401 (unauthorized)
-
# assert_response 401
-
1
def assert_response(type, message = nil)
-
40
message ||= "Expected response to be a <#{type}>, but was <#{@response.response_code}>"
-
-
40
if Symbol === type
-
40
if [:success, :missing, :redirect, :error].include?(type)
-
20
assert @response.send("#{type}?"), message
-
else
-
20
code = Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
-
20
if code.nil?
-
raise ArgumentError, "Invalid response type :#{type}"
-
end
-
20
assert_equal code, @response.response_code, message
-
end
-
else
-
assert_equal type, @response.response_code, message
-
end
-
end
-
-
# Assert that the redirection options passed in match those of the redirect called in the latest action.
-
# This match can be partial, such that <tt>assert_redirected_to(controller: "weblog")</tt> will also
-
# match the redirection of <tt>redirect_to(controller: "weblog", action: "show")</tt> and so on.
-
#
-
# # assert that the redirection was to the "index" action on the WeblogController
-
# assert_redirected_to controller: "weblog", action: "index"
-
#
-
# # assert that the redirection was to the named route login_url
-
# assert_redirected_to login_url
-
#
-
# # assert that the redirection was to the url for @customer
-
# assert_redirected_to @customer
-
#
-
# # asserts that the redirection matches the regular expression
-
# assert_redirected_to %r(\Ahttp://example.org)
-
1
def assert_redirected_to(options = {}, message=nil)
-
assert_response(:redirect, message)
-
return true if options === @response.location
-
-
redirect_is = normalize_argument_to_redirection(@response.location)
-
redirect_expected = normalize_argument_to_redirection(options)
-
-
message ||= "Expected response to be a redirect to <#{redirect_expected}> but was a redirect to <#{redirect_is}>"
-
assert_operator redirect_expected, :===, redirect_is, message
-
end
-
-
1
private
-
# Proxy to to_param if the object will respond to it.
-
1
def parameterize(value)
-
value.respond_to?(:to_param) ? value.to_param : value
-
end
-
-
1
def normalize_argument_to_redirection(fragment)
-
if Regexp === fragment
-
fragment
-
else
-
handle = @controller || ActionController::Redirecting
-
handle._compute_redirect_to_location(@request, fragment)
-
end
-
end
-
end
-
end
-
end
-
1
require 'uri'
-
1
require 'active_support/core_ext/hash/indifferent_access'
-
1
require 'active_support/core_ext/string/access'
-
1
require 'action_controller/metal/exceptions'
-
-
1
module ActionDispatch
-
1
module Assertions
-
# Suite of assertions to test routes generated by \Rails and the handling of requests made to them.
-
1
module RoutingAssertions
-
# Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
-
# match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+.
-
#
-
# Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes
-
# requiring a specific HTTP method. The hash should contain a :path with the incoming request path
-
# and a :method containing the required HTTP verb.
-
#
-
# # assert that POSTing to /items will call the create action on ItemsController
-
# assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post})
-
#
-
# You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used
-
# to assert that values in the query string string will end up in the params hash correctly. To test query strings you must use the
-
# extras argument, appending the query string on the path directly will not work. For example:
-
#
-
# # assert that a path of '/items/list/1?view=print' returns the correct options
-
# assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" })
-
#
-
# The +message+ parameter allows you to pass in an error message that is displayed upon failure.
-
#
-
# # Check the default route (i.e., the index action)
-
# assert_recognizes({controller: 'items', action: 'index'}, 'items')
-
#
-
# # Test a specific action
-
# assert_recognizes({controller: 'items', action: 'list'}, 'items/list')
-
#
-
# # Test an action with a parameter
-
# assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1')
-
#
-
# # Test a custom route
-
# assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1')
-
1
def assert_recognizes(expected_options, path, extras={}, msg=nil)
-
9
if path.is_a?(Hash) && path[:method].to_s == "all"
-
[:get, :post, :put, :delete].each do |method|
-
assert_recognizes(expected_options, path.merge(method: method), extras, msg)
-
end
-
else
-
9
request = recognized_request_for(path, extras, msg)
-
-
9
expected_options = expected_options.clone
-
-
9
expected_options.stringify_keys!
-
-
9
msg = message(msg, "") {
-
sprintf("The recognized options <%s> did not match <%s>, difference:",
-
request.path_parameters, expected_options)
-
}
-
-
9
assert_equal(expected_options, request.path_parameters, msg)
-
end
-
end
-
-
# Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+.
-
# The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in
-
# a query string. The +message+ parameter allows you to specify a custom error message for assertion failures.
-
#
-
# The +defaults+ parameter is unused.
-
#
-
# # Asserts that the default action is generated for a route with no action
-
# assert_generates "/items", controller: "items", action: "index"
-
#
-
# # Tests that the list action is properly routed
-
# assert_generates "/items/list", controller: "items", action: "list"
-
#
-
# # Tests the generation of a route with a parameter
-
# assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" }
-
#
-
# # Asserts that the generated route gives us our custom route
-
# assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" }
-
1
def assert_generates(expected_path, options, defaults={}, extras={}, message=nil)
-
9
if expected_path =~ %r{://}
-
9
fail_on(URI::InvalidURIError, message) do
-
9
uri = URI.parse(expected_path)
-
9
expected_path = uri.path.to_s.empty? ? "/" : uri.path
-
end
-
else
-
expected_path = "/#{expected_path}" unless expected_path.first == '/'
-
end
-
# Load routes.rb if it hasn't been loaded.
-
-
9
generated_path, extra_keys = @routes.generate_extras(options, defaults)
-
36
found_extras = options.reject { |k, _| ! extra_keys.include? k }
-
-
9
msg = message || sprintf("found extras <%s>, not <%s>", found_extras, extras)
-
9
assert_equal(extras, found_extras, msg)
-
-
9
msg = message || sprintf("The generated path <%s> did not match <%s>", generated_path,
-
expected_path)
-
9
assert_equal(expected_path, generated_path, msg)
-
end
-
-
# Asserts that path and options match both ways; in other words, it verifies that <tt>path</tt> generates
-
# <tt>options</tt> and then that <tt>options</tt> generates <tt>path</tt>. This essentially combines +assert_recognizes+
-
# and +assert_generates+ into one step.
-
#
-
# The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The
-
# +message+ parameter allows you to specify a custom error message to display upon failure.
-
#
-
# # Assert a basic route: a controller with the default action (index)
-
# assert_routing '/home', controller: 'home', action: 'index'
-
#
-
# # Test a route generated with a specific controller, action, and parameter (id)
-
# assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23
-
#
-
# # Assert a basic route (controller + default action), with an error message if it fails
-
# assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly'
-
#
-
# # Tests a route, providing a defaults hash
-
# assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"}
-
#
-
# # Tests a route with a HTTP method
-
# assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" })
-
1
def assert_routing(path, options, defaults={}, extras={}, message=nil)
-
9
assert_recognizes(options, path, extras, message)
-
-
9
controller, default_controller = options[:controller], defaults[:controller]
-
9
if controller && controller.include?(?/) && default_controller && default_controller.include?(?/)
-
options[:controller] = "/#{controller}"
-
end
-
-
36
generate_options = options.dup.delete_if{ |k, _| defaults.key?(k) }
-
9
assert_generates(path.is_a?(Hash) ? path[:path] : path, generate_options, defaults, extras, message)
-
end
-
-
# A helper to make it easier to test different route configurations.
-
# This method temporarily replaces @routes
-
# with a new RouteSet instance.
-
#
-
# The new instance is yielded to the passed block. Typically the block
-
# will create some routes using <tt>set.draw { match ... }</tt>:
-
#
-
# with_routing do |set|
-
# set.draw do
-
# resources :users
-
# end
-
# assert_equal "/users", users_path
-
# end
-
#
-
1
def with_routing
-
old_routes, @routes = @routes, ActionDispatch::Routing::RouteSet.new
-
if defined?(@controller) && @controller
-
old_controller, @controller = @controller, @controller.clone
-
_routes = @routes
-
-
@controller.singleton_class.send(:include, _routes.url_helpers)
-
@controller.view_context_class = Class.new(@controller.view_context_class) do
-
include _routes.url_helpers
-
end
-
end
-
yield @routes
-
ensure
-
@routes = old_routes
-
if defined?(@controller) && @controller
-
@controller = old_controller
-
end
-
end
-
-
# ROUTES TODO: These assertions should really work in an integration context
-
1
def method_missing(selector, *args, &block)
-
if defined?(@controller) && @controller && defined?(@routes) && @routes && @routes.named_routes.route_defined?(selector)
-
@controller.send(selector, *args, &block)
-
else
-
super
-
end
-
end
-
-
1
private
-
# Recognizes the route for a given path.
-
1
def recognized_request_for(path, extras = {}, msg)
-
9
if path.is_a?(Hash)
-
method = path[:method]
-
path = path[:path]
-
else
-
9
method = :get
-
end
-
-
# Assume given controller
-
9
request = ActionController::TestRequest.new
-
-
9
if path =~ %r{://}
-
9
fail_on(URI::InvalidURIError, msg) do
-
9
uri = URI.parse(path)
-
9
request.env["rack.url_scheme"] = uri.scheme || "http"
-
9
request.host = uri.host if uri.host
-
9
request.port = uri.port if uri.port
-
9
request.path = uri.path.to_s.empty? ? "/" : uri.path
-
end
-
else
-
path = "/#{path}" unless path.first == "/"
-
request.path = path
-
end
-
-
9
request.request_method = method if method
-
-
9
params = fail_on(ActionController::RoutingError, msg) do
-
9
@routes.recognize_path(path, { :method => method, :extras => extras })
-
end
-
9
request.path_parameters = params.with_indifferent_access
-
-
9
request
-
end
-
-
1
def fail_on(exception_class, message)
-
27
yield
-
rescue exception_class => e
-
raise Minitest::Assertion, message || e.message
-
end
-
end
-
end
-
end
-
1
require 'stringio'
-
1
require 'uri'
-
1
require 'active_support/core_ext/kernel/singleton_class'
-
1
require 'active_support/core_ext/object/try'
-
1
require 'rack/test'
-
1
require 'minitest'
-
-
1
module ActionDispatch
-
1
module Integration #:nodoc:
-
1
module RequestHelpers
-
# Performs a GET request with the given parameters.
-
#
-
# - +path+: The URI (as a String) on which you want to perform a GET
-
# request.
-
# - +parameters+: The HTTP parameters that you want to pass. This may
-
# be +nil+,
-
# a Hash, or a String that is appropriately encoded
-
# (<tt>application/x-www-form-urlencoded</tt> or
-
# <tt>multipart/form-data</tt>).
-
# - +headers_or_env+: Additional headers to pass, as a Hash. The headers will be
-
# merged into the Rack env hash.
-
#
-
# This method returns a Response object, which one can use to
-
# inspect the details of the response. Furthermore, if this method was
-
# called from an ActionDispatch::IntegrationTest object, then that
-
# object's <tt>@response</tt> instance variable will point to the same
-
# response object.
-
#
-
# You can also perform POST, PATCH, PUT, DELETE, and HEAD requests with
-
# +#post+, +#patch+, +#put+, +#delete+, and +#head+.
-
1
def get(path, parameters = nil, headers_or_env = nil)
-
process :get, path, parameters, headers_or_env
-
end
-
-
# Performs a POST request with the given parameters. See +#get+ for more
-
# details.
-
1
def post(path, parameters = nil, headers_or_env = nil)
-
process :post, path, parameters, headers_or_env
-
end
-
-
# Performs a PATCH request with the given parameters. See +#get+ for more
-
# details.
-
1
def patch(path, parameters = nil, headers_or_env = nil)
-
process :patch, path, parameters, headers_or_env
-
end
-
-
# Performs a PUT request with the given parameters. See +#get+ for more
-
# details.
-
1
def put(path, parameters = nil, headers_or_env = nil)
-
process :put, path, parameters, headers_or_env
-
end
-
-
# Performs a DELETE request with the given parameters. See +#get+ for
-
# more details.
-
1
def delete(path, parameters = nil, headers_or_env = nil)
-
process :delete, path, parameters, headers_or_env
-
end
-
-
# Performs a HEAD request with the given parameters. See +#get+ for more
-
# details.
-
1
def head(path, parameters = nil, headers_or_env = nil)
-
process :head, path, parameters, headers_or_env
-
end
-
-
# Performs an XMLHttpRequest request with the given parameters, mirroring
-
# a request from the Prototype library.
-
#
-
# The request_method is +:get+, +:post+, +:patch+, +:put+, +:delete+ or
-
# +:head+; the parameters are +nil+, a hash, or a url-encoded or multipart
-
# string; the headers are a hash.
-
1
def xml_http_request(request_method, path, parameters = nil, headers_or_env = nil)
-
headers_or_env ||= {}
-
headers_or_env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
-
headers_or_env['HTTP_ACCEPT'] ||= [Mime::JS, Mime::HTML, Mime::XML, 'text/xml', Mime::ALL].join(', ')
-
process(request_method, path, parameters, headers_or_env)
-
end
-
1
alias xhr :xml_http_request
-
-
# Follow a single redirect response. If the last response was not a
-
# redirect, an exception will be raised. Otherwise, the redirect is
-
# performed on the location header.
-
1
def follow_redirect!
-
raise "not a redirect! #{status} #{status_message}" unless redirect?
-
get(response.location)
-
status
-
end
-
-
# Performs a request using the specified method, following any subsequent
-
# redirect. Note that the redirects are followed until the response is
-
# not a redirect--this means you may run into an infinite loop if your
-
# redirect loops back to itself.
-
1
def request_via_redirect(http_method, path, parameters = nil, headers_or_env = nil)
-
process(http_method, path, parameters, headers_or_env)
-
follow_redirect! while redirect?
-
status
-
end
-
-
# Performs a GET request, following any subsequent redirect.
-
# See +request_via_redirect+ for more information.
-
1
def get_via_redirect(path, parameters = nil, headers_or_env = nil)
-
request_via_redirect(:get, path, parameters, headers_or_env)
-
end
-
-
# Performs a POST request, following any subsequent redirect.
-
# See +request_via_redirect+ for more information.
-
1
def post_via_redirect(path, parameters = nil, headers_or_env = nil)
-
request_via_redirect(:post, path, parameters, headers_or_env)
-
end
-
-
# Performs a PATCH request, following any subsequent redirect.
-
# See +request_via_redirect+ for more information.
-
1
def patch_via_redirect(path, parameters = nil, headers_or_env = nil)
-
request_via_redirect(:patch, path, parameters, headers_or_env)
-
end
-
-
# Performs a PUT request, following any subsequent redirect.
-
# See +request_via_redirect+ for more information.
-
1
def put_via_redirect(path, parameters = nil, headers_or_env = nil)
-
request_via_redirect(:put, path, parameters, headers_or_env)
-
end
-
-
# Performs a DELETE request, following any subsequent redirect.
-
# See +request_via_redirect+ for more information.
-
1
def delete_via_redirect(path, parameters = nil, headers_or_env = nil)
-
request_via_redirect(:delete, path, parameters, headers_or_env)
-
end
-
end
-
-
# An instance of this class represents a set of requests and responses
-
# performed sequentially by a test process. Because you can instantiate
-
# multiple sessions and run them side-by-side, you can also mimic (to some
-
# limited extent) multiple simultaneous users interacting with your system.
-
#
-
# Typically, you will instantiate a new session using
-
# IntegrationTest#open_session, rather than instantiating
-
# Integration::Session directly.
-
1
class Session
-
1
DEFAULT_HOST = "www.example.com"
-
-
1
include Minitest::Assertions
-
1
include TestProcess, RequestHelpers, Assertions
-
-
1
%w( status status_message headers body redirect? ).each do |method|
-
5
delegate method, :to => :response, :allow_nil => true
-
end
-
-
1
%w( path ).each do |method|
-
1
delegate method, :to => :request, :allow_nil => true
-
end
-
-
# The hostname used in the last request.
-
1
def host
-
@host || DEFAULT_HOST
-
end
-
1
attr_writer :host
-
-
# The remote_addr used in the last request.
-
1
attr_accessor :remote_addr
-
-
# The Accept header to send.
-
1
attr_accessor :accept
-
-
# A map of the cookies returned by the last response, and which will be
-
# sent with the next request.
-
1
def cookies
-
_mock_session.cookie_jar
-
end
-
-
# A reference to the controller instance used by the last request.
-
1
attr_reader :controller
-
-
# A reference to the request instance used by the last request.
-
1
attr_reader :request
-
-
# A reference to the response instance used by the last request.
-
1
attr_reader :response
-
-
# A running counter of the number of requests processed.
-
1
attr_accessor :request_count
-
-
1
include ActionDispatch::Routing::UrlFor
-
-
# Create and initialize a new Session instance.
-
1
def initialize(app)
-
super()
-
@app = app
-
-
# If the app is a Rails app, make url_helpers available on the session
-
# This makes app.url_for and app.foo_path available in the console
-
if app.respond_to?(:routes)
-
singleton_class.class_eval do
-
include app.routes.url_helpers
-
include app.routes.mounted_helpers
-
end
-
end
-
-
reset!
-
end
-
-
1
def url_options
-
@url_options ||= default_url_options.dup.tap do |url_options|
-
url_options.reverse_merge!(controller.url_options) if controller
-
-
if @app.respond_to?(:routes)
-
url_options.reverse_merge!(@app.routes.default_url_options)
-
end
-
-
url_options.reverse_merge!(:host => host, :protocol => https? ? "https" : "http")
-
end
-
end
-
-
# Resets the instance. This can be used to reset the state information
-
# in an existing session instance, so it can be used from a clean-slate
-
# condition.
-
#
-
# session.reset!
-
1
def reset!
-
@https = false
-
@controller = @request = @response = nil
-
@_mock_session = nil
-
@request_count = 0
-
@url_options = nil
-
-
self.host = DEFAULT_HOST
-
self.remote_addr = "127.0.0.1"
-
self.accept = "text/xml,application/xml,application/xhtml+xml," +
-
"text/html;q=0.9,text/plain;q=0.8,image/png," +
-
"*/*;q=0.5"
-
-
unless defined? @named_routes_configured
-
# the helpers are made protected by default--we make them public for
-
# easier access during testing and troubleshooting.
-
@named_routes_configured = true
-
end
-
end
-
-
# Specify whether or not the session should mimic a secure HTTPS request.
-
#
-
# session.https!
-
# session.https!(false)
-
1
def https!(flag = true)
-
@https = flag
-
end
-
-
# Returns +true+ if the session is mimicking a secure HTTPS request.
-
#
-
# if session.https?
-
# ...
-
# end
-
1
def https?
-
@https
-
end
-
-
# Set the host name to use in the next request.
-
#
-
# session.host! "www.example.com"
-
1
alias :host! :host=
-
-
1
private
-
1
def _mock_session
-
@_mock_session ||= Rack::MockSession.new(@app, host)
-
end
-
-
# Performs the actual request.
-
1
def process(method, path, parameters = nil, headers_or_env = nil)
-
if path =~ %r{://}
-
location = URI.parse(path)
-
https! URI::HTTPS === location if location.scheme
-
host! "#{location.host}:#{location.port}" if location.host
-
path = location.query ? "#{location.path}?#{location.query}" : location.path
-
end
-
-
hostname, port = host.split(':')
-
-
env = {
-
:method => method,
-
:params => parameters,
-
-
"SERVER_NAME" => hostname,
-
"SERVER_PORT" => port || (https? ? "443" : "80"),
-
"HTTPS" => https? ? "on" : "off",
-
"rack.url_scheme" => https? ? "https" : "http",
-
-
"REQUEST_URI" => path,
-
"HTTP_HOST" => host,
-
"REMOTE_ADDR" => remote_addr,
-
"CONTENT_TYPE" => "application/x-www-form-urlencoded",
-
"HTTP_ACCEPT" => accept
-
}
-
# this modifies the passed env directly
-
Http::Headers.new(env).merge!(headers_or_env || {})
-
-
session = Rack::Test::Session.new(_mock_session)
-
-
# NOTE: rack-test v0.5 doesn't build a default uri correctly
-
# Make sure requested path is always a full uri
-
session.request(build_full_uri(path, env), env)
-
-
@request_count += 1
-
@request = ActionDispatch::Request.new(session.last_request.env)
-
response = _mock_session.last_response
-
@response = ActionDispatch::TestResponse.from_response(response)
-
@html_document = nil
-
@html_scanner_document = nil
-
@url_options = nil
-
-
@controller = session.last_request.env['action_controller.instance']
-
-
return response.status
-
end
-
-
1
def build_full_uri(path, env)
-
"#{env['rack.url_scheme']}://#{env['SERVER_NAME']}:#{env['SERVER_PORT']}#{path}"
-
end
-
end
-
-
1
module Runner
-
1
include ActionDispatch::Assertions
-
-
1
def app
-
@app ||= nil
-
end
-
-
# Reset the current session. This is useful for testing multiple sessions
-
# in a single test case.
-
1
def reset!
-
@integration_session = Integration::Session.new(app)
-
end
-
-
1
def remove! # :nodoc:
-
@integration_session = nil
-
end
-
-
%w(get post patch put head delete cookies assigns
-
1
xml_http_request xhr get_via_redirect post_via_redirect).each do |method|
-
12
define_method(method) do |*args|
-
reset! unless integration_session
-
-
# reset the html_document variable, except for cookies/assigns calls
-
unless method == 'cookies' || method == 'assigns'
-
@html_document = nil
-
@html_scanner_document = nil
-
reset_template_assertion
-
end
-
-
integration_session.__send__(method, *args).tap do
-
copy_session_variables!
-
end
-
end
-
end
-
-
# Open a new session instance. If a block is given, the new session is
-
# yielded to the block before being returned.
-
#
-
# session = open_session do |sess|
-
# sess.extend(CustomAssertions)
-
# end
-
#
-
# By default, a single session is automatically created for you, but you
-
# can use this method to open multiple sessions that ought to be tested
-
# simultaneously.
-
1
def open_session
-
dup.tap do |session|
-
yield session if block_given?
-
end
-
end
-
-
# Copy the instance variables from the current session instance into the
-
# test instance.
-
1
def copy_session_variables! #:nodoc:
-
return unless integration_session
-
%w(controller response request).each do |var|
-
instance_variable_set("@#{var}", @integration_session.__send__(var))
-
end
-
end
-
-
1
def default_url_options
-
reset! unless integration_session
-
integration_session.default_url_options
-
end
-
-
1
def default_url_options=(options)
-
reset! unless integration_session
-
integration_session.default_url_options = options
-
end
-
-
1
def respond_to?(method, include_private = false)
-
integration_session.respond_to?(method, include_private) || super
-
end
-
-
# Delegate unhandled messages to the current session instance.
-
1
def method_missing(sym, *args, &block)
-
reset! unless integration_session
-
if integration_session.respond_to?(sym)
-
integration_session.__send__(sym, *args, &block).tap do
-
copy_session_variables!
-
end
-
else
-
super
-
end
-
end
-
-
1
private
-
1
def integration_session
-
@integration_session ||= nil
-
end
-
end
-
end
-
-
# An integration test spans multiple controllers and actions,
-
# tying them all together to ensure they work together as expected. It tests
-
# more completely than either unit or functional tests do, exercising the
-
# entire stack, from the dispatcher to the database.
-
#
-
# At its simplest, you simply extend <tt>IntegrationTest</tt> and write your tests
-
# using the get/post methods:
-
#
-
# require "test_helper"
-
#
-
# class ExampleTest < ActionDispatch::IntegrationTest
-
# fixtures :people
-
#
-
# def test_login
-
# # get the login page
-
# get "/login"
-
# assert_equal 200, status
-
#
-
# # post the login and follow through to the home page
-
# post "/login", username: people(:jamis).username,
-
# password: people(:jamis).password
-
# follow_redirect!
-
# assert_equal 200, status
-
# assert_equal "/home", path
-
# end
-
# end
-
#
-
# However, you can also have multiple session instances open per test, and
-
# even extend those instances with assertions and methods to create a very
-
# powerful testing DSL that is specific for your application. You can even
-
# reference any named routes you happen to have defined.
-
#
-
# require "test_helper"
-
#
-
# class AdvancedTest < ActionDispatch::IntegrationTest
-
# fixtures :people, :rooms
-
#
-
# def test_login_and_speak
-
# jamis, david = login(:jamis), login(:david)
-
# room = rooms(:office)
-
#
-
# jamis.enter(room)
-
# jamis.speak(room, "anybody home?")
-
#
-
# david.enter(room)
-
# david.speak(room, "hello!")
-
# end
-
#
-
# private
-
#
-
# module CustomAssertions
-
# def enter(room)
-
# # reference a named route, for maximum internal consistency!
-
# get(room_url(id: room.id))
-
# assert(...)
-
# ...
-
# end
-
#
-
# def speak(room, message)
-
# xml_http_request "/say/#{room.id}", message: message
-
# assert(...)
-
# ...
-
# end
-
# end
-
#
-
# def login(who)
-
# open_session do |sess|
-
# sess.extend(CustomAssertions)
-
# who = people(who)
-
# sess.post "/login", username: who.username,
-
# password: who.password
-
# assert(...)
-
# end
-
# end
-
# end
-
1
class IntegrationTest < ActiveSupport::TestCase
-
1
include Integration::Runner
-
1
include ActionController::TemplateAssertions
-
1
include ActionDispatch::Routing::UrlFor
-
-
1
@@app = nil
-
-
1
def self.app
-
@@app || ActionDispatch.test_app
-
end
-
-
1
def self.app=(app)
-
@@app = app
-
end
-
-
1
def app
-
super || self.class.app
-
end
-
-
1
def url_options
-
reset! unless integration_session
-
integration_session.url_options
-
end
-
-
1
def document_root_element
-
html_document.root
-
end
-
end
-
end
-
1
require 'action_dispatch/middleware/cookies'
-
1
require 'action_dispatch/middleware/flash'
-
1
require 'active_support/core_ext/hash/indifferent_access'
-
-
1
module ActionDispatch
-
1
module TestProcess
-
1
def assigns(key = nil)
-
1
assigns = {}.with_indifferent_access
-
3
@controller.view_assigns.each { |k, v| assigns.regular_writer(k, v) }
-
1
key.nil? ? assigns : assigns[key]
-
end
-
-
1
def session
-
@request.session
-
end
-
-
1
def flash
-
@request.flash
-
end
-
-
1
def cookies
-
@request.cookie_jar
-
end
-
-
1
def redirect_to_url
-
@response.redirect_url
-
end
-
-
# Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionController::TestCase.fixture_path, path), type)</tt>:
-
#
-
# post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
-
#
-
# To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
-
# This will not affect other platforms:
-
#
-
# post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)
-
1
def fixture_file_upload(path, mime_type = nil, binary = false)
-
if self.class.respond_to?(:fixture_path) && self.class.fixture_path
-
path = File.join(self.class.fixture_path, path)
-
end
-
Rack::Test::UploadedFile.new(path, mime_type, binary)
-
end
-
end
-
end
-
1
require 'active_support/core_ext/hash/indifferent_access'
-
1
require 'rack/utils'
-
-
1
module ActionDispatch
-
1
class TestRequest < Request
-
1
DEFAULT_ENV = Rack::MockRequest.env_for('/',
-
'HTTP_HOST' => 'test.host',
-
'REMOTE_ADDR' => '0.0.0.0',
-
'HTTP_USER_AGENT' => 'Rails Testing'
-
)
-
-
1
def self.new(env = {})
-
72
super
-
end
-
-
1
def initialize(env = {})
-
72
env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
-
72
super(default_env.merge(env))
-
end
-
-
1
def request_method=(method)
-
9
@env['REQUEST_METHOD'] = method.to_s.upcase
-
end
-
-
1
def host=(host)
-
9
@env['HTTP_HOST'] = host
-
end
-
-
1
def port=(number)
-
9
@env['SERVER_PORT'] = number.to_i
-
end
-
-
1
def request_uri=(uri)
-
@env['REQUEST_URI'] = uri
-
end
-
-
1
def path=(path)
-
9
@env['PATH_INFO'] = path
-
end
-
-
1
def action=(action_name)
-
path_parameters[:action] = action_name.to_s
-
end
-
-
1
def if_modified_since=(last_modified)
-
@env['HTTP_IF_MODIFIED_SINCE'] = last_modified
-
end
-
-
1
def if_none_match=(etag)
-
@env['HTTP_IF_NONE_MATCH'] = etag
-
end
-
-
1
def remote_addr=(addr)
-
@env['REMOTE_ADDR'] = addr
-
end
-
-
1
def user_agent=(user_agent)
-
@env['HTTP_USER_AGENT'] = user_agent
-
end
-
-
1
def accept=(mime_types)
-
@env.delete('action_dispatch.request.accepts')
-
@env['HTTP_ACCEPT'] = Array(mime_types).collect { |mime_type| mime_type.to_s }.join(",")
-
end
-
-
1
alias :rack_cookies :cookies
-
-
1
def cookies
-
96
@cookies ||= {}.with_indifferent_access
-
end
-
-
1
private
-
-
1
def default_env
-
DEFAULT_ENV
-
end
-
end
-
end
-
1
module ActionDispatch
-
# Integration test methods such as ActionDispatch::Integration::Session#get
-
# and ActionDispatch::Integration::Session#post return objects of class
-
# TestResponse, which represent the HTTP response results of the requested
-
# controller actions.
-
#
-
# See Response for more information on controller response objects.
-
1
class TestResponse < Response
-
1
def self.from_response(response)
-
new response.status, response.headers, response.body, default_headers: nil
-
end
-
-
# Was the response successful?
-
1
alias_method :success?, :successful?
-
-
# Was the URL not found?
-
1
alias_method :missing?, :not_found?
-
-
# Were we redirected?
-
1
alias_method :redirect?, :redirection?
-
-
# Was there a server-side error?
-
1
alias_method :error?, :server_error?
-
end
-
end
-
1
require 'active_support/core_ext/string/output_safety'
-
-
1
module ActionView
-
1
class OutputBuffer < ActiveSupport::SafeBuffer #:nodoc:
-
1
def initialize(*)
-
235
super
-
235
encode!
-
end
-
-
1
def <<(value)
-
38
return self if value.nil?
-
38
super(value.to_s)
-
end
-
1
alias :append= :<<
-
-
1
def safe_expr_append=(val)
-
return self if val.nil?
-
safe_concat val.to_s
-
end
-
-
1
alias :safe_append= :safe_concat
-
end
-
-
1
class StreamingBuffer #:nodoc:
-
1
def initialize(block)
-
@block = block
-
end
-
-
1
def <<(value)
-
value = value.to_s
-
value = ERB::Util.h(value) unless value.html_safe?
-
@block.call(value)
-
end
-
1
alias :concat :<<
-
1
alias :append= :<<
-
-
1
def safe_concat(value)
-
@block.call(value.to_s)
-
end
-
1
alias :safe_append= :safe_concat
-
-
1
def html_safe?
-
true
-
end
-
-
1
def html_safe
-
self
-
end
-
end
-
end
-
1
require 'thread_safe'
-
-
1
module ActionView
-
1
class DependencyTracker # :nodoc:
-
1
@trackers = ThreadSafe::Cache.new
-
-
1
def self.find_dependencies(name, template)
-
tracker = @trackers[template.handler]
-
-
if tracker.present?
-
tracker.call(name, template)
-
else
-
[]
-
end
-
end
-
-
1
def self.register_tracker(extension, tracker)
-
2
handler = Template.handler_for_extension(extension)
-
2
@trackers[handler] = tracker
-
end
-
-
1
def self.remove_tracker(handler)
-
@trackers.delete(handler)
-
end
-
-
1
class ERBTracker # :nodoc:
-
1
EXPLICIT_DEPENDENCY = /# Template Dependency: (\S+)/
-
-
# A valid ruby identifier - suitable for class, method and specially variable names
-
1
IDENTIFIER = /
-
[[:alpha:]_] # at least one uppercase letter, lowercase letter or underscore
-
[[:word:]]* # followed by optional letters, numbers or underscores
-
/x
-
-
# Any kind of variable name. e.g. @instance, @@class, $global or local.
-
# Possibly following a method call chain
-
1
VARIABLE_OR_METHOD_CHAIN = /
-
(?:\$|@{1,2})? # optional global, instance or class variable indicator
-
(?:#{IDENTIFIER}\.)* # followed by an optional chain of zero-argument method calls
-
(?<dynamic>#{IDENTIFIER}) # and a final valid identifier, captured as DYNAMIC
-
/x
-
-
# A simple string literal. e.g. "School's out!"
-
1
STRING = /
-
(?<quote>['"]) # an opening quote
-
(?<static>.*?) # with anything inside, captured as STATIC
-
\k<quote> # and a matching closing quote
-
/x
-
-
# Part of any hash containing the :partial key
-
1
PARTIAL_HASH_KEY = /
-
(?:\bpartial:|:partial\s*=>) # partial key in either old or new style hash syntax
-
\s* # followed by optional spaces
-
/x
-
-
# Part of any hash containing the :layout key
-
1
LAYOUT_HASH_KEY = /
-
(?:\blayout:|:layout\s*=>) # layout key in either old or new style hash syntax
-
\s* # followed by optional spaces
-
/x
-
-
# Matches:
-
# partial: "comments/comment", collection: @all_comments => "comments/comment"
-
# (object: @single_comment, partial: "comments/comment") => "comments/comment"
-
#
-
# "comments/comments"
-
# 'comments/comments'
-
# ('comments/comments')
-
#
-
# (@topic) => "topics/topic"
-
# topics => "topics/topic"
-
# (message.topics) => "topics/topic"
-
1
RENDER_ARGUMENTS = /\A
-
(?:\s*\(?\s*) # optional opening paren surrounded by spaces
-
(?:.*?#{PARTIAL_HASH_KEY}|#{LAYOUT_HASH_KEY})? # optional hash, up to the partial or layout key declaration
-
(?:#{STRING}|#{VARIABLE_OR_METHOD_CHAIN}) # finally, the dependency name of interest
-
/xm
-
-
1
def self.call(name, template)
-
new(name, template).dependencies
-
end
-
-
1
def initialize(name, template)
-
@name, @template = name, template
-
end
-
-
1
def dependencies
-
render_dependencies + explicit_dependencies
-
end
-
-
1
attr_reader :name, :template
-
1
private :name, :template
-
-
-
1
private
-
1
def source
-
template.source
-
end
-
-
1
def directory
-
name.split("/")[0..-2].join("/")
-
end
-
-
1
def render_dependencies
-
render_dependencies = []
-
render_calls = source.split(/\brender\b/).drop(1)
-
-
render_calls.each do |arguments|
-
arguments.scan(RENDER_ARGUMENTS) do
-
add_dynamic_dependency(render_dependencies, Regexp.last_match[:dynamic])
-
add_static_dependency(render_dependencies, Regexp.last_match[:static])
-
end
-
end
-
-
render_dependencies.uniq
-
end
-
-
1
def add_dynamic_dependency(dependencies, dependency)
-
if dependency
-
dependencies << "#{dependency.pluralize}/#{dependency.singularize}"
-
end
-
end
-
-
1
def add_static_dependency(dependencies, dependency)
-
if dependency
-
if dependency.include?('/')
-
dependencies << dependency
-
else
-
dependencies << "#{directory}/#{dependency}"
-
end
-
end
-
end
-
-
1
def explicit_dependencies
-
source.scan(EXPLICIT_DEPENDENCY).flatten.uniq
-
end
-
end
-
-
1
register_tracker :erb, ERBTracker
-
end
-
end
-
1
require 'active_support/core_ext/string/output_safety'
-
-
1
module ActionView
-
1
class OutputFlow #:nodoc:
-
1
attr_reader :content
-
-
1
def initialize
-
28
@content = Hash.new { |h,k| h[k] = ActiveSupport::SafeBuffer.new }
-
end
-
-
# Called by _layout_for to read stored values.
-
1
def get(key)
-
26
@content[key]
-
end
-
-
# Called by each renderer object to set the layout contents.
-
1
def set(key, value)
-
26
@content[key] = value
-
end
-
-
# Called by content_for
-
1
def append(key, value)
-
@content[key] << value
-
end
-
1
alias_method :append!, :append
-
-
end
-
-
1
class StreamingFlow < OutputFlow #:nodoc:
-
1
def initialize(view, fiber)
-
@view = view
-
@parent = nil
-
@child = view.output_buffer
-
@content = view.view_flow.content
-
@fiber = fiber
-
@root = Fiber.current.object_id
-
end
-
-
# Try to get stored content. If the content
-
# is not available and we are inside the layout
-
# fiber, we set that we are waiting for the given
-
# key and yield.
-
1
def get(key)
-
return super if @content.key?(key)
-
-
if inside_fiber?
-
view = @view
-
-
begin
-
@waiting_for = key
-
view.output_buffer, @parent = @child, view.output_buffer
-
Fiber.yield
-
ensure
-
@waiting_for = nil
-
view.output_buffer, @child = @parent, view.output_buffer
-
end
-
end
-
-
super
-
end
-
-
# Appends the contents for the given key. This is called
-
# by provides and resumes back to the fiber if it is
-
# the key it is waiting for.
-
1
def append!(key, value)
-
super
-
@fiber.resume if @waiting_for == key
-
end
-
-
1
private
-
-
1
def inside_fiber?
-
Fiber.current.object_id != @root
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags #:nodoc:
-
1
extend ActiveSupport::Autoload
-
-
1
eager_autoload do
-
1
autoload :Base
-
1
autoload :Translator
-
1
autoload :CheckBox
-
1
autoload :CollectionCheckBoxes
-
1
autoload :CollectionRadioButtons
-
1
autoload :CollectionSelect
-
1
autoload :ColorField
-
1
autoload :DateField
-
1
autoload :DateSelect
-
1
autoload :DatetimeField
-
1
autoload :DatetimeLocalField
-
1
autoload :DatetimeSelect
-
1
autoload :EmailField
-
1
autoload :FileField
-
1
autoload :GroupedCollectionSelect
-
1
autoload :HiddenField
-
1
autoload :Label
-
1
autoload :MonthField
-
1
autoload :NumberField
-
1
autoload :PasswordField
-
1
autoload :RadioButton
-
1
autoload :RangeField
-
1
autoload :SearchField
-
1
autoload :Select
-
1
autoload :TelField
-
1
autoload :TextArea
-
1
autoload :TextField
-
1
autoload :TimeField
-
1
autoload :TimeSelect
-
1
autoload :TimeZoneSelect
-
1
autoload :UrlField
-
1
autoload :WeekField
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class Base # :nodoc:
-
1
include Helpers::ActiveModelInstanceTag, Helpers::TagHelper, Helpers::FormTagHelper
-
1
include FormOptionsHelper
-
-
1
attr_reader :object
-
-
1
def initialize(object_name, method_name, template_object, options = {})
-
76
@object_name, @method_name = object_name.to_s.dup, method_name.to_s.dup
-
76
@template_object = template_object
-
-
76
@object_name.sub!(/\[\]$/,"") || @object_name.sub!(/\[\]\]$/,"]")
-
76
@object = retrieve_object(options.delete(:object))
-
76
@options = options
-
76
@auto_index = retrieve_autoindex(Regexp.last_match.pre_match) if Regexp.last_match
-
end
-
-
# This is what child classes implement.
-
1
def render
-
raise NotImplementedError, "Subclasses must implement a render method"
-
end
-
-
1
private
-
-
1
def value(object)
-
19
object.public_send @method_name if object
-
end
-
-
1
def value_before_type_cast(object)
-
19
unless object.nil?
-
19
method_before_type_cast = @method_name + "_before_type_cast"
-
-
19
if value_came_from_user?(object) && object.respond_to?(method_before_type_cast)
-
object.public_send(method_before_type_cast)
-
else
-
19
value(object)
-
end
-
end
-
end
-
-
1
def value_came_from_user?(object)
-
19
method_name = "#{@method_name}_came_from_user?"
-
19
!object.respond_to?(method_name) || object.public_send(method_name)
-
end
-
-
1
def retrieve_object(object)
-
76
if object
-
76
object
-
elsif @template_object.instance_variable_defined?("@#{@object_name}")
-
@template_object.instance_variable_get("@#{@object_name}")
-
end
-
rescue NameError
-
# As @object_name may contain the nested syntax (item[subobject]) we need to fallback to nil.
-
nil
-
end
-
-
1
def retrieve_autoindex(pre_match)
-
object = self.object || @template_object.instance_variable_get("@#{pre_match}")
-
if object && object.respond_to?(:to_param)
-
object.to_param
-
else
-
raise ArgumentError, "object[] naming but object param and @object var don't exist or don't respond to to_param: #{object.inspect}"
-
end
-
end
-
-
1
def add_default_name_and_id_for_value(tag_value, options)
-
19
if tag_value.nil?
-
19
add_default_name_and_id(options)
-
else
-
specified_id = options["id"]
-
add_default_name_and_id(options)
-
-
if specified_id.blank? && options["id"].present?
-
options["id"] += "_#{sanitized_value(tag_value)}"
-
end
-
end
-
end
-
-
1
def add_default_name_and_id(options)
-
76
if options.has_key?("index")
-
options["name"] ||= options.fetch("name"){ tag_name_with_index(options["index"], options["multiple"]) }
-
options["id"] = options.fetch("id"){ tag_id_with_index(options["index"]) }
-
options.delete("index")
-
elsif defined?(@auto_index)
-
options["name"] ||= options.fetch("name"){ tag_name_with_index(@auto_index, options["multiple"]) }
-
options["id"] = options.fetch("id"){ tag_id_with_index(@auto_index) }
-
else
-
152
options["name"] ||= options.fetch("name"){ tag_name(options["multiple"]) }
-
152
options["id"] = options.fetch("id"){ tag_id }
-
end
-
-
76
options["id"] = [options.delete('namespace'), options["id"]].compact.join("_").presence
-
end
-
-
1
def tag_name(multiple = false)
-
76
"#{@object_name}[#{sanitized_method_name}]#{"[]" if multiple}"
-
end
-
-
1
def tag_name_with_index(index, multiple = false)
-
"#{@object_name}[#{index}][#{sanitized_method_name}]#{"[]" if multiple}"
-
end
-
-
1
def tag_id
-
76
"#{sanitized_object_name}_#{sanitized_method_name}"
-
end
-
-
1
def tag_id_with_index(index)
-
"#{sanitized_object_name}_#{index}_#{sanitized_method_name}"
-
end
-
-
1
def sanitized_object_name
-
76
@sanitized_object_name ||= @object_name.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").sub(/_$/, "")
-
end
-
-
1
def sanitized_method_name
-
152
@sanitized_method_name ||= @method_name.sub(/\?$/,"")
-
end
-
-
1
def sanitized_value(value)
-
value.to_s.gsub(/\s/, "_").gsub(/[^-\w]/, "").downcase
-
end
-
-
1
def select_content_tag(option_tags, options, html_options)
-
html_options = html_options.stringify_keys
-
add_default_name_and_id(html_options)
-
options[:include_blank] ||= true unless options[:prompt] || select_not_required?(html_options)
-
value = options.fetch(:selected) { value(object) }
-
select = content_tag("select", add_options(option_tags, options, value), html_options)
-
-
if html_options["multiple"] && options.fetch(:include_hidden, true)
-
tag("input", :disabled => html_options["disabled"], :name => html_options["name"], :type => "hidden", :value => "") + select
-
else
-
select
-
end
-
end
-
-
1
def select_not_required?(html_options)
-
!html_options["required"] || html_options["multiple"] || html_options["size"].to_i > 1
-
end
-
-
1
def add_options(option_tags, options, value = nil)
-
if options[:include_blank]
-
option_tags = content_tag_string('option', options[:include_blank].kind_of?(String) ? options[:include_blank] : nil, :value => '') + "\n" + option_tags
-
end
-
if value.blank? && options[:prompt]
-
option_tags = content_tag_string('option', prompt_text(options[:prompt]), :value => '') + "\n" + option_tags
-
end
-
option_tags
-
end
-
end
-
end
-
end
-
end
-
1
require 'action_view/helpers/tags/checkable'
-
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class CheckBox < Base #:nodoc:
-
1
include Checkable
-
-
1
def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options)
-
19
@checked_value = checked_value
-
19
@unchecked_value = unchecked_value
-
19
super(object_name, method_name, template_object, options)
-
end
-
-
1
def render
-
19
options = @options.stringify_keys
-
19
options["type"] = "checkbox"
-
19
options["value"] = @checked_value
-
19
options["checked"] = "checked" if input_checked?(object, options)
-
-
19
if options["multiple"]
-
add_default_name_and_id_for_value(@checked_value, options)
-
options.delete("multiple")
-
else
-
19
add_default_name_and_id(options)
-
end
-
-
38
include_hidden = options.delete("include_hidden") { true }
-
19
checkbox = tag("input", options)
-
-
19
if include_hidden
-
19
hidden = hidden_field_for_checkbox(options)
-
19
hidden + checkbox
-
else
-
checkbox
-
end
-
end
-
-
1
private
-
-
1
def checked?(value)
-
case value
-
when TrueClass, FalseClass
-
value == !!@checked_value
-
when NilClass
-
false
-
when String
-
value == @checked_value
-
else
-
if value.respond_to?(:include?)
-
value.include?(@checked_value)
-
else
-
value.to_i == @checked_value.to_i
-
end
-
end
-
end
-
-
1
def hidden_field_for_checkbox(options)
-
19
@unchecked_value ? tag("input", options.slice("name", "disabled", "form").merge!("type" => "hidden", "value" => @unchecked_value)) : "".html_safe
-
end
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
module Checkable # :nodoc:
-
1
def input_checked?(object, options)
-
19
if options.has_key?("checked")
-
19
checked = options.delete "checked"
-
19
checked == true || checked == "checked"
-
else
-
checked?(value(object))
-
end
-
end
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class EmailField < TextField # :nodoc:
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class Label < Base # :nodoc:
-
1
class LabelBuilder # :nodoc:
-
1
attr_reader :object
-
-
1
def initialize(template_object, object_name, method_name, object, tag_value)
-
19
@template_object = template_object
-
19
@object_name = object_name
-
19
@method_name = method_name
-
19
@object = object
-
19
@tag_value = tag_value
-
end
-
-
1
def translation
-
19
method_and_value = @tag_value.present? ? "#{@method_name}.#{@tag_value}" : @method_name
-
-
content ||= Translator
-
.new(object, @object_name, method_and_value, "helpers.label")
-
19
.translate
-
19
content ||= @method_name.humanize
-
-
19
content
-
end
-
end
-
-
1
def initialize(object_name, method_name, template_object, content_or_options = nil, options = nil)
-
19
options ||= {}
-
-
19
content_is_options = content_or_options.is_a?(Hash)
-
19
if content_is_options
-
options.merge! content_or_options
-
@content = nil
-
else
-
19
@content = content_or_options
-
end
-
-
19
super(object_name, method_name, template_object, options)
-
end
-
-
1
def render(&block)
-
19
options = @options.stringify_keys
-
19
tag_value = options.delete("value")
-
19
name_and_id = options.dup
-
-
19
if name_and_id["for"]
-
name_and_id["id"] = name_and_id["for"]
-
else
-
19
name_and_id.delete("id")
-
end
-
-
19
add_default_name_and_id_for_value(tag_value, name_and_id)
-
19
options.delete("index")
-
19
options.delete("namespace")
-
19
options["for"] = name_and_id["id"] unless options.key?("for")
-
-
19
builder = LabelBuilder.new(@template_object, @object_name, @method_name, @object, tag_value)
-
-
19
content = if block_given?
-
@template_object.capture(builder, &block)
-
elsif @content.present?
-
@content.to_s
-
else
-
19
render_component(builder)
-
end
-
-
19
label_tag(name_and_id["id"], content, options)
-
end
-
-
1
private
-
-
1
def render_component(builder)
-
19
builder.translation
-
end
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class PasswordField < TextField # :nodoc:
-
1
def render
-
19
@options = {:value => nil}.merge!(@options)
-
19
super
-
end
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
module Placeholderable # :nodoc:
-
1
def initialize(*)
-
38
super
-
-
38
if tag_value = @options[:placeholder]
-
38
placeholder = tag_value if tag_value.is_a?(String)
-
38
method_and_value = tag_value.is_a?(TrueClass) ? @method_name : "#{@method_name}.#{tag_value}"
-
-
placeholder ||= Tags::Translator
-
.new(object, @object_name, method_and_value, "helpers.placeholder")
-
38
.translate
-
38
placeholder ||= @method_name.humanize
-
38
@options[:placeholder] = placeholder
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require 'action_view/helpers/tags/placeholderable'
-
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class TextArea < Base # :nodoc:
-
1
include Placeholderable
-
-
1
def render
-
options = @options.stringify_keys
-
add_default_name_and_id(options)
-
-
if size = options.delete("size")
-
options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
-
end
-
-
content_tag("textarea", options.delete("value") { value_before_type_cast(object) }, options)
-
end
-
end
-
end
-
end
-
end
-
1
require 'action_view/helpers/tags/placeholderable'
-
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class TextField < Base # :nodoc:
-
1
include Placeholderable
-
-
1
def render
-
38
options = @options.stringify_keys
-
38
options["size"] = options["maxlength"] unless options.key?("size")
-
38
options["type"] ||= field_type
-
57
options["value"] = options.fetch("value") { value_before_type_cast(object) } unless field_type == "file"
-
38
yield options if block_given?
-
38
add_default_name_and_id(options)
-
38
tag("input", options)
-
end
-
-
1
class << self
-
1
def field_type
-
76
@field_type ||= self.name.split("::").last.sub("Field", "").downcase
-
end
-
end
-
-
1
private
-
-
1
def field_type
-
76
self.class.field_type
-
end
-
end
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module Tags # :nodoc:
-
1
class Translator # :nodoc:
-
1
def initialize(object, object_name, method_and_value, scope)
-
19
@object_name = object_name.gsub(/\[(.*)_attributes\]\[\d+\]/, '.\1')
-
19
@method_and_value = method_and_value
-
19
@scope = scope
-
19
@model = object.respond_to?(:to_model) ? object.to_model : nil
-
end
-
-
1
def translate
-
19
translated_attribute = I18n.t("#{object_name}.#{method_and_value}", default: i18n_default, scope: scope).presence
-
19
translated_attribute || human_attribute_name
-
end
-
-
1
protected
-
-
1
attr_reader :object_name, :method_and_value, :scope, :model
-
-
1
private
-
-
1
def i18n_default
-
19
if model
-
19
key = model.model_name.i18n_key
-
19
["#{key}.#{method_and_value}".to_sym, ""]
-
else
-
""
-
end
-
end
-
-
1
def human_attribute_name
-
19
if model && model.class.respond_to?(:human_attribute_name)
-
19
model.class.human_attribute_name(method_and_value)
-
end
-
end
-
end
-
end
-
end
-
end
-
1
module ActionView
-
# This class defines the interface for a renderer. Each class that
-
# subclasses +AbstractRenderer+ is used by the base +Renderer+ class to
-
# render a specific type of object.
-
#
-
# The base +Renderer+ class uses its +render+ method to delegate to the
-
# renderers. These currently consist of
-
#
-
# PartialRenderer - Used for rendering partials
-
# TemplateRenderer - Used for rendering other types of templates
-
# StreamingTemplateRenderer - Used for streaming
-
#
-
# Whenever the +render+ method is called on the base +Renderer+ class, a new
-
# renderer object of the correct type is created, and the +render+ method on
-
# that new object is called in turn. This abstracts the setup and rendering
-
# into a separate classes for partials and templates.
-
1
class AbstractRenderer #:nodoc:
-
1
delegate :find_template, :find_file, :template_exists?, :with_fallbacks, :with_layout_format, :formats, :to => :@lookup_context
-
-
1
def initialize(lookup_context)
-
200
@lookup_context = lookup_context
-
end
-
-
1
def render
-
raise NotImplementedError
-
end
-
-
1
protected
-
-
1
def extract_details(options)
-
200
@lookup_context.registered_details.each_with_object({}) do |key, details|
-
800
value = options[key]
-
-
800
details[key] = Array(value) if value
-
end
-
end
-
-
1
def instrument(name, options={})
-
400
ActiveSupport::Notifications.instrument("render_#{name}.action_view", options){ yield }
-
end
-
-
1
def prepend_formats(formats)
-
200
formats = Array(formats)
-
200
return if formats.empty? || @lookup_context.html_fallback_for_js
-
-
27
@lookup_context.formats = formats | @lookup_context.formats
-
end
-
end
-
end
-
1
require 'thread_safe'
-
-
1
module ActionView
-
1
class PartialIteration
-
# The number of iterations that will be done by the partial.
-
1
attr_reader :size
-
-
# The current iteration of the partial.
-
1
attr_reader :index
-
-
1
def initialize(size)
-
13
@size = size
-
13
@index = 0
-
end
-
-
# Check if this is the first iteration of the partial.
-
1
def first?
-
index == 0
-
end
-
-
# Check if this is the last iteration of the partial.
-
1
def last?
-
index == size - 1
-
end
-
-
1
def iterate! # :nodoc:
-
14
@index += 1
-
end
-
end
-
-
# = Action View Partials
-
#
-
# There's also a convenience method for rendering sub templates within the current controller that depends on a
-
# single object (we call this kind of sub templates for partials). It relies on the fact that partials should
-
# follow the naming convention of being prefixed with an underscore -- as to separate them from regular
-
# templates that could be rendered on their own.
-
#
-
# In a template for Advertiser#account:
-
#
-
# <%= render partial: "account" %>
-
#
-
# This would render "advertiser/_account.html.erb".
-
#
-
# In another template for Advertiser#buy, we could have:
-
#
-
# <%= render partial: "account", locals: { account: @buyer } %>
-
#
-
# <% @advertisements.each do |ad| %>
-
# <%= render partial: "ad", locals: { ad: ad } %>
-
# <% end %>
-
#
-
# This would first render "advertiser/_account.html.erb" with @buyer passed in as the local variable +account+, then
-
# render "advertiser/_ad.html.erb" and pass the local variable +ad+ to the template for display.
-
#
-
# == The :as and :object options
-
#
-
# By default <tt>ActionView::PartialRenderer</tt> doesn't have any local variables.
-
# The <tt>:object</tt> option can be used to pass an object to the partial. For instance:
-
#
-
# <%= render partial: "account", object: @buyer %>
-
#
-
# would provide the <tt>@buyer</tt> object to the partial, available under the local variable +account+ and is
-
# equivalent to:
-
#
-
# <%= render partial: "account", locals: { account: @buyer } %>
-
#
-
# With the <tt>:as</tt> option we can specify a different name for said local variable. For example, if we
-
# wanted it to be +user+ instead of +account+ we'd do:
-
#
-
# <%= render partial: "account", object: @buyer, as: 'user' %>
-
#
-
# This is equivalent to
-
#
-
# <%= render partial: "account", locals: { user: @buyer } %>
-
#
-
# == Rendering a collection of partials
-
#
-
# The example of partial use describes a familiar pattern where a template needs to iterate over an array and
-
# render a sub template for each of the elements. This pattern has been implemented as a single method that
-
# accepts an array and renders a partial by the same name as the elements contained within. So the three-lined
-
# example in "Using partials" can be rewritten with a single line:
-
#
-
# <%= render partial: "ad", collection: @advertisements %>
-
#
-
# This will render "advertiser/_ad.html.erb" and pass the local variable +ad+ to the template for display. An
-
# iteration object will automatically be made available to the template with a name of the form
-
# +partial_name_iteration+. The iteration object has knowledge about which index the current object has in
-
# the collection and the total size of the collection. The iteration object also has two convenience methods,
-
# +first?+ and +last?+. In the case of the example above, the template would be fed +ad_iteration+.
-
# For backwards compatibility the +partial_name_counter+ is still present and is mapped to the iteration's
-
# +index+ method.
-
#
-
# The <tt>:as</tt> option may be used when rendering partials.
-
#
-
# You can specify a partial to be rendered between elements via the <tt>:spacer_template</tt> option.
-
# The following example will render <tt>advertiser/_ad_divider.html.erb</tt> between each ad partial:
-
#
-
# <%= render partial: "ad", collection: @advertisements, spacer_template: "ad_divider" %>
-
#
-
# If the given <tt>:collection</tt> is nil or empty, <tt>render</tt> will return nil. This will allow you
-
# to specify a text which will displayed instead by using this form:
-
#
-
# <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %>
-
#
-
# NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also
-
# just keep domain objects, like Active Records, in there.
-
#
-
# == Rendering shared partials
-
#
-
# Two controllers can share a set of partials and render them like this:
-
#
-
# <%= render partial: "advertisement/ad", locals: { ad: @advertisement } %>
-
#
-
# This will render the partial "advertisement/_ad.html.erb" regardless of which controller this is being called from.
-
#
-
# == Rendering objects that respond to `to_partial_path`
-
#
-
# Instead of explicitly naming the location of a partial, you can also let PartialRenderer do the work
-
# and pick the proper path by checking `to_partial_path` method.
-
#
-
# # @account.to_partial_path returns 'accounts/account', so it can be used to replace:
-
# # <%= render partial: "accounts/account", locals: { account: @account} %>
-
# <%= render partial: @account %>
-
#
-
# # @posts is an array of Post instances, so every post record returns 'posts/post' on `to_partial_path`,
-
# # that's why we can replace:
-
# # <%= render partial: "posts/post", collection: @posts %>
-
# <%= render partial: @posts %>
-
#
-
# == Rendering the default case
-
#
-
# If you're not going to be using any of the options like collections or layouts, you can also use the short-hand
-
# defaults of render to render partials. Examples:
-
#
-
# # Instead of <%= render partial: "account" %>
-
# <%= render "account" %>
-
#
-
# # Instead of <%= render partial: "account", locals: { account: @buyer } %>
-
# <%= render "account", account: @buyer %>
-
#
-
# # @account.to_partial_path returns 'accounts/account', so it can be used to replace:
-
# # <%= render partial: "accounts/account", locals: { account: @account} %>
-
# <%= render @account %>
-
#
-
# # @posts is an array of Post instances, so every post record returns 'posts/post' on `to_partial_path`,
-
# # that's why we can replace:
-
# # <%= render partial: "posts/post", collection: @posts %>
-
# <%= render @posts %>
-
#
-
# == Rendering partials with layouts
-
#
-
# Partials can have their own layouts applied to them. These layouts are different than the ones that are
-
# specified globally for the entire action, but they work in a similar fashion. Imagine a list with two types
-
# of users:
-
#
-
# <%# app/views/users/index.html.erb &>
-
# Here's the administrator:
-
# <%= render partial: "user", layout: "administrator", locals: { user: administrator } %>
-
#
-
# Here's the editor:
-
# <%= render partial: "user", layout: "editor", locals: { user: editor } %>
-
#
-
# <%# app/views/users/_user.html.erb &>
-
# Name: <%= user.name %>
-
#
-
# <%# app/views/users/_administrator.html.erb &>
-
# <div id="administrator">
-
# Budget: $<%= user.budget %>
-
# <%= yield %>
-
# </div>
-
#
-
# <%# app/views/users/_editor.html.erb &>
-
# <div id="editor">
-
# Deadline: <%= user.deadline %>
-
# <%= yield %>
-
# </div>
-
#
-
# ...this will return:
-
#
-
# Here's the administrator:
-
# <div id="administrator">
-
# Budget: $<%= user.budget %>
-
# Name: <%= user.name %>
-
# </div>
-
#
-
# Here's the editor:
-
# <div id="editor">
-
# Deadline: <%= user.deadline %>
-
# Name: <%= user.name %>
-
# </div>
-
#
-
# If a collection is given, the layout will be rendered once for each item in
-
# the collection. For example, these two snippets have the same output:
-
#
-
# <%# app/views/users/_user.html.erb %>
-
# Name: <%= user.name %>
-
#
-
# <%# app/views/users/index.html.erb %>
-
# <%# This does not use layouts %>
-
# <ul>
-
# <% users.each do |user| -%>
-
# <li>
-
# <%= render partial: "user", locals: { user: user } %>
-
# </li>
-
# <% end -%>
-
# </ul>
-
#
-
# <%# app/views/users/_li_layout.html.erb %>
-
# <li>
-
# <%= yield %>
-
# </li>
-
#
-
# <%# app/views/users/index.html.erb %>
-
# <ul>
-
# <%= render partial: "user", layout: "li_layout", collection: users %>
-
# </ul>
-
#
-
# Given two users whose names are Alice and Bob, these snippets return:
-
#
-
# <ul>
-
# <li>
-
# Name: Alice
-
# </li>
-
# <li>
-
# Name: Bob
-
# </li>
-
# </ul>
-
#
-
# The current object being rendered, as well as the object_counter, will be
-
# available as local variables inside the layout template under the same names
-
# as available in the partial.
-
#
-
# You can also apply a layout to a block within any template:
-
#
-
# <%# app/views/users/_chief.html.erb &>
-
# <%= render(layout: "administrator", locals: { user: chief }) do %>
-
# Title: <%= chief.title %>
-
# <% end %>
-
#
-
# ...this will return:
-
#
-
# <div id="administrator">
-
# Budget: $<%= user.budget %>
-
# Title: <%= chief.name %>
-
# </div>
-
#
-
# As you can see, the <tt>:locals</tt> hash is shared between both the partial and its layout.
-
#
-
# If you pass arguments to "yield" then this will be passed to the block. One way to use this is to pass
-
# an array to layout and treat it as an enumerable.
-
#
-
# <%# app/views/users/_user.html.erb &>
-
# <div class="user">
-
# Budget: $<%= user.budget %>
-
# <%= yield user %>
-
# </div>
-
#
-
# <%# app/views/users/index.html.erb &>
-
# <%= render layout: @users do |user| %>
-
# Title: <%= user.title %>
-
# <% end %>
-
#
-
# This will render the layout for each user and yield to the block, passing the user, each time.
-
#
-
# You can also yield multiple times in one layout and use block arguments to differentiate the sections.
-
#
-
# <%# app/views/users/_user.html.erb &>
-
# <div class="user">
-
# <%= yield user, :header %>
-
# Budget: $<%= user.budget %>
-
# <%= yield user, :footer %>
-
# </div>
-
#
-
# <%# app/views/users/index.html.erb &>
-
# <%= render layout: @users do |user, section| %>
-
# <%- case section when :header -%>
-
# Title: <%= user.title %>
-
# <%- when :footer -%>
-
# Deadline: <%= user.deadline %>
-
# <%- end -%>
-
# <% end %>
-
1
class PartialRenderer < AbstractRenderer
-
1
PREFIXED_PARTIAL_NAMES = ThreadSafe::Cache.new do |h, k|
-
h[k] = ThreadSafe::Cache.new
-
end
-
-
1
def initialize(*)
-
173
super
-
173
@context_prefix = @lookup_context.prefixes.first
-
end
-
-
1
def render(context, options, block)
-
173
setup(context, options, block)
-
173
identifier = (@template = find_partial) ? @template.identifier : @path
-
-
173
@lookup_context.rendered_format ||= begin
-
if @template && @template.formats.present?
-
@template.formats.first
-
else
-
formats.first
-
end
-
end
-
-
173
if @collection
-
23
instrument(:collection, :identifier => identifier || "collection", :count => @collection.size) do
-
23
render_collection
-
end
-
else
-
150
instrument(:partial, :identifier => identifier) do
-
150
render_partial
-
end
-
end
-
end
-
-
1
private
-
-
1
def render_collection
-
23
return nil if @collection.blank?
-
-
13
if @options.key?(:spacer_template)
-
spacer = find_template(@options[:spacer_template], @locals.keys).render(@view, @locals)
-
end
-
-
13
result = @template ? collection_with_template : collection_without_template
-
13
result.join(spacer).html_safe
-
end
-
-
1
def render_partial
-
150
view, locals, block = @view, @locals, @block
-
150
object, as = @object, @variable
-
-
150
if !block && (layout = @options[:layout])
-
layout = find_template(layout.to_s, @template_keys)
-
end
-
-
150
object ||= locals[as]
-
150
locals[as] = object
-
-
150
content = @template.render(view, locals) do |*name|
-
view._layout_for(*name, &block)
-
end
-
-
150
content = layout.render(view, locals){ content } if layout
-
150
content
-
end
-
-
1
private
-
-
# Sets up instance variables needed for rendering a partial. This method
-
# finds the options and details and extracts them. The method also contains
-
# logic that handles the type of object passed in as the partial.
-
#
-
# If +options[:partial]+ is a string, then the +@path+ instance variable is
-
# set to that string. Otherwise, the +options[:partial]+ object must
-
# respond to +to_partial_path+ in order to setup the path.
-
1
def setup(context, options, block)
-
173
@view = context
-
173
@options = options
-
173
@block = block
-
-
173
@locals = options[:locals] || {}
-
173
@details = extract_details(options)
-
-
173
prepend_formats(options[:formats])
-
-
173
partial = options[:partial]
-
-
173
if String === partial
-
173
@has_object = options.key?(:object)
-
173
@object = options[:object]
-
173
@collection = collection_from_options
-
173
@path = partial
-
else
-
@has_object = true
-
@object = partial
-
@collection = collection_from_object || collection_from_options
-
-
if @collection
-
paths = @collection_data = @collection.map { |o| partial_path(o) }
-
@path = paths.uniq.one? ? paths.first : nil
-
else
-
@path = partial_path
-
end
-
end
-
-
173
if as = options[:as]
-
21
raise_invalid_option_as(as) unless as.to_s =~ /\A[a-z_]\w*\z/
-
21
as = as.to_sym
-
end
-
-
173
if @path
-
173
@variable, @variable_counter, @variable_iteration = retrieve_variable(@path, as)
-
173
@template_keys = retrieve_template_keys
-
else
-
paths.map! { |path| retrieve_variable(path, as).unshift(path) }
-
end
-
-
173
self
-
end
-
-
1
def collection_from_options
-
173
if @options.key?(:collection)
-
23
collection = @options[:collection]
-
23
collection.respond_to?(:to_ary) ? collection.to_ary : []
-
end
-
end
-
-
1
def collection_from_object
-
@object.to_ary if @object.respond_to?(:to_ary)
-
end
-
-
1
def find_partial
-
173
find_template(@path, @template_keys) if @path
-
end
-
-
1
def find_template(path, locals)
-
173
prefixes = path.include?(?/) ? [] : @lookup_context.prefixes
-
173
@lookup_context.find_template(path, prefixes, true, locals, @details)
-
end
-
-
1
def collection_with_template
-
13
view, locals, template = @view, @locals, @template
-
13
as, counter, iteration = @variable, @variable_counter, @variable_iteration
-
-
13
if layout = @options[:layout]
-
layout = find_template(layout, @template_keys)
-
end
-
-
13
partial_iteration = PartialIteration.new(@collection.size)
-
13
locals[iteration] = partial_iteration
-
-
13
@collection.map do |object|
-
14
locals[as] = object
-
14
locals[counter] = partial_iteration.index
-
-
14
content = template.render(view, locals)
-
14
content = layout.render(view, locals) { content } if layout
-
14
partial_iteration.iterate!
-
14
content
-
end
-
end
-
-
1
def collection_without_template
-
view, locals, collection_data = @view, @locals, @collection_data
-
cache = {}
-
keys = @locals.keys
-
-
partial_iteration = PartialIteration.new(@collection.size)
-
-
@collection.map do |object|
-
index = partial_iteration.index
-
path, as, counter, iteration = collection_data[index]
-
-
locals[as] = object
-
locals[counter] = index
-
locals[iteration] = partial_iteration
-
-
template = (cache[path] ||= find_template(path, keys + [as, counter]))
-
content = template.render(view, locals)
-
partial_iteration.iterate!
-
content
-
end
-
end
-
-
# Obtains the path to where the object's partial is located. If the object
-
# responds to +to_partial_path+, then +to_partial_path+ will be called and
-
# will provide the path. If the object does not respond to +to_partial_path+,
-
# then an +ArgumentError+ is raised.
-
#
-
# If +prefix_partial_path_with_controller_namespace+ is true, then this
-
# method will prefix the partial paths with a namespace.
-
1
def partial_path(object = @object)
-
object = object.to_model if object.respond_to?(:to_model)
-
-
path = if object.respond_to?(:to_partial_path)
-
object.to_partial_path
-
else
-
raise ArgumentError.new("'#{object.inspect}' is not an ActiveModel-compatible object. It must implement :to_partial_path.")
-
end
-
-
if @view.prefix_partial_path_with_controller_namespace
-
prefixed_partial_names[path] ||= merge_prefix_into_object_path(@context_prefix, path.dup)
-
else
-
path
-
end
-
end
-
-
1
def prefixed_partial_names
-
@prefixed_partial_names ||= PREFIXED_PARTIAL_NAMES[@context_prefix]
-
end
-
-
1
def merge_prefix_into_object_path(prefix, object_path)
-
if prefix.include?(?/) && object_path.include?(?/)
-
prefixes = []
-
prefix_array = File.dirname(prefix).split('/')
-
object_path_array = object_path.split('/')[0..-3] # skip model dir & partial
-
-
prefix_array.each_with_index do |dir, index|
-
break if dir == object_path_array[index]
-
prefixes << dir
-
end
-
-
(prefixes << object_path).join("/")
-
else
-
object_path
-
end
-
end
-
-
1
def retrieve_template_keys
-
173
keys = @locals.keys
-
173
keys << @variable if @has_object || @collection
-
173
if @collection
-
23
keys << @variable_counter
-
23
keys << @variable_iteration
-
end
-
173
keys
-
end
-
-
1
def retrieve_variable(path, as)
-
173
variable = as || begin
-
152
base = path[-1] == "/" ? "" : File.basename(path)
-
152
raise_invalid_identifier(path) unless base =~ /\A_?([a-z]\w*)(\.\w+)*\z/
-
152
$1.to_sym
-
end
-
173
if @collection
-
23
variable_counter = :"#{variable}_counter"
-
23
variable_iteration = :"#{variable}_iteration"
-
end
-
173
[variable, variable_counter, variable_iteration]
-
end
-
-
1
IDENTIFIER_ERROR_MESSAGE = "The partial name (%s) is not a valid Ruby identifier; " +
-
"make sure your partial name starts with underscore, " +
-
"and is followed by any combination of letters, numbers and underscores."
-
-
1
OPTION_AS_ERROR_MESSAGE = "The value (%s) of the option `as` is not a valid Ruby identifier; " +
-
"make sure it starts with lowercase letter, " +
-
"and is followed by any combination of letters, numbers and underscores."
-
-
1
def raise_invalid_identifier(path)
-
raise ArgumentError.new(IDENTIFIER_ERROR_MESSAGE % (path))
-
end
-
-
1
def raise_invalid_option_as(as)
-
raise ArgumentError.new(OPTION_AS_ERROR_MESSAGE % (as))
-
end
-
end
-
end
-
1
module ActionView
-
# This is the main entry point for rendering. It basically delegates
-
# to other objects like TemplateRenderer and PartialRenderer which
-
# actually renders the template.
-
#
-
# The Renderer will parse the options from the +render+ or +render_body+
-
# method and render a partial or a template based on the options. The
-
# +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all
-
# the setup and logic necessary to render a view and a new object is created
-
# each time +render+ is called.
-
1
class Renderer
-
1
attr_accessor :lookup_context
-
-
1
def initialize(lookup_context)
-
28
@lookup_context = lookup_context
-
end
-
-
# Main render entry point shared by AV and AC.
-
1
def render(context, options)
-
112
if options.key?(:partial)
-
85
render_partial(context, options)
-
else
-
27
render_template(context, options)
-
end
-
end
-
-
# Render but returns a valid Rack body. If fibers are defined, we return
-
# a streaming body that renders the template piece by piece.
-
#
-
# Note that partials are not supported to be rendered with streaming,
-
# so in such cases, we just wrap them in an array.
-
1
def render_body(context, options)
-
if options.key?(:partial)
-
[render_partial(context, options)]
-
else
-
StreamingTemplateRenderer.new(@lookup_context).render(context, options)
-
end
-
end
-
-
# Direct accessor to template rendering.
-
1
def render_template(context, options) #:nodoc:
-
27
TemplateRenderer.new(@lookup_context).render(context, options)
-
end
-
-
# Direct access to partial rendering.
-
1
def render_partial(context, options, &block) #:nodoc:
-
173
PartialRenderer.new(@lookup_context).render(context, options, block)
-
end
-
end
-
end
-
1
require 'active_support/core_ext/object/try'
-
-
1
module ActionView
-
1
class TemplateRenderer < AbstractRenderer #:nodoc:
-
1
def render(context, options)
-
27
@view = context
-
27
@details = extract_details(options)
-
27
template = determine_template(options)
-
-
27
prepend_formats(template.formats)
-
-
27
@lookup_context.rendered_format ||= (template.formats.first || formats.first)
-
-
27
render_template(template, options[:layout], options[:locals])
-
end
-
-
1
private
-
-
# Determine the template to be rendered using the given options.
-
1
def determine_template(options)
-
27
keys = options.has_key?(:locals) ? options[:locals].keys : []
-
-
27
if options.key?(:body)
-
Template::Text.new(options[:body])
-
27
elsif options.key?(:text)
-
1
Template::Text.new(options[:text], formats.first)
-
26
elsif options.key?(:plain)
-
Template::Text.new(options[:plain])
-
26
elsif options.key?(:html)
-
Template::HTML.new(options[:html], formats.first)
-
26
elsif options.key?(:file)
-
with_fallbacks { find_file(options[:file], nil, false, keys, @details) }
-
26
elsif options.key?(:inline)
-
handler = Template.handler_for_extension(options[:type] || "erb")
-
Template.new(options[:inline], "inline template", handler, :locals => keys)
-
26
elsif options.key?(:template)
-
26
if options[:template].respond_to?(:render)
-
1
options[:template]
-
else
-
25
find_template(options[:template], options[:prefixes], false, keys, @details)
-
end
-
else
-
raise ArgumentError, "You invoked render but did not give any of :partial, :template, :inline, :file, :plain, :text or :body option."
-
end
-
end
-
-
# Renders the given template. A string representing the layout can be
-
# supplied as well.
-
1
def render_template(template, layout_name = nil, locals = nil) #:nodoc:
-
27
view, locals = @view, locals || {}
-
-
27
render_with_layout(layout_name, locals) do |layout|
-
27
instrument(:template, :identifier => template.identifier, :layout => layout.try(:virtual_path)) do
-
27
template.render(view, locals) { |*name| view._layout_for(*name) }
-
end
-
end
-
end
-
-
1
def render_with_layout(path, locals) #:nodoc:
-
27
layout = path && find_layout(path, locals.keys)
-
27
content = yield(layout)
-
-
27
if layout
-
26
view = @view
-
26
view.view_flow.set(:layout, content)
-
52
layout.render(view, locals){ |*name| view._layout_for(*name) }
-
else
-
1
content
-
end
-
end
-
-
# This is the method which actually finds the layout using details in the lookup
-
# context object. If no layout is found, it checks if at least a layout with
-
# the given name exists across all details before raising the error.
-
1
def find_layout(layout, keys)
-
52
with_layout_format { resolve_layout(layout, keys) }
-
end
-
-
1
def resolve_layout(layout, keys)
-
50
case layout
-
when String
-
22
begin
-
22
if layout =~ /^\//
-
with_fallbacks { find_template(layout, nil, false, keys, @details) }
-
else
-
22
find_template(layout, nil, false, keys, @details)
-
end
-
rescue ActionView::MissingTemplate
-
all_details = @details.merge(:formats => @lookup_context.default_formats)
-
raise unless template_exists?(layout, nil, false, keys, all_details)
-
end
-
when Proc
-
24
resolve_layout(layout.call, keys)
-
when FalseClass
-
nil
-
else
-
4
layout
-
end
-
end
-
end
-
end
-
1
require 'action_dispatch/routing/polymorphic_routes'
-
-
1
module ActionView
-
1
module RoutingUrlFor
-
-
# Returns the URL for the set of +options+ provided. This takes the
-
# same options as +url_for+ in Action Controller (see the
-
# documentation for <tt>ActionController::Base#url_for</tt>). Note that by default
-
# <tt>:only_path</tt> is <tt>true</tt> so you'll get the relative "/controller/action"
-
# instead of the fully qualified URL like "http://example.com/controller/action".
-
#
-
# ==== Options
-
# * <tt>:anchor</tt> - Specifies the anchor name to be appended to the path.
-
# * <tt>:only_path</tt> - If true, returns the relative URL (omitting the protocol, host name, and port) (<tt>true</tt> by default unless <tt>:host</tt> is specified).
-
# * <tt>:trailing_slash</tt> - If true, adds a trailing slash, as in "/archive/2005/". Note that this
-
# is currently not recommended since it breaks caching.
-
# * <tt>:host</tt> - Overrides the default (current) host if provided.
-
# * <tt>:protocol</tt> - Overrides the default (current) protocol if provided.
-
# * <tt>:user</tt> - Inline HTTP authentication (only plucked out if <tt>:password</tt> is also present).
-
# * <tt>:password</tt> - Inline HTTP authentication (only plucked out if <tt>:user</tt> is also present).
-
#
-
# ==== Relying on named routes
-
#
-
# Passing a record (like an Active Record) instead of a hash as the options parameter will
-
# trigger the named route for that record. The lookup will happen on the name of the class. So passing a
-
# Workshop object will attempt to use the +workshop_path+ route. If you have a nested route, such as
-
# +admin_workshop_path+ you'll have to call that explicitly (it's impossible for +url_for+ to guess that route).
-
#
-
# ==== Implicit Controller Namespacing
-
#
-
# Controllers passed in using the +:controller+ option will retain their namespace unless it is an absolute one.
-
#
-
# ==== Examples
-
# <%= url_for(action: 'index') %>
-
# # => /blog/
-
#
-
# <%= url_for(action: 'find', controller: 'books') %>
-
# # => /books/find
-
#
-
# <%= url_for(action: 'login', controller: 'members', only_path: false, protocol: 'https') %>
-
# # => https://www.example.com/members/login/
-
#
-
# <%= url_for(action: 'play', anchor: 'player') %>
-
# # => /messages/play/#player
-
#
-
# <%= url_for(action: 'jump', anchor: 'tax&ship') %>
-
# # => /testing/jump/#tax&ship
-
#
-
# <%= url_for(Workshop.new) %>
-
# # relies on Workshop answering a persisted? call (and in this case returning false)
-
# # => /workshops
-
#
-
# <%= url_for(@workshop) %>
-
# # calls @workshop.to_param which by default returns the id
-
# # => /workshops/5
-
#
-
# # to_param can be re-defined in a model to provide different URL names:
-
# # => /workshops/1-workshop-name
-
#
-
# <%= url_for("http://www.example.com") %>
-
# # => http://www.example.com
-
#
-
# <%= url_for(:back) %>
-
# # if request.env["HTTP_REFERER"] is set to "http://www.example.com"
-
# # => http://www.example.com
-
#
-
# <%= url_for(:back) %>
-
# # if request.env["HTTP_REFERER"] is not set or is blank
-
# # => javascript:history.back()
-
#
-
# <%= url_for(action: 'index', controller: 'users') %>
-
# # Assuming an "admin" namespace
-
# # => /admin/users
-
#
-
# <%= url_for(action: 'index', controller: '/users') %>
-
# # Specify absolute path with beginning slash
-
# # => /users
-
1
def url_for(options = nil)
-
386
case options
-
when String
-
368
options
-
when nil
-
super(only_path: _generate_paths_by_default)
-
when Hash
-
options = options.symbolize_keys
-
unless options.key?(:only_path)
-
if options[:host].nil?
-
options[:only_path] = _generate_paths_by_default
-
else
-
options[:only_path] = false
-
end
-
end
-
-
super(options)
-
when :back
-
_back_url
-
when Array
-
components = options.dup
-
if _generate_paths_by_default
-
polymorphic_path(components, components.extract_options!)
-
else
-
polymorphic_url(components, components.extract_options!)
-
end
-
else
-
18
method = _generate_paths_by_default ? :path : :url
-
18
builder = ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder.send(method)
-
-
18
case options
-
when Symbol
-
builder.handle_string_call(self, options)
-
when Class
-
builder.handle_class_call(self, options)
-
else
-
18
builder.handle_model_call(self, options)
-
end
-
end
-
end
-
-
1
def url_options #:nodoc:
-
316
return super unless controller.respond_to?(:url_options)
-
316
controller.url_options
-
end
-
-
1
def _routes_context #:nodoc:
-
19
controller
-
end
-
1
protected :_routes_context
-
-
1
def optimize_routes_generation? #:nodoc:
-
173
controller.respond_to?(:optimize_routes_generation?, true) ?
-
controller.optimize_routes_generation? : super
-
end
-
1
protected :optimize_routes_generation?
-
end
-
end
-
1
module ActionView #:nodoc:
-
# = Action View Text Template
-
1
class Template
-
1
class Text #:nodoc:
-
1
attr_accessor :type
-
-
1
def initialize(string, type = nil)
-
1
@string = string.to_s
-
1
@type = Types[type] || type if type
-
1
@type ||= Types[:text]
-
end
-
-
1
def identifier
-
1
'text template'
-
end
-
-
1
def inspect
-
'text template'
-
end
-
-
1
def to_str
-
1
@string
-
end
-
-
1
def render(*args)
-
1
to_str
-
end
-
-
1
def formats
-
1
[@type.respond_to?(:ref) ? @type.ref : @type.to_s]
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/module/remove_method'
-
1
require 'action_controller'
-
1
require 'action_controller/test_case'
-
1
require 'action_view'
-
-
1
require 'rails-dom-testing'
-
-
1
module ActionView
-
# = Action View Test Case
-
1
class TestCase < ActiveSupport::TestCase
-
1
class TestController < ActionController::Base
-
1
include ActionDispatch::TestProcess
-
-
1
attr_accessor :request, :response, :params
-
-
1
class << self
-
1
attr_writer :controller_path
-
end
-
-
1
def controller_path=(path)
-
self.class.controller_path=(path)
-
end
-
-
1
def initialize
-
super
-
self.class.controller_path = ""
-
@request = ActionController::TestRequest.new
-
@response = ActionController::TestResponse.new
-
-
@request.env.delete('PATH_INFO')
-
@params = {}
-
end
-
end
-
-
1
module Behavior
-
1
extend ActiveSupport::Concern
-
-
1
include ActionDispatch::Assertions, ActionDispatch::TestProcess
-
1
include Rails::Dom::Testing::Assertions
-
1
include ActionController::TemplateAssertions
-
1
include ActionView::Context
-
-
1
include ActionDispatch::Routing::PolymorphicRoutes
-
-
1
include AbstractController::Helpers
-
1
include ActionView::Helpers
-
1
include ActionView::RecordIdentifier
-
1
include ActionView::RoutingUrlFor
-
-
1
include ActiveSupport::Testing::ConstantLookup
-
-
1
delegate :lookup_context, :to => :controller
-
1
attr_accessor :controller, :output_buffer, :rendered
-
-
1
module ClassMethods
-
1
def tests(helper_class)
-
case helper_class
-
when String, Symbol
-
self.helper_class = "#{helper_class.to_s.underscore}_helper".camelize.safe_constantize
-
when Module
-
self.helper_class = helper_class
-
end
-
end
-
-
1
def determine_default_helper_class(name)
-
determine_constant_from_test_name(name) do |constant|
-
Module === constant && !(Class === constant)
-
end
-
end
-
-
1
def helper_method(*methods)
-
# Almost a duplicate from ActionController::Helpers
-
methods.flatten.each do |method|
-
_helpers.module_eval <<-end_eval
-
def #{method}(*args, &block) # def current_user(*args, &block)
-
_test_case.send(%(#{method}), *args, &block) # _test_case.send(%(current_user), *args, &block)
-
end # end
-
end_eval
-
end
-
end
-
-
1
attr_writer :helper_class
-
-
1
def helper_class
-
@helper_class ||= determine_default_helper_class(name)
-
end
-
-
1
def new(*)
-
include_helper_modules!
-
super
-
end
-
-
1
private
-
-
1
def include_helper_modules!
-
helper(helper_class) if helper_class
-
include _helpers
-
end
-
-
end
-
-
1
def setup_with_controller
-
@controller = ActionView::TestCase::TestController.new
-
@request = @controller.request
-
# empty string ensures buffer has UTF-8 encoding as
-
# new without arguments returns ASCII-8BIT encoded buffer like String#new
-
@output_buffer = ActiveSupport::SafeBuffer.new ''
-
@rendered = ''
-
-
make_test_case_available_to_view!
-
say_no_to_protect_against_forgery!
-
end
-
-
1
def config
-
@controller.config if @controller.respond_to?(:config)
-
end
-
-
1
def render(options = {}, local_assigns = {}, &block)
-
view.assign(view_assigns)
-
@rendered << output = view.render(options, local_assigns, &block)
-
output
-
end
-
-
1
def rendered_views
-
@_rendered_views ||= RenderedViewsCollection.new
-
end
-
-
# Need to experiment if this priority is the best one: rendered => output_buffer
-
1
class RenderedViewsCollection
-
1
def initialize
-
@rendered_views ||= Hash.new { |hash, key| hash[key] = [] }
-
end
-
-
1
def add(view, locals)
-
@rendered_views[view] ||= []
-
@rendered_views[view] << locals
-
end
-
-
1
def locals_for(view)
-
@rendered_views[view]
-
end
-
-
1
def rendered_views
-
@rendered_views.keys
-
end
-
-
1
def view_rendered?(view, expected_locals)
-
locals_for(view).any? do |actual_locals|
-
expected_locals.all? {|key, value| value == actual_locals[key] }
-
end
-
end
-
end
-
-
1
included do
-
1
setup :setup_with_controller
-
end
-
-
1
private
-
-
# Need to experiment if this priority is the best one: rendered => output_buffer
-
1
def document_root_element
-
Nokogiri::HTML::Document.parse(@rendered.blank? ? @output_buffer : @rendered).root
-
end
-
-
1
def say_no_to_protect_against_forgery!
-
_helpers.module_eval do
-
remove_possible_method :protect_against_forgery?
-
def protect_against_forgery?
-
false
-
end
-
end
-
end
-
-
1
def make_test_case_available_to_view!
-
test_case_instance = self
-
_helpers.module_eval do
-
unless private_method_defined?(:_test_case)
-
define_method(:_test_case) { test_case_instance }
-
private :_test_case
-
end
-
end
-
end
-
-
1
module Locals
-
1
attr_accessor :rendered_views
-
-
1
def render(options = {}, local_assigns = {})
-
case options
-
when Hash
-
if block_given?
-
rendered_views.add options[:layout], options[:locals]
-
elsif options.key?(:partial)
-
rendered_views.add options[:partial], options[:locals]
-
end
-
else
-
rendered_views.add options, local_assigns
-
end
-
-
super
-
end
-
end
-
-
# The instance of ActionView::Base that is used by +render+.
-
1
def view
-
@view ||= begin
-
view = @controller.view_context
-
view.singleton_class.send :include, _helpers
-
view.extend(Locals)
-
view.rendered_views = self.rendered_views
-
view.output_buffer = self.output_buffer
-
view
-
end
-
end
-
-
1
alias_method :_view, :view
-
-
1
INTERNAL_IVARS = [
-
:@NAME,
-
:@failures,
-
:@assertions,
-
:@__io__,
-
:@_assertion_wrapped,
-
:@_assertions,
-
:@_result,
-
:@_routes,
-
:@controller,
-
:@_layouts,
-
:@_files,
-
:@_rendered_views,
-
:@method_name,
-
:@output_buffer,
-
:@_partials,
-
:@passed,
-
:@rendered,
-
:@request,
-
:@routes,
-
:@tagged_logger,
-
:@_templates,
-
:@options,
-
:@test_passed,
-
:@view,
-
:@view_context_class,
-
:@_subscribers,
-
:@html_document,
-
:@html_scanner_document
-
]
-
-
1
def _user_defined_ivars
-
instance_variables - INTERNAL_IVARS
-
end
-
-
# Returns a Hash of instance variables and their values, as defined by
-
# the user in the test case, which are then assigned to the view being
-
# rendered. This is generally intended for internal use and extension
-
# frameworks.
-
1
def view_assigns
-
Hash[_user_defined_ivars.map do |ivar|
-
[ivar[1..-1].to_sym, instance_variable_get(ivar)]
-
end]
-
end
-
-
1
def _routes
-
@controller._routes if @controller.respond_to?(:_routes)
-
end
-
-
1
def method_missing(selector, *args)
-
if @controller.respond_to?(:_routes) &&
-
( @controller._routes.named_routes.route_defined?(selector) ||
-
@controller._routes.mounted_helpers.method_defined?(selector) )
-
@controller.__send__(selector, *args)
-
else
-
super
-
end
-
end
-
end
-
-
1
include Behavior
-
end
-
end
-
1
require 'active_support/test_case'
-
-
1
module ActiveJob
-
1
class TestCase < ActiveSupport::TestCase
-
1
include ActiveJob::TestHelper
-
end
-
end
-
1
require 'active_support/core_ext/hash/keys'
-
-
1
module ActiveJob
-
# Provides helper methods for testing Active Job
-
1
module TestHelper
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
def before_setup
-
@old_queue_adapter = queue_adapter
-
ActiveJob::Base.queue_adapter = :test
-
clear_enqueued_jobs
-
clear_performed_jobs
-
super
-
end
-
-
1
def after_teardown
-
super
-
ActiveJob::Base.queue_adapter = @old_queue_adapter
-
end
-
-
# Asserts that the number of enqueued jobs matches the given number.
-
#
-
# def test_jobs
-
# assert_enqueued_jobs 0
-
# HelloJob.perform_later('david')
-
# assert_enqueued_jobs 1
-
# HelloJob.perform_later('abdelkader')
-
# assert_enqueued_jobs 2
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# jobs to be enqueued.
-
#
-
# def test_jobs_again
-
# assert_enqueued_jobs 1 do
-
# HelloJob.perform_later('cristian')
-
# end
-
#
-
# assert_enqueued_jobs 2 do
-
# HelloJob.perform_later('aaron')
-
# HelloJob.perform_later('rafael')
-
# end
-
# end
-
1
def assert_enqueued_jobs(number)
-
if block_given?
-
original_count = enqueued_jobs.size
-
yield
-
new_count = enqueued_jobs.size
-
assert_equal number, new_count - original_count,
-
"#{number} jobs expected, but #{new_count - original_count} were enqueued"
-
else
-
enqueued_jobs_size = enqueued_jobs.size
-
assert_equal number, enqueued_jobs_size, "#{number} jobs expected, but #{enqueued_jobs_size} were enqueued"
-
end
-
end
-
-
# Asserts that no jobs have been enqueued.
-
#
-
# def test_jobs
-
# assert_no_enqueued_jobs
-
# HelloJob.perform_later('jeremy')
-
# assert_enqueued_jobs 1
-
# end
-
#
-
# If a block is passed, that block should not cause any job to be enqueued.
-
#
-
# def test_jobs_again
-
# assert_no_enqueued_jobs do
-
# # No job should be enqueued from this block
-
# end
-
# end
-
#
-
# Note: This assertion is simply a shortcut for:
-
#
-
# assert_enqueued_jobs 0, &block
-
1
def assert_no_enqueued_jobs(&block)
-
assert_enqueued_jobs 0, &block
-
end
-
-
# Asserts that the number of performed jobs matches the given number.
-
# If no block is passed, <tt>perform_enqueued_jobs</tt>
-
# must be called around the job call.
-
#
-
# def test_jobs
-
# assert_performed_jobs 0
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('xavier')
-
# end
-
# assert_performed_jobs 1
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('yves')
-
# assert_performed_jobs 2
-
# end
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# jobs to be performed.
-
#
-
# def test_jobs_again
-
# assert_performed_jobs 1 do
-
# HelloJob.perform_later('robin')
-
# end
-
#
-
# assert_performed_jobs 2 do
-
# HelloJob.perform_later('carlos')
-
# HelloJob.perform_later('sean')
-
# end
-
# end
-
1
def assert_performed_jobs(number)
-
if block_given?
-
original_count = performed_jobs.size
-
perform_enqueued_jobs { yield }
-
new_count = performed_jobs.size
-
assert_equal number, new_count - original_count,
-
"#{number} jobs expected, but #{new_count - original_count} were performed"
-
else
-
performed_jobs_size = performed_jobs.size
-
assert_equal number, performed_jobs_size, "#{number} jobs expected, but #{performed_jobs_size} were performed"
-
end
-
end
-
-
# Asserts that no jobs have been performed.
-
#
-
# def test_jobs
-
# assert_no_performed_jobs
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('matthew')
-
# assert_performed_jobs 1
-
# end
-
# end
-
#
-
# If a block is passed, that block should not cause any job to be performed.
-
#
-
# def test_jobs_again
-
# assert_no_performed_jobs do
-
# # No job should be performed from this block
-
# end
-
# end
-
#
-
# Note: This assertion is simply a shortcut for:
-
#
-
# assert_performed_jobs 0, &block
-
1
def assert_no_performed_jobs(&block)
-
assert_performed_jobs 0, &block
-
end
-
-
# Asserts that the job passed in the block has been enqueued with the given arguments.
-
#
-
# def test_assert_enqueued_with
-
# assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low') do
-
# MyJob.perform_later(1,2,3)
-
# end
-
# end
-
1
def assert_enqueued_with(args = {}, &_block)
-
original_enqueued_jobs = enqueued_jobs.dup
-
clear_enqueued_jobs
-
args.assert_valid_keys(:job, :args, :at, :queue)
-
serialized_args = serialize_args_for_assertion(args)
-
yield
-
matching_job = enqueued_jobs.any? do |job|
-
serialized_args.all? { |key, value| value == job[key] }
-
end
-
assert matching_job, "No enqueued job found with #{args}"
-
ensure
-
queue_adapter.enqueued_jobs = original_enqueued_jobs + enqueued_jobs
-
end
-
-
# Asserts that the job passed in the block has been performed with the given arguments.
-
#
-
# def test_assert_performed_with
-
# assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high') do
-
# MyJob.perform_later(1,2,3)
-
# end
-
# end
-
1
def assert_performed_with(args = {}, &_block)
-
original_performed_jobs = performed_jobs.dup
-
clear_performed_jobs
-
args.assert_valid_keys(:job, :args, :at, :queue)
-
serialized_args = serialize_args_for_assertion(args)
-
perform_enqueued_jobs { yield }
-
matching_job = performed_jobs.any? do |job|
-
serialized_args.all? { |key, value| value == job[key] }
-
end
-
assert matching_job, "No performed job found with #{args}"
-
ensure
-
queue_adapter.performed_jobs = original_performed_jobs + performed_jobs
-
end
-
-
1
def perform_enqueued_jobs
-
@old_perform_enqueued_jobs = queue_adapter.perform_enqueued_jobs
-
@old_perform_enqueued_at_jobs = queue_adapter.perform_enqueued_at_jobs
-
queue_adapter.perform_enqueued_jobs = true
-
queue_adapter.perform_enqueued_at_jobs = true
-
yield
-
ensure
-
queue_adapter.perform_enqueued_jobs = @old_perform_enqueued_jobs
-
queue_adapter.perform_enqueued_at_jobs = @old_perform_enqueued_at_jobs
-
end
-
-
1
def queue_adapter
-
ActiveJob::Base.queue_adapter
-
end
-
-
1
delegate :enqueued_jobs, :enqueued_jobs=,
-
:performed_jobs, :performed_jobs=,
-
to: :queue_adapter
-
-
1
private
-
1
def clear_enqueued_jobs
-
enqueued_jobs.clear
-
end
-
-
1
def clear_performed_jobs
-
performed_jobs.clear
-
end
-
-
1
def serialize_args_for_assertion(args)
-
serialized_args = args.dup
-
if job_args = serialized_args.delete(:args)
-
serialized_args[:args] = ActiveJob::Arguments.serialize(job_args)
-
end
-
serialized_args
-
end
-
end
-
end
-
end
-
# -*- coding: utf-8 -*-
-
-
1
require 'active_support/core_ext/array/conversions'
-
1
require 'active_support/core_ext/string/inflections'
-
-
1
module ActiveModel
-
# == Active \Model \Errors
-
#
-
# Provides a modified +Hash+ that you can include in your object
-
# for handling error messages and interacting with Action View helpers.
-
#
-
# A minimal implementation could be:
-
#
-
# class Person
-
# # Required dependency for ActiveModel::Errors
-
# extend ActiveModel::Naming
-
#
-
# def initialize
-
# @errors = ActiveModel::Errors.new(self)
-
# end
-
#
-
# attr_accessor :name
-
# attr_reader :errors
-
#
-
# def validate!
-
# errors.add(:name, "cannot be nil") if name.nil?
-
# end
-
#
-
# # The following methods are needed to be minimally implemented
-
#
-
# def read_attribute_for_validation(attr)
-
# send(attr)
-
# end
-
#
-
# def Person.human_attribute_name(attr, options = {})
-
# attr
-
# end
-
#
-
# def Person.lookup_ancestors
-
# [self]
-
# end
-
# end
-
#
-
# The last three methods are required in your object for Errors to be
-
# able to generate error messages correctly and also handle multiple
-
# languages. Of course, if you extend your object with ActiveModel::Translation
-
# you will not need to implement the last two. Likewise, using
-
# ActiveModel::Validations will handle the validation related methods
-
# for you.
-
#
-
# The above allows you to do:
-
#
-
# person = Person.new
-
# person.validate! # => ["cannot be nil"]
-
# person.errors.full_messages # => ["name cannot be nil"]
-
# # etc..
-
1
class Errors
-
1
include Enumerable
-
-
1
CALLBACKS_OPTIONS = [:if, :unless, :on, :allow_nil, :allow_blank, :strict]
-
-
1
attr_reader :messages
-
-
# Pass in the instance of the object that is using the errors object.
-
#
-
# class Person
-
# def initialize
-
# @errors = ActiveModel::Errors.new(self)
-
# end
-
# end
-
1
def initialize(base)
-
267
@base = base
-
267
@messages = {}
-
end
-
-
1
def initialize_dup(other) # :nodoc:
-
@messages = other.messages.dup
-
super
-
end
-
-
# Clear the error messages.
-
#
-
# person.errors.full_messages # => ["name cannot be nil"]
-
# person.errors.clear
-
# person.errors.full_messages # => []
-
1
def clear
-
333
messages.clear
-
end
-
-
# Returns +true+ if the error messages include an error for the given key
-
# +attribute+, +false+ otherwise.
-
#
-
# person.errors.messages # => {:name=>["cannot be nil"]}
-
# person.errors.include?(:name) # => true
-
# person.errors.include?(:age) # => false
-
1
def include?(attribute)
-
messages[attribute].present?
-
end
-
# aliases include?
-
1
alias :has_key? :include?
-
# aliases include?
-
1
alias :key? :include?
-
-
# Get messages for +key+.
-
#
-
# person.errors.messages # => {:name=>["cannot be nil"]}
-
# person.errors.get(:name) # => ["cannot be nil"]
-
# person.errors.get(:age) # => nil
-
1
def get(key)
-
480
messages[key]
-
end
-
-
# Set messages for +key+ to +value+.
-
#
-
# person.errors.get(:name) # => ["cannot be nil"]
-
# person.errors.set(:name, ["can't be nil"])
-
# person.errors.get(:name) # => ["can't be nil"]
-
1
def set(key, value)
-
211
messages[key] = value
-
end
-
-
# Delete messages for +key+. Returns the deleted messages.
-
#
-
# person.errors.get(:name) # => ["cannot be nil"]
-
# person.errors.delete(:name) # => ["cannot be nil"]
-
# person.errors.get(:name) # => nil
-
1
def delete(key)
-
messages.delete(key)
-
end
-
-
# When passed a symbol or a name of a method, returns an array of errors
-
# for the method.
-
#
-
# person.errors[:name] # => ["cannot be nil"]
-
# person.errors['name'] # => ["cannot be nil"]
-
1
def [](attribute)
-
480
get(attribute.to_sym) || set(attribute.to_sym, [])
-
end
-
-
# Adds to the supplied attribute the supplied error message.
-
#
-
# person.errors[:name] = "must be set"
-
# person.errors[:name] # => ['must be set']
-
1
def []=(attribute, error)
-
self[attribute] << error
-
end
-
-
# Iterates through each error key, value pair in the error messages hash.
-
# Yields the attribute and the error for that attribute. If the attribute
-
# has more than one error message, yields once for each error message.
-
#
-
# person.errors.add(:name, "can't be blank")
-
# person.errors.each do |attribute, error|
-
# # Will yield :name and "can't be blank"
-
# end
-
#
-
# person.errors.add(:name, "must be specified")
-
# person.errors.each do |attribute, error|
-
# # Will yield :name and "can't be blank"
-
# # then yield :name and "must be specified"
-
# end
-
1
def each
-
692
messages.each_key do |attribute|
-
400
self[attribute].each { |error| yield attribute, error }
-
end
-
end
-
-
# Returns the number of error messages.
-
#
-
# person.errors.add(:name, "can't be blank")
-
# person.errors.size # => 1
-
# person.errors.add(:name, "must be specified")
-
# person.errors.size # => 2
-
1
def size
-
values.flatten.size
-
end
-
-
# Returns all message values.
-
#
-
# person.errors.messages # => {:name=>["cannot be nil", "must be specified"]}
-
# person.errors.values # => [["cannot be nil", "must be specified"]]
-
1
def values
-
messages.values
-
end
-
-
# Returns all message keys.
-
#
-
# person.errors.messages # => {:name=>["cannot be nil", "must be specified"]}
-
# person.errors.keys # => [:name]
-
1
def keys
-
messages.keys
-
end
-
-
# Returns an array of error messages, with the attribute name included.
-
#
-
# person.errors.add(:name, "can't be blank")
-
# person.errors.add(:name, "must be specified")
-
# person.errors.to_a # => ["name can't be blank", "name must be specified"]
-
1
def to_a
-
full_messages
-
end
-
-
# Returns the number of error messages.
-
#
-
# person.errors.add(:name, "can't be blank")
-
# person.errors.count # => 1
-
# person.errors.add(:name, "must be specified")
-
# person.errors.count # => 2
-
1
def count
-
to_a.size
-
end
-
-
# Returns +true+ if no errors are found, +false+ otherwise.
-
# If the error message is a string it can be empty.
-
#
-
# person.errors.full_messages # => ["name cannot be nil"]
-
# person.errors.empty? # => false
-
1
def empty?
-
864
all? { |k, v| v && v.empty? && !v.is_a?(String) }
-
end
-
# aliases empty?
-
1
alias_method :blank?, :empty?
-
-
# Returns an xml formatted representation of the Errors hash.
-
#
-
# person.errors.add(:name, "can't be blank")
-
# person.errors.add(:name, "must be specified")
-
# person.errors.to_xml
-
# # =>
-
# # <?xml version=\"1.0\" encoding=\"UTF-8\"?>
-
# # <errors>
-
# # <error>name can't be blank</error>
-
# # <error>name must be specified</error>
-
# # </errors>
-
1
def to_xml(options={})
-
to_a.to_xml({ root: "errors", skip_types: true }.merge!(options))
-
end
-
-
# Returns a Hash that can be used as the JSON representation for this
-
# object. You can pass the <tt>:full_messages</tt> option. This determines
-
# if the json object should contain full messages or not (false by default).
-
#
-
# person.errors.as_json # => {:name=>["cannot be nil"]}
-
# person.errors.as_json(full_messages: true) # => {:name=>["name cannot be nil"]}
-
1
def as_json(options=nil)
-
to_hash(options && options[:full_messages])
-
end
-
-
# Returns a Hash of attributes with their error messages. If +full_messages+
-
# is +true+, it will contain full messages (see +full_message+).
-
#
-
# person.errors.to_hash # => {:name=>["cannot be nil"]}
-
# person.errors.to_hash(true) # => {:name=>["name cannot be nil"]}
-
1
def to_hash(full_messages = false)
-
if full_messages
-
self.messages.each_with_object({}) do |(attribute, array), messages|
-
messages[attribute] = array.map { |message| full_message(attribute, message) }
-
end
-
else
-
self.messages.dup
-
end
-
end
-
-
# Adds +message+ to the error messages on +attribute+. More than one error
-
# can be added to the same +attribute+. If no +message+ is supplied,
-
# <tt>:invalid</tt> is assumed.
-
#
-
# person.errors.add(:name)
-
# # => ["is invalid"]
-
# person.errors.add(:name, 'must be implemented')
-
# # => ["is invalid", "must be implemented"]
-
#
-
# person.errors.messages
-
# # => {:name=>["must be implemented", "is invalid"]}
-
#
-
# If +message+ is a symbol, it will be translated using the appropriate
-
# scope (see +generate_message+).
-
#
-
# If +message+ is a proc, it will be called, allowing for things like
-
# <tt>Time.now</tt> to be used within an error.
-
#
-
# If the <tt>:strict</tt> option is set to +true+, it will raise
-
# ActiveModel::StrictValidationFailed instead of adding the error.
-
# <tt>:strict</tt> option can also be set to any other exception.
-
#
-
# person.errors.add(:name, nil, strict: true)
-
# # => ActiveModel::StrictValidationFailed: name is invalid
-
# person.errors.add(:name, nil, strict: NameIsInvalid)
-
# # => NameIsInvalid: name is invalid
-
#
-
# person.errors.messages # => {}
-
#
-
# +attribute+ should be set to <tt>:base</tt> if the error is not
-
# directly associated with a single attribute.
-
#
-
# person.errors.add(:base, "either name or email must be present")
-
# person.errors.messages
-
# # => {:base=>["either name or email must be present"]}
-
1
def add(attribute, message = :invalid, options = {})
-
204
message = normalize_message(attribute, message, options)
-
204
if exception = options[:strict]
-
exception = ActiveModel::StrictValidationFailed if exception == true
-
raise exception, full_message(attribute, message)
-
end
-
-
204
self[attribute] << message
-
end
-
-
# Will add an error message to each of the attributes in +attributes+
-
# that is empty.
-
#
-
# person.errors.add_on_empty(:name)
-
# person.errors.messages
-
# # => {:name=>["can't be empty"]}
-
1
def add_on_empty(attributes, options = {})
-
Array(attributes).each do |attribute|
-
value = @base.send(:read_attribute_for_validation, attribute)
-
is_empty = value.respond_to?(:empty?) ? value.empty? : false
-
add(attribute, :empty, options) if value.nil? || is_empty
-
end
-
end
-
-
# Will add an error message to each of the attributes in +attributes+ that
-
# is blank (using Object#blank?).
-
#
-
# person.errors.add_on_blank(:name)
-
# person.errors.messages
-
# # => {:name=>["can't be blank"]}
-
1
def add_on_blank(attributes, options = {})
-
Array(attributes).each do |attribute|
-
value = @base.send(:read_attribute_for_validation, attribute)
-
add(attribute, :blank, options) if value.blank?
-
end
-
end
-
-
# Returns +true+ if an error on the attribute with the given message is
-
# present, +false+ otherwise. +message+ is treated the same as for +add+.
-
#
-
# person.errors.add :name, :blank
-
# person.errors.added? :name, :blank # => true
-
1
def added?(attribute, message = :invalid, options = {})
-
message = normalize_message(attribute, message, options)
-
self[attribute].include? message
-
end
-
-
# Returns all the full error messages in an array.
-
#
-
# class Person
-
# validates_presence_of :name, :address, :email
-
# validates_length_of :name, in: 5..30
-
# end
-
#
-
# person = Person.create(address: '123 First St.')
-
# person.errors.full_messages
-
# # => ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Email can't be blank"]
-
1
def full_messages
-
28
map { |attribute, message| full_message(attribute, message) }
-
end
-
-
# Returns all the full error messages for a given attribute in an array.
-
#
-
# class Person
-
# validates_presence_of :name, :email
-
# validates_length_of :name, in: 5..30
-
# end
-
#
-
# person = Person.create()
-
# person.errors.full_messages_for(:name)
-
# # => ["Name is too short (minimum is 5 characters)", "Name can't be blank"]
-
1
def full_messages_for(attribute)
-
(get(attribute) || []).map { |message| full_message(attribute, message) }
-
end
-
-
# Returns a full message for a given attribute.
-
#
-
# person.errors.full_message(:name, 'is invalid') # => "Name is invalid"
-
1
def full_message(attribute, message)
-
return message if attribute == :base
-
attr_name = attribute.to_s.tr('.', '_').humanize
-
attr_name = @base.class.human_attribute_name(attribute, default: attr_name)
-
I18n.t(:"errors.format", {
-
default: "%{attribute} %{message}",
-
attribute: attr_name,
-
message: message
-
})
-
end
-
-
# Translates an error message in its default scope
-
# (<tt>activemodel.errors.messages</tt>).
-
#
-
# Error messages are first looked up in <tt>models.MODEL.attributes.ATTRIBUTE.MESSAGE</tt>,
-
# if it's not there, it's looked up in <tt>models.MODEL.MESSAGE</tt> and if
-
# that is not there also, it returns the translation of the default message
-
# (e.g. <tt>activemodel.errors.messages.MESSAGE</tt>). The translated model
-
# name, translated attribute name and the value are available for
-
# interpolation.
-
#
-
# When using inheritance in your models, it will check all the inherited
-
# models too, but only if the model itself hasn't been found. Say you have
-
# <tt>class Admin < User; end</tt> and you wanted the translation for
-
# the <tt>:blank</tt> error message for the <tt>title</tt> attribute,
-
# it looks for these translations:
-
#
-
# * <tt>activemodel.errors.models.admin.attributes.title.blank</tt>
-
# * <tt>activemodel.errors.models.admin.blank</tt>
-
# * <tt>activemodel.errors.models.user.attributes.title.blank</tt>
-
# * <tt>activemodel.errors.models.user.blank</tt>
-
# * any default you provided through the +options+ hash (in the <tt>activemodel.errors</tt> scope)
-
# * <tt>activemodel.errors.messages.blank</tt>
-
# * <tt>errors.attributes.title.blank</tt>
-
# * <tt>errors.messages.blank</tt>
-
1
def generate_message(attribute, type = :invalid, options = {})
-
183
type = options.delete(:message) if options[:message].is_a?(Symbol)
-
-
183
if @base.class.respond_to?(:i18n_scope)
-
183
defaults = @base.class.lookup_ancestors.map do |klass|
-
185
[ :"#{@base.class.i18n_scope}.errors.models.#{klass.model_name.i18n_key}.attributes.#{attribute}.#{type}",
-
:"#{@base.class.i18n_scope}.errors.models.#{klass.model_name.i18n_key}.#{type}" ]
-
end
-
else
-
defaults = []
-
end
-
-
183
defaults << options.delete(:message)
-
183
defaults << :"#{@base.class.i18n_scope}.errors.messages.#{type}" if @base.class.respond_to?(:i18n_scope)
-
183
defaults << :"errors.attributes.#{attribute}.#{type}"
-
183
defaults << :"errors.messages.#{type}"
-
-
183
defaults.compact!
-
183
defaults.flatten!
-
-
183
key = defaults.shift
-
183
value = (attribute != :base ? @base.send(:read_attribute_for_validation, attribute) : nil)
-
-
183
options = {
-
default: defaults,
-
model: @base.model_name.human,
-
attribute: @base.class.human_attribute_name(attribute),
-
value: value
-
}.merge!(options)
-
-
183
I18n.translate(key, options)
-
end
-
-
1
private
-
1
def normalize_message(attribute, message, options)
-
204
case message
-
when Symbol
-
183
generate_message(attribute, message, options.except(*CALLBACKS_OPTIONS))
-
when Proc
-
message.call
-
else
-
21
message
-
end
-
end
-
end
-
-
# Raised when a validation cannot be corrected by end users and are considered
-
# exceptional.
-
#
-
# class Person
-
# include ActiveModel::Validations
-
#
-
# attr_accessor :name
-
#
-
# validates_presence_of :name, strict: true
-
# end
-
#
-
# person = Person.new
-
# person.name = nil
-
# person.valid?
-
# # => ActiveModel::StrictValidationFailed: Name can't be blank
-
1
class StrictValidationFailed < StandardError
-
end
-
end
-
1
module ActiveModel
-
-
# == Active \Model \Basic \Model
-
#
-
# Includes the required interface for an object to interact with
-
# <tt>ActionPack</tt>, using different <tt>ActiveModel</tt> modules.
-
# It includes model name introspections, conversions, translations and
-
# validations. Besides that, it allows you to initialize the object with a
-
# hash of attributes, pretty much like <tt>ActiveRecord</tt> does.
-
#
-
# A minimal implementation could be:
-
#
-
# class Person
-
# include ActiveModel::Model
-
# attr_accessor :name, :age
-
# end
-
#
-
# person = Person.new(name: 'bob', age: '18')
-
# person.name # => "bob"
-
# person.age # => "18"
-
#
-
# Note that, by default, <tt>ActiveModel::Model</tt> implements <tt>persisted?</tt>
-
# to return +false+, which is the most common case. You may want to override
-
# it in your class to simulate a different scenario:
-
#
-
# class Person
-
# include ActiveModel::Model
-
# attr_accessor :id, :name
-
#
-
# def persisted?
-
# self.id == 1
-
# end
-
# end
-
#
-
# person = Person.new(id: 1, name: 'bob')
-
# person.persisted? # => true
-
#
-
# Also, if for some reason you need to run code on <tt>initialize</tt>, make
-
# sure you call +super+ if you want the attributes hash initialization to
-
# happen.
-
#
-
# class Person
-
# include ActiveModel::Model
-
# attr_accessor :id, :name, :omg
-
#
-
# def initialize(attributes={})
-
# super
-
# @omg ||= true
-
# end
-
# end
-
#
-
# person = Person.new(id: 1, name: 'bob')
-
# person.omg # => true
-
#
-
# For more detailed information on other functionalities available, please
-
# refer to the specific modules included in <tt>ActiveModel::Model</tt>
-
# (see below).
-
1
module Model
-
1
extend ActiveSupport::Concern
-
1
include ActiveModel::Validations
-
1
include ActiveModel::Conversion
-
-
1
included do
-
1
extend ActiveModel::Naming
-
1
extend ActiveModel::Translation
-
end
-
-
# Initializes a new model with the given +params+.
-
#
-
# class Person
-
# include ActiveModel::Model
-
# attr_accessor :name, :age
-
# end
-
#
-
# person = Person.new(name: 'bob', age: '18')
-
# person.name # => "bob"
-
# person.age # => "18"
-
1
def initialize(params={})
-
params.each do |attr, value|
-
self.public_send("#{attr}=", value)
-
end if params
-
-
super()
-
end
-
-
# Indicates if the model is persisted. Default is +false+.
-
#
-
# class Person
-
# include ActiveModel::Model
-
# attr_accessor :id, :name
-
# end
-
#
-
# person = Person.new(id: 1, name: 'bob')
-
# person.persisted? # => false
-
1
def persisted?
-
false
-
end
-
end
-
end
-
1
require 'active_support/core_ext/string/conversions'
-
-
1
module ActiveRecord
-
1
module Associations
-
# Keeps track of table aliases for ActiveRecord::Associations::ClassMethods::JoinDependency and
-
# ActiveRecord::Associations::ThroughAssociationScope
-
1
class AliasTracker # :nodoc:
-
1
attr_reader :aliases, :connection
-
-
1
def self.empty(connection)
-
1327
new connection, Hash.new(0)
-
end
-
-
1
def self.create(connection, table_joins)
-
924
if table_joins.empty?
-
890
empty connection
-
else
-
34
aliases = Hash.new { |h,k|
-
42
h[k] = initial_count_for(connection, k, table_joins)
-
}
-
34
new connection, aliases
-
end
-
end
-
-
1
def self.initial_count_for(connection, name, table_joins)
-
# quoted_name should be downcased as some database adapters (Oracle) return quoted name in uppercase
-
42
quoted_name = connection.quote_table_name(name).downcase
-
-
42
counts = table_joins.map do |join|
-
42
if join.is_a?(Arel::Nodes::StringJoin)
-
# Table names + table aliases
-
join.left.downcase.scan(
-
/join(?:\s+\w+)?\s+(\S+\s+)?#{quoted_name}\son/
-
).size
-
elsif join.respond_to? :left
-
42
join.left.table_name == name ? 1 : 0
-
else
-
# this branch is reached by two tests:
-
#
-
# activerecord/test/cases/associations/cascaded_eager_loading_test.rb:37
-
# with :posts
-
#
-
# activerecord/test/cases/associations/eager_test.rb:1133
-
# with :comments
-
#
-
0
-
end
-
end
-
-
42
counts.sum
-
end
-
-
# table_joins is an array of arel joins which might conflict with the aliases we assign here
-
1
def initialize(connection, aliases)
-
1361
@aliases = aliases
-
1361
@connection = connection
-
end
-
-
1
def aliased_table_for(table_name, aliased_name)
-
2071
if aliases[table_name].zero?
-
# If it's zero, we can have our table_name
-
2067
aliases[table_name] = 1
-
2067
Arel::Table.new(table_name)
-
else
-
# Otherwise, we need to use an alias
-
4
aliased_name = connection.table_alias_for(aliased_name)
-
-
# Update the count
-
4
aliases[aliased_name] += 1
-
-
4
table_alias = if aliases[aliased_name] > 1
-
"#{truncate(aliased_name)}_#{aliases[aliased_name]}"
-
else
-
4
aliased_name
-
end
-
4
Arel::Table.new(table_name).alias(table_alias)
-
end
-
end
-
-
1
private
-
-
1
def truncate(name)
-
name.slice(0, connection.table_alias_length - 2)
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/array/wrap'
-
-
1
module ActiveRecord
-
1
module Associations
-
# = Active Record Associations
-
#
-
# This is the root class of all associations ('+ Foo' signifies an included module Foo):
-
#
-
# Association
-
# SingularAssociation
-
# HasOneAssociation
-
# HasOneThroughAssociation + ThroughAssociation
-
# BelongsToAssociation
-
# BelongsToPolymorphicAssociation
-
# CollectionAssociation
-
# HasManyAssociation
-
# HasManyThroughAssociation + ThroughAssociation
-
1
class Association #:nodoc:
-
1
attr_reader :owner, :target, :reflection
-
1
attr_accessor :inversed
-
-
1
delegate :options, :to => :reflection
-
-
1
def initialize(owner, reflection)
-
831
reflection.check_validity!
-
-
831
@owner, @reflection = owner, reflection
-
-
831
reset
-
831
reset_scope
-
end
-
-
# Returns the name of the table of the associated class:
-
#
-
# post.comments.aliased_table_name # => "comments"
-
#
-
1
def aliased_table_name
-
klass.table_name
-
end
-
-
# Resets the \loaded flag to +false+ and sets the \target to +nil+.
-
1
def reset
-
1109
@loaded = false
-
1109
@target = nil
-
1109
@stale_state = nil
-
1109
@inversed = false
-
end
-
-
# Reloads the \target and returns +self+ on success.
-
1
def reload
-
275
reset
-
275
reset_scope
-
275
load_target
-
275
self unless target.nil?
-
end
-
-
# Has the \target been already \loaded?
-
1
def loaded?
-
4021
@loaded
-
end
-
-
# Asserts the \target has been loaded setting the \loaded flag to +true+.
-
1
def loaded!
-
981
@loaded = true
-
981
@stale_state = stale_state
-
981
@inversed = false
-
end
-
-
# The target is stale if the target no longer points to the record(s) that the
-
# relevant foreign_key(s) refers to. If stale, the association accessor method
-
# on the owner will reload the target. It's up to subclasses to implement the
-
# stale_state method if relevant.
-
#
-
# Note that if the target has not been loaded, it is not considered stale.
-
1
def stale_target?
-
1571
!inversed && loaded? && @stale_state != stale_state
-
end
-
-
# Sets the target of this association to <tt>\target</tt>, and the \loaded flag to +true+.
-
1
def target=(target)
-
545
@target = target
-
545
loaded!
-
end
-
-
1
def scope
-
801
target_scope.merge(association_scope)
-
end
-
-
# The scope for this association.
-
#
-
# Note that the association_scope is merged into the target_scope only when the
-
# scope method is called. This is because at that point the call may be surrounded
-
# by scope.scoping { ... } or with_scope { ... } etc, which affects the scope which
-
# actually gets built.
-
1
def association_scope
-
849
if klass
-
849
@association_scope ||= AssociationScope.scope(self, klass.connection)
-
end
-
end
-
-
1
def reset_scope
-
1118
@association_scope = nil
-
end
-
-
# Set the inverse association, if possible
-
1
def set_inverse_instance(record)
-
848
if invertible_for?(record)
-
265
inverse = record.association(inverse_reflection_for(record).name)
-
265
inverse.target = owner
-
265
inverse.inversed = true
-
end
-
848
record
-
end
-
-
# Returns the class of the target. belongs_to polymorphic overrides this to look at the
-
# polymorphic_type field on the owner.
-
1
def klass
-
5852
reflection.klass
-
end
-
-
# Can be overridden (i.e. in ThroughAssociation) to merge in other scopes (i.e. the
-
# through association's scope)
-
1
def target_scope
-
820
AssociationRelation.create(klass, klass.arel_table, self).merge!(klass.all)
-
end
-
-
# Loads the \target if needed and returns it.
-
#
-
# This method is abstract in the sense that it relies on +find_target+,
-
# which is expected to be provided by descendants.
-
#
-
# If the \target is already \loaded it is just returned. Thus, you can call
-
# +load_target+ unconditionally to get the \target.
-
#
-
# ActiveRecord::RecordNotFound is rescued within the method, and it is
-
# not reraised. The proxy is \reset and +nil+ is the return value.
-
1
def load_target
-
514
@target = find_target if (@stale_state && stale_target?) || find_target?
-
-
514
loaded! unless loaded?
-
514
target
-
rescue ActiveRecord::RecordNotFound
-
reset
-
end
-
-
1
def interpolate(sql, record = nil)
-
if sql.respond_to?(:to_proc)
-
owner.instance_exec(record, &sql)
-
else
-
sql
-
end
-
end
-
-
# We can't dump @reflection since it contains the scope proc
-
1
def marshal_dump
-
ivars = (instance_variables - [:@reflection]).map { |name| [name, instance_variable_get(name)] }
-
[@reflection.name, ivars]
-
end
-
-
1
def marshal_load(data)
-
reflection_name, ivars = data
-
ivars.each { |name, val| instance_variable_set(name, val) }
-
@reflection = @owner.class._reflect_on_association(reflection_name)
-
end
-
-
1
def initialize_attributes(record) #:nodoc:
-
66
skip_assign = [reflection.foreign_key, reflection.type].compact
-
66
attributes = create_scope.except(*(record.changed - skip_assign))
-
66
record.assign_attributes(attributes)
-
66
set_inverse_instance(record)
-
end
-
-
1
private
-
-
1
def find_target?
-
149
!loaded? && (!owner.new_record? || foreign_key_present?) && klass
-
end
-
-
1
def creation_attributes
-
46
attributes = {}
-
-
46
if (reflection.has_one? || reflection.collection?) && !options[:through]
-
46
attributes[reflection.foreign_key] = owner[reflection.active_record_primary_key]
-
-
46
if reflection.options[:as]
-
18
attributes[reflection.type] = owner.class.base_class.name
-
end
-
end
-
-
46
attributes
-
end
-
-
# Sets the owner attributes on the given record
-
1
def set_owner_attributes(record)
-
110
creation_attributes.each { |key, value| record[key] = value }
-
end
-
-
# Returns true if there is a foreign key present on the owner which
-
# references the target. This is used to determine whether we can load
-
# the target if the owner is currently a new record (and therefore
-
# without a key). If the owner is a new record then foreign_key must
-
# be present in order to load target.
-
#
-
# Currently implemented by belongs_to (vanilla and polymorphic) and
-
# has_one/has_many :through associations which go through a belongs_to.
-
1
def foreign_key_present?
-
false
-
end
-
-
# Raises ActiveRecord::AssociationTypeMismatch unless +record+ is of
-
# the kind of the class of the associated objects. Meant to be used as
-
# a sanity check when you are about to assign an associated record.
-
1
def raise_on_type_mismatch!(record)
-
175
unless record.is_a?(reflection.klass)
-
fresh_class = reflection.class_name.safe_constantize
-
unless fresh_class && record.is_a?(fresh_class)
-
message = "#{reflection.class_name}(##{reflection.klass.object_id}) expected, got #{record.class}(##{record.class.object_id})"
-
raise ActiveRecord::AssociationTypeMismatch, message
-
end
-
end
-
end
-
-
# Can be redefined by subclasses, notably polymorphic belongs_to
-
# The record parameter is necessary to support polymorphic inverses as we must check for
-
# the association in the specific class of the record.
-
1
def inverse_reflection_for(record)
-
1074
reflection.inverse_of
-
end
-
-
# Returns true if inverse association on the given record needs to be set.
-
# This method is redefined by subclasses.
-
1
def invertible_for?(record)
-
289
foreign_key_for?(record) && inverse_reflection_for(record)
-
end
-
-
# Returns true if record contains the foreign_key
-
1
def foreign_key_for?(record)
-
289
record.has_attribute?(reflection.foreign_key)
-
end
-
-
# This should be implemented to return the values of the relevant key(s) on the owner,
-
# so that when stale_state is different from the value stored on the last find_target,
-
# the target is stale.
-
#
-
# This is only relevant to certain associations, which is why it returns nil by default.
-
1
def stale_state
-
end
-
-
1
def build_record(attributes)
-
66
reflection.build_association(attributes) do |record|
-
66
initialize_attributes(record)
-
end
-
end
-
-
# Returns true if statement cache should be skipped on the association reader.
-
1
def skip_statement_cache?
-
reflection.scope_chain.any?(&:any?) ||
-
329
scope.eager_loading? ||
-
klass.current_scope ||
-
klass.default_scopes.any? ||
-
reflection.source_reflection.active_record.default_scopes.any?
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class AssociationScope #:nodoc:
-
1
def self.scope(association, connection)
-
418
INSTANCE.scope association, connection
-
end
-
-
1
class BindSubstitution
-
1
def initialize(block)
-
20
@block = block
-
end
-
-
1
def bind_value(scope, column, value, alias_tracker)
-
457
substitute = alias_tracker.connection.substitute_at(column)
-
457
scope.bind_values += [[column, @block.call(value)]]
-
457
substitute
-
end
-
end
-
-
1
def self.create(&block)
-
458
block = block ? block : lambda { |val| val }
-
20
new BindSubstitution.new(block)
-
end
-
-
1
def initialize(bind_substitution)
-
20
@bind_substitution = bind_substitution
-
end
-
-
1
INSTANCE = create
-
-
1
def scope(association, connection)
-
437
klass = association.klass
-
437
reflection = association.reflection
-
437
scope = klass.unscoped
-
437
owner = association.owner
-
437
alias_tracker = AliasTracker.empty connection
-
-
437
scope.extending! Array(reflection.options[:extend])
-
437
add_constraints(scope, owner, klass, reflection, alias_tracker)
-
end
-
-
1
def join_type
-
22
Arel::Nodes::InnerJoin
-
end
-
-
1
def self.get_bind_values(owner, chain)
-
182
binds = []
-
182
last_reflection = chain.last
-
-
182
binds << last_reflection.join_id_for(owner)
-
182
if last_reflection.type
-
binds << owner.class.base_class.name
-
end
-
-
182
chain.each_cons(2).each do |reflection, next_reflection|
-
6
if reflection.type
-
binds << next_reflection.klass.base_class.name
-
end
-
end
-
182
binds
-
end
-
-
1
private
-
-
1
def construct_tables(chain, klass, refl, alias_tracker)
-
437
chain.map do |reflection|
-
459
alias_tracker.aliased_table_for(
-
table_name_for(reflection, klass, refl),
-
table_alias_for(reflection, refl, reflection != refl)
-
)
-
end
-
end
-
-
1
def table_alias_for(reflection, refl, join = false)
-
459
name = "#{reflection.plural_name}_#{alias_suffix(refl)}"
-
459
name << "_join" if join
-
459
name
-
end
-
-
1
def join(table, constraint)
-
22
table.create_join(table, table.create_on(constraint), join_type)
-
end
-
-
1
def column_for(table_name, column_name, alias_tracker)
-
457
columns = alias_tracker.connection.schema_cache.columns_hash(table_name)
-
457
columns[column_name]
-
end
-
-
1
def bind_value(scope, column, value, alias_tracker)
-
457
@bind_substitution.bind_value scope, column, value, alias_tracker
-
end
-
-
1
def bind(scope, table_name, column_name, value, tracker)
-
457
column = column_for table_name, column_name, tracker
-
457
bind_value scope, column, value, tracker
-
end
-
-
1
def last_chain_scope(scope, table, reflection, owner, tracker, assoc_klass)
-
437
join_keys = reflection.join_keys(assoc_klass)
-
437
key = join_keys.key
-
437
foreign_key = join_keys.foreign_key
-
-
437
bind_val = bind scope, table.table_name, key.to_s, owner[foreign_key], tracker
-
437
scope = scope.where(table[key].eq(bind_val))
-
-
437
if reflection.type
-
20
value = owner.class.base_class.name
-
20
bind_val = bind scope, table.table_name, reflection.type, value, tracker
-
20
scope = scope.where(table[reflection.type].eq(bind_val))
-
else
-
417
scope
-
end
-
end
-
-
1
def next_chain_scope(scope, table, reflection, tracker, assoc_klass, foreign_table, next_reflection)
-
22
join_keys = reflection.join_keys(assoc_klass)
-
22
key = join_keys.key
-
22
foreign_key = join_keys.foreign_key
-
-
22
constraint = table[key].eq(foreign_table[foreign_key])
-
-
22
if reflection.type
-
value = next_reflection.klass.base_class.name
-
bind_val = bind scope, table.table_name, reflection.type, value, tracker
-
scope = scope.where(table[reflection.type].eq(bind_val))
-
end
-
-
22
scope = scope.joins(join(foreign_table, constraint))
-
end
-
-
1
def add_constraints(scope, owner, assoc_klass, refl, tracker)
-
437
chain = refl.chain
-
437
scope_chain = refl.scope_chain
-
-
437
tables = construct_tables(chain, assoc_klass, refl, tracker)
-
-
437
owner_reflection = chain.last
-
437
table = tables.last
-
437
scope = last_chain_scope(scope, table, owner_reflection, owner, tracker, assoc_klass)
-
-
437
chain.each_with_index do |reflection, i|
-
459
table, foreign_table = tables.shift, tables.first
-
-
459
unless reflection == chain.last
-
22
next_reflection = chain[i + 1]
-
22
scope = next_chain_scope(scope, table, reflection, tracker, assoc_klass, foreign_table, next_reflection)
-
end
-
-
459
is_first_chain = i == 0
-
459
klass = is_first_chain ? assoc_klass : reflection.klass
-
-
# Exclude the scope of the association itself, because that
-
# was already merged in the #scope method.
-
459
scope_chain[i].each do |scope_chain_item|
-
15
item = eval_scope(klass, scope_chain_item, owner)
-
-
15
if scope_chain_item == refl.scope
-
15
scope.merge! item.except(:where, :includes, :bind)
-
end
-
-
15
if is_first_chain
-
15
scope.includes! item.includes_values
-
end
-
-
15
scope.unscope!(*item.unscope_values)
-
15
scope.where_values += item.where_values
-
15
scope.bind_values += item.bind_values
-
15
scope.order_values |= item.order_values
-
end
-
end
-
-
437
scope
-
end
-
-
1
def alias_suffix(refl)
-
459
refl.name
-
end
-
-
1
def table_name_for(reflection, klass, refl)
-
459
if reflection == refl
-
# If this is a polymorphic belongs_to, we want to get the klass from the
-
# association because it depends on the polymorphic_type attribute of
-
# the owner
-
437
klass.table_name
-
else
-
22
reflection.table_name
-
end
-
end
-
-
1
def eval_scope(klass, scope, owner)
-
15
klass.unscoped.instance_exec(owner, &scope)
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
# = Active Record Belongs To Association
-
1
module Associations
-
1
class BelongsToAssociation < SingularAssociation #:nodoc:
-
-
1
def handle_dependency
-
target.send(options[:dependent]) if load_target
-
end
-
-
1
def replace(record)
-
140
if record
-
108
raise_on_type_mismatch!(record)
-
108
update_counters(record)
-
108
replace_keys(record)
-
108
set_inverse_instance(record)
-
108
@updated = true
-
else
-
32
decrement_counters
-
32
remove_keys
-
end
-
-
140
self.target = record
-
end
-
-
1
def reset
-
881
super
-
881
@updated = false
-
end
-
-
1
def updated?
-
192
@updated
-
end
-
-
1
def decrement_counters # :nodoc:
-
32
with_cache_name { |name| decrement_counter name }
-
end
-
-
1
def increment_counters # :nodoc:
-
with_cache_name { |name| increment_counter name }
-
end
-
-
1
private
-
-
1
def find_target?
-
448
!loaded? && foreign_key_present? && klass
-
end
-
-
1
def with_cache_name
-
140
counter_cache_name = reflection.counter_cache_column
-
140
return unless counter_cache_name && owner.persisted?
-
yield counter_cache_name
-
end
-
-
1
def update_counters(record)
-
108
with_cache_name do |name|
-
return unless different_target? record
-
record.class.increment_counter(name, record.id)
-
decrement_counter name
-
end
-
end
-
-
1
def decrement_counter(counter_cache_name)
-
if foreign_key_present?
-
klass.decrement_counter(counter_cache_name, target_id)
-
end
-
end
-
-
1
def increment_counter(counter_cache_name)
-
if foreign_key_present?
-
klass.increment_counter(counter_cache_name, target_id)
-
if target && !stale_target? && counter_cache_available_in_memory?(counter_cache_name)
-
target.increment(counter_cache_name)
-
end
-
end
-
end
-
-
# Checks whether record is different to the current target, without loading it
-
1
def different_target?(record)
-
record.id != owner._read_attribute(reflection.foreign_key)
-
end
-
-
1
def replace_keys(record)
-
108
owner[reflection.foreign_key] = record._read_attribute(reflection.association_primary_key(record.class))
-
end
-
-
1
def remove_keys
-
32
owner[reflection.foreign_key] = nil
-
end
-
-
1
def foreign_key_present?
-
249
owner._read_attribute(reflection.foreign_key)
-
end
-
-
# NOTE - for now, we're only supporting inverse setting from belongs_to back onto
-
# has_one associations.
-
1
def invertible_for?(record)
-
543
inverse = inverse_reflection_for(record)
-
543
inverse && inverse.has_one?
-
end
-
-
1
def target_id
-
if options[:primary_key]
-
owner.send(reflection.name).try(:id)
-
else
-
owner._read_attribute(reflection.foreign_key)
-
end
-
end
-
-
1
def stale_state
-
1927
result = owner._read_attribute(reflection.foreign_key)
-
1927
result && result.to_s
-
end
-
-
1
def counter_cache_available_in_memory?(counter_cache_name)
-
target.respond_to?(counter_cache_name)
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
# = Active Record Belongs To Polymorphic Association
-
1
module Associations
-
1
class BelongsToPolymorphicAssociation < BelongsToAssociation #:nodoc:
-
1
def klass
-
106
type = owner[reflection.foreign_type]
-
106
type.presence && type.constantize
-
end
-
-
1
private
-
-
1
def replace_keys(record)
-
9
super
-
9
owner[reflection.foreign_type] = record.class.base_class.name
-
end
-
-
1
def remove_keys
-
1
super
-
1
owner[reflection.foreign_type] = nil
-
end
-
-
1
def different_target?(record)
-
super || record.class != klass
-
end
-
-
1
def inverse_reflection_for(record)
-
23
reflection.polymorphic_inverse_of(record.class)
-
end
-
-
1
def raise_on_type_mismatch!(record)
-
# A polymorphic association cannot have a type mismatch, by definition
-
end
-
-
1
def stale_state
-
63
foreign_key = super
-
63
foreign_key && [foreign_key.to_s, owner[reflection.foreign_type].to_s]
-
end
-
end
-
end
-
end
-
# This class is inherited by the has_many and has_many_and_belongs_to_many association classes
-
-
1
require 'active_record/associations'
-
-
1
module ActiveRecord::Associations::Builder
-
1
class CollectionAssociation < Association #:nodoc:
-
-
1
CALLBACKS = [:before_add, :after_add, :before_remove, :after_remove]
-
-
1
def valid_options
-
super + [:table_name, :before_add,
-
23
:after_add, :before_remove, :after_remove, :extend]
-
end
-
-
1
attr_reader :block_extension
-
-
1
def initialize(model, name, scope, options)
-
23
super
-
23
@mod = nil
-
23
if block_given?
-
@mod = Module.new(&Proc.new)
-
@scope = wrap_scope @scope, @mod
-
end
-
end
-
-
1
def self.define_callbacks(model, reflection)
-
23
super
-
23
name = reflection.name
-
23
options = reflection.options
-
23
CALLBACKS.each { |callback_name|
-
92
define_callback(model, callback_name, name, options)
-
}
-
end
-
-
1
def define_extensions(model)
-
22
if @mod
-
extension_module_name = "#{model.name.demodulize}#{name.to_s.camelize}AssociationExtension"
-
model.parent.const_set(extension_module_name, @mod)
-
end
-
end
-
-
1
def self.define_callback(model, callback_name, name, options)
-
92
full_callback_name = "#{callback_name}_for_#{name}"
-
-
# TODO : why do i need method_defined? I think its because of the inheritance chain
-
92
model.class_attribute full_callback_name unless model.method_defined?(full_callback_name)
-
92
callbacks = Array(options[callback_name.to_sym]).map do |callback|
-
case callback
-
when Symbol
-
->(method, owner, record) { owner.send(callback, record) }
-
when Proc
-
->(method, owner, record) { callback.call(owner, record) }
-
else
-
->(method, owner, record) { callback.send(method, owner, record) }
-
end
-
end
-
92
model.send "#{full_callback_name}=", callbacks
-
end
-
-
# Defines the setter and getter methods for the collection_singular_ids.
-
1
def self.define_readers(mixin, name)
-
22
super
-
-
22
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
-
def #{name.to_s.singularize}_ids
-
association(:#{name}).ids_reader
-
end
-
CODE
-
end
-
-
1
def self.define_writers(mixin, name)
-
22
super
-
-
22
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
-
def #{name.to_s.singularize}_ids=(ids)
-
association(:#{name}).ids_writer(ids)
-
end
-
CODE
-
end
-
-
1
private
-
-
1
def wrap_scope(scope, mod)
-
if scope
-
if scope.arity > 0
-
proc { |owner| instance_exec(owner, &scope).extending(mod) }
-
else
-
proc { instance_exec(&scope).extending(mod) }
-
end
-
else
-
proc { extending(mod) }
-
end
-
end
-
end
-
end
-
1
module ActiveRecord::Associations::Builder
-
1
class HasAndBelongsToMany # :nodoc:
-
1
class JoinTableResolver
-
1
KnownTable = Struct.new :join_table
-
-
1
class KnownClass
-
1
def initialize(lhs_class, rhs_class_name)
-
1
@lhs_class = lhs_class
-
1
@rhs_class_name = rhs_class_name
-
1
@join_table = nil
-
end
-
-
1
def join_table
-
12
@join_table ||= [@lhs_class.table_name, klass.table_name].sort.join("\0").gsub(/^(.*[._])(.+)\0\1(.+)/, '\1\2_\3').tr("\0", "_")
-
end
-
-
1
private
-
-
1
def klass
-
1
@lhs_class.send(:compute_type, @rhs_class_name)
-
end
-
end
-
-
1
def self.build(lhs_class, name, options)
-
1
if options[:join_table]
-
KnownTable.new options[:join_table].to_s
-
else
-
1
class_name = options.fetch(:class_name) {
-
1
name.to_s.camelize.singularize
-
}
-
1
KnownClass.new lhs_class, class_name
-
end
-
end
-
end
-
-
1
attr_reader :lhs_model, :association_name, :options
-
-
1
def initialize(association_name, lhs_model, options)
-
1
@association_name = association_name
-
1
@lhs_model = lhs_model
-
1
@options = options
-
end
-
-
1
def through_model
-
1
habtm = JoinTableResolver.build lhs_model, association_name, options
-
-
1
join_model = Class.new(ActiveRecord::Base) {
-
1
class << self;
-
1
attr_accessor :left_model
-
1
attr_accessor :name
-
1
attr_accessor :table_name_resolver
-
1
attr_accessor :left_reflection
-
1
attr_accessor :right_reflection
-
end
-
-
1
def self.table_name
-
12
table_name_resolver.join_table
-
end
-
-
1
def self.compute_type(class_name)
-
1
left_model.compute_type class_name
-
end
-
-
1
def self.add_left_association(name, options)
-
1
belongs_to name, options
-
1
self.left_reflection = _reflect_on_association(name)
-
end
-
-
1
def self.add_right_association(name, options)
-
1
rhs_name = name.to_s.singularize.to_sym
-
1
belongs_to rhs_name, options
-
1
self.right_reflection = _reflect_on_association(rhs_name)
-
end
-
-
1
def self.retrieve_connection
-
18
left_model.retrieve_connection
-
end
-
-
}
-
-
1
join_model.name = "HABTM_#{association_name.to_s.camelize}"
-
1
join_model.table_name_resolver = habtm
-
1
join_model.left_model = lhs_model
-
-
1
join_model.add_left_association :left_side, anonymous_class: lhs_model
-
1
join_model.add_right_association association_name, belongs_to_options(options)
-
1
join_model
-
end
-
-
1
def middle_reflection(join_model)
-
1
middle_name = [lhs_model.name.downcase.pluralize,
-
association_name].join('_').gsub(/::/, '_').to_sym
-
1
middle_options = middle_options join_model
-
1
hm_builder = HasMany.create_builder(lhs_model,
-
middle_name,
-
nil,
-
middle_options)
-
1
hm_builder.build lhs_model
-
end
-
-
1
private
-
-
1
def middle_options(join_model)
-
1
middle_options = {}
-
1
middle_options[:class_name] = "#{lhs_model.name}::#{join_model.name}"
-
1
middle_options[:source] = join_model.left_reflection.name
-
1
if options.key? :foreign_key
-
middle_options[:foreign_key] = options[:foreign_key]
-
end
-
1
middle_options
-
end
-
-
1
def belongs_to_options(options)
-
1
rhs_options = {}
-
-
1
if options.key? :class_name
-
rhs_options[:foreign_key] = options[:class_name].to_s.foreign_key
-
rhs_options[:class_name] = options[:class_name]
-
end
-
-
1
if options.key? :association_foreign_key
-
rhs_options[:foreign_key] = options[:association_foreign_key]
-
end
-
-
1
rhs_options
-
end
-
end
-
end
-
1
module ActiveRecord::Associations::Builder
-
1
class HasMany < CollectionAssociation #:nodoc:
-
1
def macro
-
23
:has_many
-
end
-
-
1
def valid_options
-
23
super + [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache, :join_table, :foreign_type]
-
end
-
-
1
def self.valid_dependent_options
-
8
[:destroy, :delete_all, :nullify, :restrict_with_error, :restrict_with_exception]
-
end
-
end
-
end
-
1
module ActiveRecord::Associations::Builder
-
1
class HasOne < SingularAssociation #:nodoc:
-
1
def macro
-
3
:has_one
-
end
-
-
1
def valid_options
-
3
valid = super + [:as, :foreign_type]
-
3
valid += [:through, :source, :source_type] if options[:through]
-
3
valid
-
end
-
-
1
def self.valid_dependent_options
-
3
[:destroy, :delete, :nullify, :restrict_with_error, :restrict_with_exception]
-
end
-
-
1
private
-
-
1
def self.add_destroy_callbacks(model, reflection)
-
3
super unless reflection.options[:through]
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
# = Active Record Association Collection
-
#
-
# CollectionAssociation is an abstract class that provides common stuff to
-
# ease the implementation of association proxies that represent
-
# collections. See the class hierarchy in Association.
-
#
-
# CollectionAssociation:
-
# HasManyAssociation => has_many
-
# HasManyThroughAssociation + ThroughAssociation => has_many :through
-
#
-
# CollectionAssociation class provides common methods to the collections
-
# defined by +has_and_belongs_to_many+, +has_many+ or +has_many+ with
-
# +:through association+ option.
-
#
-
# You need to be careful with assumptions regarding the target: The proxy
-
# does not fetch records from the database until it needs them, but new
-
# ones created with +build+ are added to the target. So, the target may be
-
# non-empty and still lack children waiting to be read from the database.
-
# If you look directly to the database you cannot assume that's the entire
-
# collection because new records may have been added to the target, etc.
-
#
-
# If you need to work on all current children, new and existing records,
-
# +load_target+ and the +loaded+ flag are your friends.
-
1
class CollectionAssociation < Association #:nodoc:
-
-
# Implements the reader method, e.g. foo.items for Foo.has_many :items
-
1
def reader(force_reload = false)
-
234
if force_reload
-
klass.uncached { reload }
-
elsif stale_target?
-
reload
-
end
-
-
234
if owner.new_record?
-
# Cache the proxy separately before the owner has an id
-
# or else a post-save proxy will still lack the id
-
14
@new_record_proxy ||= CollectionProxy.create(klass, self)
-
else
-
220
@proxy ||= CollectionProxy.create(klass, self)
-
end
-
end
-
-
# Implements the writer method, e.g. foo.items= for Foo.has_many :items
-
1
def writer(records)
-
14
replace(records)
-
end
-
-
# Implements the ids reader method, e.g. foo.item_ids for Foo.has_many :items
-
1
def ids_reader
-
if loaded?
-
load_target.map do |record|
-
record.send(reflection.association_primary_key)
-
end
-
else
-
column = "#{reflection.quoted_table_name}.#{reflection.association_primary_key}"
-
scope.pluck(column)
-
end
-
end
-
-
# Implements the ids writer method, e.g. foo.item_ids= for Foo.has_many :items
-
1
def ids_writer(ids)
-
pk_type = reflection.primary_key_type
-
ids = Array(ids).reject { |id| id.blank? }
-
ids.map! { |i| pk_type.type_cast_from_user(i) }
-
replace(klass.find(ids).index_by { |r| r.id }.values_at(*ids))
-
end
-
-
1
def reset
-
137
super
-
137
@target = []
-
end
-
-
1
def select(*fields)
-
1
if block_given?
-
3
load_target.select.each { |e| yield e }
-
else
-
scope.select(*fields)
-
end
-
end
-
-
1
def find(*args)
-
if block_given?
-
load_target.find(*args) { |*block_args| yield(*block_args) }
-
else
-
if options[:inverse_of] && loaded?
-
args_flatten = args.flatten
-
raise RecordNotFound, "Couldn't find #{scope.klass.name} without an ID" if args_flatten.blank?
-
result = find_by_scan(*args)
-
-
result_size = Array(result).size
-
if !result || result_size != args_flatten.size
-
scope.raise_record_not_found_exception!(args_flatten, result_size, args_flatten.size)
-
else
-
result
-
end
-
else
-
scope.find(*args)
-
end
-
end
-
end
-
-
1
def first(*args)
-
4
first_nth_or_last(:first, *args)
-
end
-
-
1
def second(*args)
-
first_nth_or_last(:second, *args)
-
end
-
-
1
def third(*args)
-
first_nth_or_last(:third, *args)
-
end
-
-
1
def fourth(*args)
-
first_nth_or_last(:fourth, *args)
-
end
-
-
1
def fifth(*args)
-
first_nth_or_last(:fifth, *args)
-
end
-
-
1
def forty_two(*args)
-
first_nth_or_last(:forty_two, *args)
-
end
-
-
1
def last(*args)
-
1
first_nth_or_last(:last, *args)
-
end
-
-
1
def take(n = nil)
-
if loaded?
-
n ? target.take(n) : target.first
-
else
-
scope.take(n).tap do |record|
-
set_inverse_instance record if record.is_a? ActiveRecord::Base
-
end
-
end
-
end
-
-
1
def build(attributes = {}, &block)
-
11
if attributes.is_a?(Array)
-
attributes.collect { |attr| build(attr, &block) }
-
else
-
11
add_to_target(build_record(attributes)) do |record|
-
11
yield(record) if block_given?
-
end
-
end
-
end
-
-
1
def create(attributes = {}, &block)
-
7
_create_record(attributes, &block)
-
end
-
-
1
def create!(attributes = {}, &block)
-
13
_create_record(attributes, true, &block)
-
end
-
-
# Add +records+ to this association. Returns +self+ so method calls may
-
# be chained. Since << flattens its argument list and inserts each record,
-
# +push+ and +concat+ behave identically.
-
1
def concat(*records)
-
18
if owner.new_record?
-
load_target
-
concat_records(records)
-
else
-
36
transaction { concat_records(records) }
-
end
-
end
-
-
# Starts a transaction in the association class's database connection.
-
#
-
# class Author < ActiveRecord::Base
-
# has_many :books
-
# end
-
#
-
# Author.first.books.transaction do
-
# # same effect as calling Book.transaction
-
# end
-
1
def transaction(*args)
-
69
reflection.klass.transaction(*args) do
-
69
yield
-
end
-
end
-
-
# Removes all records from the association without calling callbacks
-
# on the associated records. It honors the +:dependent+ option. However
-
# if the +:dependent+ value is +:destroy+ then in that case the +:delete_all+
-
# deletion strategy for the association is applied.
-
#
-
# You can force a particular deletion strategy by passing a parameter.
-
#
-
# Example:
-
#
-
# @author.books.delete_all(:nullify)
-
# @author.books.delete_all(:delete_all)
-
#
-
# See delete for more info.
-
1
def delete_all(dependent = nil)
-
if dependent && ![:nullify, :delete_all].include?(dependent)
-
raise ArgumentError, "Valid values are :nullify or :delete_all"
-
end
-
-
dependent = if dependent
-
dependent
-
elsif options[:dependent] == :destroy
-
:delete_all
-
else
-
options[:dependent]
-
end
-
-
delete_or_nullify_all_records(dependent).tap do
-
reset
-
loaded!
-
end
-
end
-
-
# Destroy all the records from this association.
-
#
-
# See destroy for more info.
-
1
def destroy_all
-
3
destroy(load_target).tap do
-
3
reset
-
3
loaded!
-
end
-
end
-
-
# Count all records using SQL. Construct options and pass them with
-
# scope to the target class's +count+.
-
1
def count(column_name = nil, count_options = {})
-
# TODO: Remove count_options argument as soon we remove support to
-
# activerecord-deprecated_finders.
-
9
column_name, count_options = nil, column_name if column_name.is_a?(Hash)
-
-
9
relation = scope
-
9
if association_scope.distinct_value
-
# This is needed because 'SELECT count(DISTINCT *)..' is not valid SQL.
-
column_name ||= reflection.klass.primary_key
-
relation = relation.distinct
-
end
-
-
9
value = relation.count(column_name)
-
-
9
limit = options[:limit]
-
9
offset = options[:offset]
-
-
9
if limit || offset
-
[ [value - offset.to_i, 0].max, limit.to_i ].min
-
else
-
9
value
-
end
-
end
-
-
# Removes +records+ from this association calling +before_remove+ and
-
# +after_remove+ callbacks.
-
#
-
# This method is abstract in the sense that +delete_records+ has to be
-
# provided by descendants. Note this method does not imply the records
-
# are actually removed from the database, that depends precisely on
-
# +delete_records+. They are in any case removed from the collection.
-
1
def delete(*records)
-
14
return if records.empty?
-
14
_options = records.extract_options!
-
14
dependent = _options[:dependent] || options[:dependent]
-
-
28
records = find(records) if records.any? { |record| record.kind_of?(Fixnum) || record.kind_of?(String) }
-
14
delete_or_destroy(records, dependent)
-
end
-
-
# Deletes the +records+ and removes them from this association calling
-
# +before_remove+ , +after_remove+ , +before_destroy+ and +after_destroy+ callbacks.
-
#
-
# Note that this method removes records from the database ignoring the
-
# +:dependent+ option.
-
1
def destroy(*records)
-
3
return if records.empty?
-
6
records = find(records) if records.any? { |record| record.kind_of?(Fixnum) || record.kind_of?(String) }
-
3
delete_or_destroy(records, :destroy)
-
end
-
-
# Returns the size of the collection by executing a SELECT COUNT(*)
-
# query if the collection hasn't been loaded, and calling
-
# <tt>collection.size</tt> if it has.
-
#
-
# If the collection has been already loaded +size+ and +length+ are
-
# equivalent. If not and you are going to need the records anyway
-
# +length+ will take one less query. Otherwise +size+ is more efficient.
-
#
-
# This method is abstract in the sense that it relies on
-
# +count_records+, which is a method descendants have to provide.
-
1
def size
-
2
if !find_target? || loaded?
-
2
if association_scope.distinct_value
-
target.uniq.size
-
else
-
2
target.size
-
end
-
elsif !loaded? && !association_scope.group_values.empty?
-
load_target.size
-
elsif !loaded? && !association_scope.distinct_value && target.is_a?(Array)
-
unsaved_records = target.select { |r| r.new_record? }
-
unsaved_records.size + count_records
-
else
-
count_records
-
end
-
end
-
-
# Returns the size of the collection calling +size+ on the target.
-
#
-
# If the collection has been already loaded +length+ and +size+ are
-
# equivalent. If not and you are going to need the records anyway this
-
# method will take one less query. Otherwise +size+ is more efficient.
-
1
def length
-
load_target.size
-
end
-
-
# Returns true if the collection is empty.
-
#
-
# If the collection has been loaded
-
# it is equivalent to <tt>collection.size.zero?</tt>. If the
-
# collection has not been loaded, it is equivalent to
-
# <tt>collection.exists?</tt>. If the collection has not already been
-
# loaded and you are going to fetch the records anyway it is better to
-
# check <tt>collection.length.zero?</tt>.
-
1
def empty?
-
8
if loaded?
-
2
size.zero?
-
else
-
6
@target.blank? && !scope.exists?
-
end
-
end
-
-
# Returns true if the collections is not empty.
-
# Equivalent to +!collection.empty?+.
-
1
def any?
-
if block_given?
-
load_target.any? { |*block_args| yield(*block_args) }
-
else
-
!empty?
-
end
-
end
-
-
# Returns true if the collection has more than 1 record.
-
# Equivalent to +collection.size > 1+.
-
1
def many?
-
if block_given?
-
load_target.many? { |*block_args| yield(*block_args) }
-
else
-
size > 1
-
end
-
end
-
-
1
def distinct
-
seen = {}
-
load_target.find_all do |record|
-
seen[record.id] = true unless seen.key?(record.id)
-
end
-
end
-
1
alias uniq distinct
-
-
# Replace this collection with +other_array+. This will perform a diff
-
# and delete/add only records that have changed.
-
1
def replace(other_array)
-
25
other_array.each { |val| raise_on_type_mismatch!(val) }
-
14
original_target = load_target.dup
-
-
14
if owner.new_record?
-
replace_records(other_array, original_target)
-
else
-
14
replace_common_records_in_memory(other_array, original_target)
-
14
if other_array != original_target
-
28
transaction { replace_records(other_array, original_target) }
-
end
-
end
-
end
-
-
1
def include?(record)
-
2
if record.is_a?(reflection.klass)
-
2
if record.new_record?
-
include_in_memory?(record)
-
else
-
2
loaded? ? target.include?(record) : scope.exists?(record.id)
-
end
-
else
-
false
-
end
-
end
-
-
1
def load_target
-
81
if find_target?
-
47
@target = merge_target_lists(find_target, target)
-
end
-
-
81
loaded!
-
81
target
-
end
-
-
1
def add_to_target(record, skip_callbacks = false, &block)
-
37
if association_scope.distinct_value
-
index = @target.index(record)
-
end
-
37
replace_on_target(record, index, skip_callbacks, &block)
-
end
-
-
1
def replace_on_target(record, index, skip_callbacks)
-
46
callback(:before_add, record) unless skip_callbacks
-
46
yield(record) if block_given?
-
-
46
if index
-
9
@target[index] = record
-
else
-
37
@target << record
-
end
-
-
46
callback(:after_add, record) unless skip_callbacks
-
46
set_inverse_instance(record)
-
-
46
record
-
end
-
-
1
def scope(opts = {})
-
357
scope = super()
-
357
scope.none! if opts.fetch(:nullify, true) && null_scope?
-
357
scope
-
end
-
-
1
def null_scope?
-
231
owner.new_record? && !foreign_key_present?
-
end
-
-
1
private
-
1
def get_records
-
47
return scope.to_a if skip_statement_cache?
-
-
27
conn = klass.connection
-
27
sc = reflection.association_scope_cache(conn, owner) do
-
4
StatementCache.create(conn) { |params|
-
8
as = AssociationScope.create { params.bind }
-
4
target_scope.merge as.scope(self, conn)
-
}
-
end
-
-
27
binds = AssociationScope.get_bind_values(owner, reflection.chain)
-
27
sc.execute binds, klass, klass.connection
-
end
-
-
1
def find_target
-
41
records = get_records
-
94
records.each { |record| set_inverse_instance(record) }
-
41
records
-
end
-
-
# We have some records loaded from the database (persisted) and some that are
-
# in-memory (memory). The same record may be represented in the persisted array
-
# and in the memory array.
-
#
-
# So the task of this method is to merge them according to the following rules:
-
#
-
# * The final array must not have duplicates
-
# * The order of the persisted array is to be preserved
-
# * Any changes made to attributes on objects in the memory array are to be preserved
-
# * Otherwise, attributes should have the value found in the database
-
1
def merge_target_lists(persisted, memory)
-
47
return persisted if memory.empty?
-
return memory if persisted.empty?
-
-
persisted.map! do |record|
-
if mem_record = memory.delete(record)
-
-
((record.attribute_names & mem_record.attribute_names) - mem_record.changes.keys).each do |name|
-
mem_record[name] = record[name]
-
end
-
-
mem_record
-
else
-
record
-
end
-
end
-
-
persisted + memory
-
end
-
-
1
def _create_record(attributes, raise = false, &block)
-
20
unless owner.persisted?
-
raise ActiveRecord::RecordNotSaved, "You cannot call create unless the parent is saved"
-
end
-
-
20
if attributes.is_a?(Array)
-
attributes.collect { |attr| _create_record(attr, raise, &block) }
-
else
-
20
transaction do
-
20
add_to_target(build_record(attributes)) do |record|
-
20
yield(record) if block_given?
-
20
insert_record(record, true, raise)
-
end
-
end
-
end
-
end
-
-
# Do the relevant stuff to insert the given record into the association collection.
-
1
def insert_record(record, validate = true, raise = false)
-
raise NotImplementedError
-
end
-
-
1
def create_scope
-
31
scope.scope_for_create.stringify_keys
-
end
-
-
1
def delete_or_destroy(records, method)
-
17
records = records.flatten
-
37
records.each { |record| raise_on_type_mismatch!(record) }
-
37
existing_records = records.reject { |r| r.new_record? }
-
-
17
if existing_records.empty?
-
remove_records(existing_records, records, method)
-
else
-
34
transaction { remove_records(existing_records, records, method) }
-
end
-
end
-
-
1
def remove_records(existing_records, records, method)
-
37
records.each { |record| callback(:before_remove, record) }
-
-
17
delete_records(existing_records, method) if existing_records.any?
-
37
records.each { |record| target.delete(record) }
-
-
37
records.each { |record| callback(:after_remove, record) }
-
end
-
-
# Delete the given records from the association, using one of the methods :destroy,
-
# :delete_all or :nullify (or nil, in which case a default is used).
-
1
def delete_records(records, method)
-
raise NotImplementedError
-
end
-
-
1
def replace_records(new_target, original_target)
-
14
delete(target - new_target)
-
-
14
unless concat(new_target - target)
-
@target = original_target
-
raise RecordNotSaved, "Failed to replace #{reflection.name} because one or more of the " \
-
"new records could not be saved."
-
end
-
-
14
target
-
end
-
-
1
def replace_common_records_in_memory(new_target, original_target)
-
14
common_records = new_target & original_target
-
14
common_records.each do |record|
-
9
skip_callbacks = true
-
9
replace_on_target(record, @target.index(record), skip_callbacks)
-
end
-
end
-
-
1
def concat_records(records, should_raise = false)
-
18
result = true
-
-
18
records.flatten.each do |record|
-
6
raise_on_type_mismatch!(record)
-
6
add_to_target(record) do |rec|
-
6
result &&= insert_record(rec, true, should_raise) unless owner.new_record?
-
end
-
end
-
-
18
result && records
-
end
-
-
1
def callback(method, record)
-
114
callbacks_for(method).each do |callback|
-
callback.call(method, owner, record)
-
end
-
end
-
-
1
def callbacks_for(callback_name)
-
114
full_callback_name = "#{callback_name}_for_#{reflection.name}"
-
114
owner.class.send(full_callback_name)
-
end
-
-
# Should we deal with assoc.first or assoc.last by issuing an independent query to
-
# the database, or by getting the target, and then taking the first/last item from that?
-
#
-
# If the args is just a non-empty options hash, go to the database.
-
#
-
# Otherwise, go to the database only if none of the following are true:
-
# * target already loaded
-
# * owner is new record
-
# * target contains new or changed record(s)
-
1
def fetch_first_nth_or_last_using_find?(args)
-
5
if args.first.is_a?(Hash)
-
true
-
else
-
!(loaded? ||
-
5
owner.new_record? ||
-
5
target.any? { |record| record.new_record? || record.changed? })
-
end
-
end
-
-
1
def include_in_memory?(record)
-
if reflection.is_a?(ActiveRecord::Reflection::ThroughReflection)
-
assoc = owner.association(reflection.through_reflection.name)
-
assoc.reader.any? { |source|
-
target_association = source.send(reflection.source_reflection.name)
-
-
if target_association.respond_to?(:include?)
-
target_association.include?(record)
-
else
-
target_association == record
-
end
-
} || target.include?(record)
-
else
-
target.include?(record)
-
end
-
end
-
-
# If the :inverse_of option has been
-
# specified, then #find scans the entire collection.
-
1
def find_by_scan(*args)
-
expects_array = args.first.kind_of?(Array)
-
ids = args.flatten.compact.map{ |arg| arg.to_s }.uniq
-
-
if ids.size == 1
-
id = ids.first
-
record = load_target.detect { |r| id == r.id.to_s }
-
expects_array ? [ record ] : record
-
else
-
load_target.select { |r| ids.include?(r.id.to_s) }
-
end
-
end
-
-
# Fetches the first/last using SQL if possible, otherwise from the target array.
-
1
def first_nth_or_last(type, *args)
-
5
args.shift if args.first.is_a?(Hash) && args.first.empty?
-
-
5
collection = fetch_first_nth_or_last_using_find?(args) ? scope : load_target
-
5
collection.send(type, *args).tap do |record|
-
5
set_inverse_instance record if record.is_a? ActiveRecord::Base
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord::Associations
-
1
module ForeignAssociation
-
1
def foreign_key_present?
-
4
if reflection.klass.primary_key
-
4
owner.attribute_present?(reflection.active_record_primary_key)
-
else
-
false
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
# = Active Record Has Many Association
-
1
module Associations
-
# This is the proxy that handles a has many association.
-
#
-
# If the association has a <tt>:through</tt> option further specialization
-
# is provided by its child HasManyThroughAssociation.
-
1
class HasManyAssociation < CollectionAssociation #:nodoc:
-
1
include ForeignAssociation
-
-
1
def handle_dependency
-
3
case options[:dependent]
-
when :restrict_with_exception
-
raise ActiveRecord::DeleteRestrictionError.new(reflection.name) unless empty?
-
-
when :restrict_with_error
-
unless empty?
-
record = klass.human_attribute_name(reflection.name).downcase
-
owner.errors.add(:base, :"restrict_dependent_destroy.many", record: record)
-
false
-
end
-
-
else
-
3
if options[:dependent] == :destroy
-
# No point in executing the counter update since we're going to destroy the parent anyway
-
6
load_target.each { |t| t.destroyed_by_association = reflection }
-
3
destroy_all
-
else
-
delete_all
-
end
-
end
-
end
-
-
1
def insert_record(record, validate = true, raise = false)
-
24
set_owner_attributes(record)
-
24
set_inverse_instance(record)
-
-
24
if raise
-
13
record.save!(:validate => validate)
-
else
-
11
record.save(:validate => validate)
-
end
-
end
-
-
1
def empty?
-
8
if has_cached_counter?
-
size.zero?
-
else
-
8
super
-
end
-
end
-
-
1
private
-
-
# Returns the number of records in this collection.
-
#
-
# If the association has a counter cache it gets that value. Otherwise
-
# it will attempt to do a count via SQL, bounded to <tt>:limit</tt> if
-
# there's one. Some configuration options like :group make it impossible
-
# to do an SQL count, in those cases the array count will be used.
-
#
-
# That does not depend on whether the collection has already been loaded
-
# or not. The +size+ method is the one that takes the loaded flag into
-
# account and delegates to +count_records+ if needed.
-
#
-
# If the collection is empty the target is set to an empty array and
-
# the loaded flag is set to true as well.
-
1
def count_records
-
count = if has_cached_counter?
-
owner._read_attribute cached_counter_attribute_name
-
else
-
scope.count
-
end
-
-
# If there's nothing in the database and @target has no new records
-
# we are certain the current target is an empty array. This is a
-
# documented side-effect of the method that may avoid an extra SELECT.
-
@target ||= [] and loaded! if count == 0
-
-
[association_scope.limit_value, count].compact.min
-
end
-
-
-
# Returns whether a counter cache should be used for this association.
-
#
-
# The counter_cache option must be given on either the owner or inverse
-
# association, and the column must be present on the owner.
-
1
def has_cached_counter?(reflection = reflection())
-
74
if reflection.options[:counter_cache] || (inverse = inverse_which_updates_counter_cache(reflection)) && inverse.options[:counter_cache]
-
33
owner.attribute_present?(cached_counter_attribute_name(reflection))
-
end
-
end
-
-
1
def cached_counter_attribute_name(reflection = reflection())
-
151
if reflection.options[:counter_cache]
-
66
reflection.options[:counter_cache].to_s
-
else
-
85
"#{reflection.name}_count"
-
end
-
end
-
-
1
def update_counter(difference, reflection = reflection())
-
17
update_counter_in_database(difference, reflection)
-
17
update_counter_in_memory(difference, reflection)
-
end
-
-
1
def update_counter_in_database(difference, reflection = reflection())
-
17
if has_cached_counter?(reflection)
-
counter = cached_counter_attribute_name(reflection)
-
owner.class.update_counters(owner.id, counter => difference)
-
end
-
end
-
-
1
def update_counter_in_memory(difference, reflection = reflection())
-
54
if counter_must_be_updated_by_has_many?(reflection)
-
counter = cached_counter_attribute_name(reflection)
-
owner[counter] += difference
-
owner.send(:clear_attribute_changes, counter) # eww
-
end
-
end
-
-
# This shit is nasty. We need to avoid the following situation:
-
#
-
# * An associated record is deleted via record.destroy
-
# * Hence the callbacks run, and they find a belongs_to on the record with a
-
# :counter_cache options which points back at our owner. So they update the
-
# counter cache.
-
# * In which case, we must make sure to *not* update the counter cache, or else
-
# it will be decremented twice.
-
#
-
# Hence this method.
-
1
def inverse_which_updates_counter_cache(reflection = reflection())
-
110
counter_name = cached_counter_attribute_name(reflection)
-
110
inverse_which_updates_counter_named(counter_name, reflection)
-
end
-
1
alias inverse_updates_counter_cache? inverse_which_updates_counter_cache
-
-
1
def inverse_which_updates_counter_named(counter_name, reflection)
-
110
reflection.klass._reflections.values.find { |inverse_reflection|
-
inverse_reflection.belongs_to? &&
-
223
inverse_reflection.counter_cache_column == counter_name
-
}
-
end
-
1
alias inverse_updates_counter_named? inverse_which_updates_counter_named
-
-
1
def inverse_updates_counter_in_memory?(reflection)
-
54
inverse = inverse_which_updates_counter_cache(reflection)
-
54
inverse && inverse == reflection.inverse_of
-
end
-
-
1
def counter_must_be_updated_by_has_many?(reflection)
-
54
!inverse_updates_counter_in_memory?(reflection) && has_cached_counter?(reflection)
-
end
-
-
1
def delete_count(method, scope)
-
2
if method == :delete_all
-
scope.delete_all
-
else
-
2
scope.update_all(reflection.foreign_key => nil)
-
end
-
end
-
-
1
def delete_or_nullify_all_records(method)
-
count = delete_count(method, self.scope)
-
update_counter(-count)
-
end
-
-
# Deletes the records according to the <tt>:dependent</tt> option.
-
1
def delete_records(records, method)
-
17
if method == :destroy
-
15
records.each(&:destroy!)
-
15
update_counter(-records.length) unless inverse_updates_counter_cache?
-
else
-
2
scope = self.scope.where(reflection.klass.primary_key => records)
-
2
update_counter(-delete_count(method, scope))
-
end
-
end
-
-
1
def concat_records(records, *)
-
18
update_counter_if_success(super, records.length)
-
end
-
-
1
def _create_record(attributes, *)
-
20
if attributes.is_a?(Array)
-
super
-
else
-
20
update_counter_if_success(super, 1)
-
end
-
end
-
-
1
def update_counter_if_success(saved_successfully, difference)
-
38
if saved_successfully
-
37
update_counter_in_memory(difference)
-
end
-
38
saved_successfully
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/string/filters'
-
-
1
module ActiveRecord
-
# = Active Record Has Many Through Association
-
1
module Associations
-
1
class HasManyThroughAssociation < HasManyAssociation #:nodoc:
-
1
include ThroughAssociation
-
-
1
def initialize(owner, reflection)
-
20
super
-
-
20
@through_records = {}
-
20
@through_association = nil
-
end
-
-
# Returns the size of the collection by executing a SELECT COUNT(*) query
-
# if the collection hasn't been loaded, and by calling collection.size if
-
# it has. If the collection will likely have a size greater than zero,
-
# and if fetching the collection will be needed afterwards, one less
-
# SELECT query will be generated by using #length instead.
-
1
def size
-
if has_cached_counter?
-
owner._read_attribute cached_counter_attribute_name(reflection)
-
elsif loaded?
-
target.size
-
else
-
super
-
end
-
end
-
-
1
def concat(*records)
-
3
unless owner.new_record?
-
3
records.flatten.each do |record|
-
3
raise_on_type_mismatch!(record)
-
end
-
end
-
-
3
super
-
end
-
-
1
def concat_records(records)
-
3
ensure_not_nested
-
-
3
records = super(records, true)
-
-
3
if owner.new_record? && records
-
records.flatten.each do |record|
-
build_through_record(record)
-
end
-
end
-
-
3
records
-
end
-
-
1
def insert_record(record, validate = true, raise = false)
-
3
ensure_not_nested
-
-
3
if record.new_record?
-
if raise
-
record.save!(:validate => validate)
-
else
-
return unless record.save(:validate => validate)
-
end
-
end
-
-
3
save_through_record(record)
-
3
if has_cached_counter? && !through_reflection_updates_counter_cache?
-
ActiveSupport::Deprecation.warn(<<-MSG.squish)
-
Automatic updating of counter caches on through associations has been
-
deprecated, and will be removed in Rails 5. Instead, please set the
-
appropriate `counter_cache` options on the `has_many` and `belongs_to`
-
for your associations to #{through_reflection.name}.
-
MSG
-
-
update_counter_in_database(1)
-
end
-
3
record
-
end
-
-
1
private
-
-
1
def through_association
-
12
@through_association ||= owner.association(through_reflection.name)
-
end
-
-
# The through record (built with build_record) is temporarily cached
-
# so that it may be reused if insert_record is subsequently called.
-
#
-
# However, after insert_record has been called, the cache is cleared in
-
# order to allow multiple instances of the same record in an association.
-
1
def build_through_record(record)
-
3
@through_records[record.object_id] ||= begin
-
3
ensure_mutable
-
-
3
through_record = through_association.build(*options_for_through_record)
-
3
through_record.send("#{source_reflection.name}=", record)
-
3
through_record
-
end
-
end
-
-
1
def options_for_through_record
-
3
[through_scope_attributes]
-
end
-
-
1
def through_scope_attributes
-
scope.where_values_hash(through_association.reflection.name.to_s).
-
3
except!(through_association.reflection.foreign_key,
-
through_association.reflection.klass.inheritance_column)
-
end
-
-
1
def save_through_record(record)
-
3
build_through_record(record).save!
-
ensure
-
3
@through_records.delete(record.object_id)
-
end
-
-
1
def build_record(attributes)
-
ensure_not_nested
-
-
record = super(attributes)
-
-
inverse = source_reflection.inverse_of
-
if inverse
-
if inverse.collection?
-
record.send(inverse.name) << build_through_record(record)
-
elsif inverse.has_one?
-
record.send("#{inverse.name}=", build_through_record(record))
-
end
-
end
-
-
record
-
end
-
-
1
def target_reflection_has_associated_record?
-
6
!(through_reflection.belongs_to? && owner[through_reflection.foreign_key].blank?)
-
end
-
-
1
def update_through_counter?(method)
-
case method
-
when :destroy
-
!inverse_updates_counter_cache?(through_reflection)
-
when :nullify
-
false
-
else
-
true
-
end
-
end
-
-
1
def delete_or_nullify_all_records(method)
-
delete_records(load_target, method)
-
end
-
-
1
def delete_records(records, method)
-
ensure_not_nested
-
-
scope = through_association.scope
-
scope.where! construct_join_attributes(*records)
-
-
case method
-
when :destroy
-
if scope.klass.primary_key
-
count = scope.destroy_all.length
-
else
-
scope.each do |record|
-
record._run_destroy_callbacks
-
end
-
-
arel = scope.arel
-
-
stmt = Arel::DeleteManager.new arel.engine
-
stmt.from scope.klass.arel_table
-
stmt.wheres = arel.constraints
-
-
count = scope.klass.connection.delete(stmt, 'SQL', scope.bind_values)
-
end
-
when :nullify
-
count = scope.update_all(source_reflection.foreign_key => nil)
-
else
-
count = scope.delete_all
-
end
-
-
delete_through_records(records)
-
-
if source_reflection.options[:counter_cache] && method != :destroy
-
counter = source_reflection.counter_cache_column
-
klass.decrement_counter counter, records.map(&:id)
-
end
-
-
if through_reflection.collection? && update_through_counter?(method)
-
update_counter(-count, through_reflection)
-
else
-
update_counter(-count)
-
end
-
end
-
-
1
def through_records_for(record)
-
attributes = construct_join_attributes(record)
-
candidates = Array.wrap(through_association.target)
-
candidates.find_all do |c|
-
attributes.all? do |key, value|
-
c.public_send(key) == value
-
end
-
end
-
end
-
-
1
def delete_through_records(records)
-
records.each do |record|
-
through_records = through_records_for(record)
-
-
if through_reflection.collection?
-
through_records.each { |r| through_association.target.delete(r) }
-
else
-
if through_records.include?(through_association.target)
-
through_association.target = nil
-
end
-
end
-
-
@through_records.delete(record.object_id)
-
end
-
end
-
-
1
def find_target
-
6
return [] unless target_reflection_has_associated_record?
-
6
get_records
-
end
-
-
# NOTE - not sure that we can actually cope with inverses here
-
1
def invertible_for?(record)
-
16
false
-
end
-
-
1
def has_cached_counter?(reflection = reflection())
-
8
owner.attribute_present?(cached_counter_attribute_name(reflection))
-
end
-
-
1
def through_reflection_updates_counter_cache?
-
counter_name = cached_counter_attribute_name
-
inverse_updates_counter_named?(counter_name, through_reflection)
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
# = Active Record Belongs To Has One Association
-
1
module Associations
-
1
class HasOneAssociation < SingularAssociation #:nodoc:
-
1
include ForeignAssociation
-
-
1
def handle_dependency
-
case options[:dependent]
-
when :restrict_with_exception
-
raise ActiveRecord::DeleteRestrictionError.new(reflection.name) if load_target
-
-
when :restrict_with_error
-
if load_target
-
record = klass.human_attribute_name(reflection.name).downcase
-
owner.errors.add(:base, :"restrict_dependent_destroy.one", record: record)
-
false
-
end
-
-
else
-
delete
-
end
-
end
-
-
1
def replace(record, save = true)
-
36
raise_on_type_mismatch!(record) if record
-
36
load_target
-
-
36
return self.target if !(target || record)
-
-
36
assigning_another_record = target != record
-
36
if assigning_another_record || record.changed?
-
22
save &&= owner.persisted?
-
-
22
transaction_if(save) do
-
22
remove_target!(options[:dependent]) if target && !target.destroyed? && assigning_another_record
-
-
22
if record
-
22
set_owner_attributes(record)
-
22
set_inverse_instance(record)
-
-
22
if save && !record.save
-
nullify_owner_attributes(record)
-
set_owner_attributes(target) if target
-
raise RecordNotSaved, "Failed to save the new associated #{reflection.name}."
-
end
-
end
-
end
-
end
-
-
36
self.target = record
-
end
-
-
1
def delete(method = options[:dependent])
-
if load_target
-
case method
-
when :delete
-
target.delete
-
when :destroy
-
target.destroy
-
when :nullify
-
target.update_columns(reflection.foreign_key => nil)
-
end
-
end
-
end
-
-
1
private
-
-
# The reason that the save param for replace is false, if for create (not just build),
-
# is because the setting of the foreign keys is actually handled by the scoping when
-
# the record is instantiated, and so they are set straight away and do not need to be
-
# updated within replace.
-
1
def set_new_record(record)
-
35
replace(record, false)
-
end
-
-
1
def remove_target!(method)
-
3
case method
-
when :delete
-
target.delete
-
when :destroy
-
3
target.destroy
-
else
-
nullify_owner_attributes(target)
-
-
if target.persisted? && owner.persisted? && !target.save
-
set_owner_attributes(target)
-
raise RecordNotSaved, "Failed to remove the existing associated #{reflection.name}. " +
-
"The record failed to save after its foreign key was set to nil."
-
end
-
end
-
end
-
-
1
def nullify_owner_attributes(record)
-
record[reflection.foreign_key] = nil
-
end
-
-
1
def transaction_if(value)
-
22
if value
-
reflection.klass.transaction { yield }
-
else
-
22
yield
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class JoinDependency # :nodoc:
-
1
autoload :JoinBase, 'active_record/associations/join_dependency/join_base'
-
1
autoload :JoinAssociation, 'active_record/associations/join_dependency/join_association'
-
-
1
class Aliases # :nodoc:
-
1
def initialize(tables)
-
@tables = tables
-
@alias_cache = tables.each_with_object({}) { |table,h|
-
h[table.node] = table.columns.each_with_object({}) { |column,i|
-
i[column.name] = column.alias
-
}
-
}
-
@name_and_alias_cache = tables.each_with_object({}) { |table,h|
-
h[table.node] = table.columns.map { |column|
-
[column.name, column.alias]
-
}
-
}
-
end
-
-
1
def columns
-
@tables.flat_map { |t| t.column_aliases }
-
end
-
-
# An array of [column_name, alias] pairs for the table
-
1
def column_aliases(node)
-
@name_and_alias_cache[node]
-
end
-
-
1
def column_alias(node, column)
-
@alias_cache[node][column]
-
end
-
-
1
class Table < Struct.new(:node, :columns)
-
1
def table
-
Arel::Nodes::TableAlias.new node.table, node.aliased_table_name
-
end
-
-
1
def column_aliases
-
t = table
-
columns.map { |column| t[column.name].as Arel.sql column.alias }
-
end
-
end
-
1
Column = Struct.new(:name, :alias)
-
end
-
-
1
attr_reader :alias_tracker, :base_klass, :join_root
-
-
1
def self.make_tree(associations)
-
924
hash = {}
-
924
walk_tree associations, hash
-
924
hash
-
end
-
-
1
def self.walk_tree(associations, hash)
-
1270
case associations
-
when Symbol, String
-
346
hash[associations.to_sym] ||= {}
-
when Array
-
924
associations.each do |assoc|
-
346
walk_tree assoc, hash
-
end
-
when Hash
-
associations.each do |k,v|
-
cache = hash[k] ||= {}
-
walk_tree v, cache
-
end
-
else
-
raise ConfigurationError, associations.inspect
-
end
-
end
-
-
# base is the base class on which operation is taking place.
-
# associations is the list of associations which are joined using hash, symbol or array.
-
# joins is the list of all string join commands and arel nodes.
-
#
-
# Example :
-
#
-
# class Physician < ActiveRecord::Base
-
# has_many :appointments
-
# has_many :patients, through: :appointments
-
# end
-
#
-
# If I execute `@physician.patients.to_a` then
-
# base # => Physician
-
# associations # => []
-
# joins # => [#<Arel::Nodes::InnerJoin: ...]
-
#
-
# However if I execute `Physician.joins(:appointments).to_a` then
-
# base # => Physician
-
# associations # => [:appointments]
-
# joins # => []
-
#
-
1
def initialize(base, associations, joins)
-
924
@alias_tracker = AliasTracker.create(base.connection, joins)
-
924
@alias_tracker.aliased_table_for(base.table_name, base.table_name) # Updates the count for base.table_name to 1
-
924
tree = self.class.make_tree associations
-
924
@join_root = JoinBase.new base, build(tree, base)
-
1270
@join_root.children.each { |child| construct_tables! @join_root, child }
-
end
-
-
1
def reflections
-
447
join_root.drop(1).map!(&:reflection)
-
end
-
-
1
def join_constraints(outer_joins)
-
477
joins = join_root.children.flat_map { |child|
-
4
make_inner_joins join_root, child
-
}
-
-
477
joins.concat outer_joins.flat_map { |oj|
-
447
if join_root.match? oj.join_root
-
447
walk join_root, oj.join_root
-
else
-
oj.join_root.children.flat_map { |child|
-
make_outer_joins oj.join_root, child
-
}
-
end
-
}
-
end
-
-
1
def aliases
-
Aliases.new join_root.each_with_index.map { |join_part,i|
-
columns = join_part.column_names.each_with_index.map { |column_name,j|
-
Aliases::Column.new column_name, "t#{i}_r#{j}"
-
}
-
Aliases::Table.new(join_part, columns)
-
}
-
end
-
-
1
def instantiate(result_set, aliases)
-
primary_key = aliases.column_alias(join_root, join_root.primary_key)
-
-
seen = Hash.new { |h,parent_klass|
-
h[parent_klass] = Hash.new { |i,parent_id|
-
i[parent_id] = Hash.new { |j,child_klass| j[child_klass] = {} }
-
}
-
}
-
-
model_cache = Hash.new { |h,klass| h[klass] = {} }
-
parents = model_cache[join_root]
-
column_aliases = aliases.column_aliases join_root
-
-
message_bus = ActiveSupport::Notifications.instrumenter
-
-
payload = {
-
record_count: result_set.length,
-
class_name: join_root.base_klass.name
-
}
-
-
message_bus.instrument('instantiation.active_record', payload) do
-
result_set.each { |row_hash|
-
parent_key = primary_key ? row_hash[primary_key] : row_hash
-
parent = parents[parent_key] ||= join_root.instantiate(row_hash, column_aliases)
-
construct(parent, join_root, row_hash, result_set, seen, model_cache, aliases)
-
}
-
end
-
-
parents.values
-
end
-
-
1
private
-
-
1
def make_constraints(parent, child, tables, join_type)
-
346
chain = child.reflection.chain
-
346
foreign_table = parent.table
-
346
foreign_klass = parent.base_klass
-
346
child.join_constraints(foreign_table, foreign_klass, child, join_type, tables, child.reflection.scope_chain, chain)
-
end
-
-
1
def make_outer_joins(parent, child)
-
342
tables = table_aliases_for(parent, child)
-
342
join_type = Arel::Nodes::OuterJoin
-
342
info = make_constraints parent, child, tables, join_type
-
-
342
[info] + child.children.flat_map { |c| make_outer_joins(child, c) }
-
end
-
-
1
def make_inner_joins(parent, child)
-
4
tables = child.tables
-
4
join_type = Arel::Nodes::InnerJoin
-
4
info = make_constraints parent, child, tables, join_type
-
-
4
[info] + child.children.flat_map { |c| make_inner_joins(child, c) }
-
end
-
-
1
def table_aliases_for(parent, node)
-
688
node.reflection.chain.map { |reflection|
-
688
alias_tracker.aliased_table_for(
-
reflection.table_name,
-
table_alias_for(reflection, parent, reflection != node.reflection)
-
)
-
}
-
end
-
-
1
def construct_tables!(parent, node)
-
346
node.tables = table_aliases_for(parent, node)
-
346
node.children.each { |child| construct_tables! node, child }
-
end
-
-
1
def table_alias_for(reflection, parent, join)
-
688
name = "#{reflection.plural_name}_#{parent.table_name}"
-
688
name << "_join" if join
-
688
name
-
end
-
-
1
def walk(left, right)
-
447
intersection, missing = right.children.map { |node1|
-
342
[left.children.find { |node2| node1.match? node2 }, node1]
-
}.partition(&:first)
-
-
789
ojs = missing.flat_map { |_,n| make_outer_joins left, n }
-
447
intersection.flat_map { |l,r| walk l, r }.concat ojs
-
end
-
-
1
def find_reflection(klass, name)
-
klass._reflect_on_association(name) or
-
346
raise ConfigurationError, "Association named '#{ name }' was not found on #{ klass.name }; perhaps you misspelled it?"
-
end
-
-
1
def build(associations, base_klass)
-
1270
associations.map do |name, right|
-
346
reflection = find_reflection base_klass, name
-
346
reflection.check_validity!
-
346
reflection.check_eager_loadable!
-
-
346
if reflection.polymorphic?
-
raise EagerLoadPolymorphicError.new(reflection)
-
end
-
-
346
JoinAssociation.new reflection, build(right, reflection.klass)
-
end
-
end
-
-
1
def construct(ar_parent, parent, row, rs, seen, model_cache, aliases)
-
return if ar_parent.nil?
-
primary_id = ar_parent.id
-
-
parent.children.each do |node|
-
if node.reflection.collection?
-
other = ar_parent.association(node.reflection.name)
-
other.loaded!
-
else
-
if ar_parent.association_cache.key?(node.reflection.name)
-
model = ar_parent.association(node.reflection.name).target
-
construct(model, node, row, rs, seen, model_cache, aliases)
-
next
-
end
-
end
-
-
key = aliases.column_alias(node, node.primary_key)
-
id = row[key]
-
if id.nil?
-
nil_association = ar_parent.association(node.reflection.name)
-
nil_association.loaded!
-
next
-
end
-
-
model = seen[parent.base_klass][primary_id][node.base_klass][id]
-
-
if model
-
construct(model, node, row, rs, seen, model_cache, aliases)
-
else
-
model = construct_model(ar_parent, node, row, model_cache, id, aliases)
-
seen[parent.base_klass][primary_id][node.base_klass][id] = model
-
construct(model, node, row, rs, seen, model_cache, aliases)
-
end
-
end
-
end
-
-
1
def construct_model(record, node, row, model_cache, id, aliases)
-
model = model_cache[node][id] ||= node.instantiate(row,
-
aliases.column_aliases(node))
-
other = record.association(node.reflection.name)
-
-
if node.reflection.collection?
-
other.target.push(model)
-
else
-
other.target = model
-
end
-
-
other.set_inverse_instance(model)
-
model
-
end
-
end
-
end
-
end
-
1
require 'active_record/associations/join_dependency/join_part'
-
-
1
module ActiveRecord
-
1
module Associations
-
1
class JoinDependency # :nodoc:
-
1
class JoinAssociation < JoinPart # :nodoc:
-
# The reflection of the association represented
-
1
attr_reader :reflection
-
-
1
attr_accessor :tables
-
-
1
def initialize(reflection, children)
-
346
super(reflection.klass, children)
-
-
346
@reflection = reflection
-
346
@tables = nil
-
end
-
-
1
def match?(other)
-
return true if self == other
-
super && reflection == other.reflection
-
end
-
-
1
JoinInformation = Struct.new :joins, :binds
-
-
1
def join_constraints(foreign_table, foreign_klass, node, join_type, tables, scope_chain, chain)
-
346
joins = []
-
346
bind_values = []
-
346
tables = tables.reverse
-
-
346
scope_chain_index = 0
-
346
scope_chain = scope_chain.reverse
-
-
# The chain starts with the target table, but we want to end with it here (makes
-
# more sense in this context), so we reverse
-
346
chain.reverse_each do |reflection|
-
346
table = tables.shift
-
346
klass = reflection.klass
-
-
346
join_keys = reflection.join_keys(klass)
-
346
key = join_keys.key
-
346
foreign_key = join_keys.foreign_key
-
-
346
constraint = build_constraint(klass, table, key, foreign_table, foreign_key)
-
-
346
scope_chain_items = scope_chain[scope_chain_index].map do |item|
-
if item.is_a?(Relation)
-
item
-
else
-
ActiveRecord::Relation.create(klass, table).instance_exec(node, &item)
-
end
-
end
-
346
scope_chain_index += 1
-
-
346
scope_chain_items.concat [klass.send(:build_default_scope, ActiveRecord::Relation.create(klass, table))].compact
-
-
346
rel = scope_chain_items.inject(scope_chain_items.shift) do |left, right|
-
left.merge right
-
end
-
-
346
if rel && !rel.arel.constraints.empty?
-
bind_values.concat rel.bind_values
-
constraint = constraint.and rel.arel.constraints
-
end
-
-
346
if reflection.type
-
value = foreign_klass.base_class.name
-
column = klass.columns_hash[reflection.type.to_s]
-
-
substitute = klass.connection.substitute_at(column)
-
bind_values.push [column, value]
-
constraint = constraint.and table[reflection.type].eq substitute
-
end
-
-
346
joins << table.create_join(table, table.create_on(constraint), join_type)
-
-
# The current table in this iteration becomes the foreign table in the next
-
346
foreign_table, foreign_klass = table, klass
-
end
-
-
346
JoinInformation.new joins, bind_values
-
end
-
-
# Builds equality condition.
-
#
-
# Example:
-
#
-
# class Physician < ActiveRecord::Base
-
# has_many :appointments
-
# end
-
#
-
# If I execute `Physician.joins(:appointments).to_a` then
-
# klass # => Physician
-
# table # => #<Arel::Table @name="appointments" ...>
-
# key # => physician_id
-
# foreign_table # => #<Arel::Table @name="physicians" ...>
-
# foreign_key # => id
-
#
-
1
def build_constraint(klass, table, key, foreign_table, foreign_key)
-
346
constraint = table[key].eq(foreign_table[foreign_key])
-
-
346
if klass.finder_needs_type_condition?
-
constraint = table.create_and([
-
constraint,
-
klass.send(:type_condition, table)
-
])
-
end
-
-
346
constraint
-
end
-
-
1
def table
-
tables.first
-
end
-
-
1
def aliased_table_name
-
table.table_alias || table.name
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_record/associations/join_dependency/join_part'
-
-
1
module ActiveRecord
-
1
module Associations
-
1
class JoinDependency # :nodoc:
-
1
class JoinBase < JoinPart # :nodoc:
-
1
def match?(other)
-
447
return true if self == other
-
447
super && base_klass == other.base_klass
-
end
-
-
1
def table
-
346
base_klass.arel_table
-
end
-
-
1
def aliased_table_name
-
base_klass.table_name
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class JoinDependency # :nodoc:
-
# A JoinPart represents a part of a JoinDependency. It is inherited
-
# by JoinBase and JoinAssociation. A JoinBase represents the Active Record which
-
# everything else is being joined onto. A JoinAssociation represents an association which
-
# is joining to the base. A JoinAssociation may result in more than one actual join
-
# operations (for example a has_and_belongs_to_many JoinAssociation would result in
-
# two; one for the join table and one for the target table).
-
1
class JoinPart # :nodoc:
-
1
include Enumerable
-
-
# The Active Record class which this join part is associated 'about'; for a JoinBase
-
# this is the actual base model, for a JoinAssociation this is the target model of the
-
# association.
-
1
attr_reader :base_klass, :children
-
-
1
delegate :table_name, :column_names, :primary_key, :to => :base_klass
-
-
1
def initialize(base_klass, children)
-
1270
@base_klass = base_klass
-
1270
@children = children
-
end
-
-
1
def name
-
reflection.name
-
end
-
-
1
def match?(other)
-
447
self.class == other.class
-
end
-
-
1
def each(&block)
-
789
yield self
-
1131
children.each { |child| child.each(&block) }
-
end
-
-
# An Arel::Table for the active_record
-
1
def table
-
raise NotImplementedError
-
end
-
-
# The alias for the active_record's table
-
1
def aliased_table_name
-
raise NotImplementedError
-
end
-
-
1
def extract_record(row, column_names_with_alias)
-
# This code is performance critical as it is called per row.
-
# see: https://github.com/rails/rails/pull/12185
-
hash = {}
-
-
index = 0
-
length = column_names_with_alias.length
-
-
while index < length
-
column_name, alias_name = column_names_with_alias[index]
-
hash[column_name] = row[alias_name]
-
index += 1
-
end
-
-
hash
-
end
-
-
1
def instantiate(row, aliases)
-
base_klass.instantiate(extract_record(row, aliases))
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
# Implements the details of eager loading of Active Record associations.
-
#
-
# Suppose that you have the following two Active Record models:
-
#
-
# class Author < ActiveRecord::Base
-
# # columns: name, age
-
# has_many :books
-
# end
-
#
-
# class Book < ActiveRecord::Base
-
# # columns: title, sales, author_id
-
# end
-
#
-
# When you load an author with all associated books Active Record will make
-
# multiple queries like this:
-
#
-
# Author.includes(:books).where(name: ['bell hooks', 'Homer']).to_a
-
#
-
# => SELECT `authors`.* FROM `authors` WHERE `name` IN ('bell hooks', 'Homer')
-
# => SELECT `books`.* FROM `books` WHERE `author_id` IN (2, 5)
-
#
-
# Active Record saves the ids of the records from the first query to use in
-
# the second. Depending on the number of associations involved there can be
-
# arbitrarily many SQL queries made.
-
#
-
# However, if there is a WHERE clause that spans across tables Active
-
# Record will fall back to a slightly more resource-intensive single query:
-
#
-
# Author.includes(:books).where(books: {title: 'Illiad'}).to_a
-
# => SELECT `authors`.`id` AS t0_r0, `authors`.`name` AS t0_r1, `authors`.`age` AS t0_r2,
-
# `books`.`id` AS t1_r0, `books`.`title` AS t1_r1, `books`.`sales` AS t1_r2
-
# FROM `authors`
-
# LEFT OUTER JOIN `books` ON `authors`.`id` = `books`.`author_id`
-
# WHERE `books`.`title` = 'Illiad'
-
#
-
# This could result in many rows that contain redundant data and it performs poorly at scale
-
# and is therefore only used when necessary.
-
#
-
1
class Preloader #:nodoc:
-
1
extend ActiveSupport::Autoload
-
-
1
eager_autoload do
-
1
autoload :Association, 'active_record/associations/preloader/association'
-
1
autoload :SingularAssociation, 'active_record/associations/preloader/singular_association'
-
1
autoload :CollectionAssociation, 'active_record/associations/preloader/collection_association'
-
1
autoload :ThroughAssociation, 'active_record/associations/preloader/through_association'
-
-
1
autoload :HasMany, 'active_record/associations/preloader/has_many'
-
1
autoload :HasManyThrough, 'active_record/associations/preloader/has_many_through'
-
1
autoload :HasOne, 'active_record/associations/preloader/has_one'
-
1
autoload :HasOneThrough, 'active_record/associations/preloader/has_one_through'
-
1
autoload :BelongsTo, 'active_record/associations/preloader/belongs_to'
-
end
-
-
# Eager loads the named associations for the given Active Record record(s).
-
#
-
# In this description, 'association name' shall refer to the name passed
-
# to an association creation method. For example, a model that specifies
-
# <tt>belongs_to :author</tt>, <tt>has_many :buyers</tt> has association
-
# names +:author+ and +:buyers+.
-
#
-
# == Parameters
-
# +records+ is an array of ActiveRecord::Base. This array needs not be flat,
-
# i.e. +records+ itself may also contain arrays of records. In any case,
-
# +preload_associations+ will preload the all associations records by
-
# flattening +records+.
-
#
-
# +associations+ specifies one or more associations that you want to
-
# preload. It may be:
-
# - a Symbol or a String which specifies a single association name. For
-
# example, specifying +:books+ allows this method to preload all books
-
# for an Author.
-
# - an Array which specifies multiple association names. This array
-
# is processed recursively. For example, specifying <tt>[:avatar, :books]</tt>
-
# allows this method to preload an author's avatar as well as all of his
-
# books.
-
# - a Hash which specifies multiple association names, as well as
-
# association names for the to-be-preloaded association objects. For
-
# example, specifying <tt>{ author: :avatar }</tt> will preload a
-
# book's author, as well as that author's avatar.
-
#
-
# +:associations+ has the same format as the +:include+ option for
-
# <tt>ActiveRecord::Base.find</tt>. So +associations+ could look like this:
-
#
-
# :books
-
# [ :books, :author ]
-
# { author: :avatar }
-
# [ :books, { author: :avatar } ]
-
-
1
NULL_RELATION = Struct.new(:values, :bind_values).new({}, [])
-
-
1
def preload(records, associations, preload_scope = nil)
-
106
records = Array.wrap(records).compact.uniq
-
106
associations = Array.wrap(associations)
-
106
preload_scope = preload_scope || NULL_RELATION
-
-
106
if records.empty?
-
22
[]
-
else
-
84
associations.flat_map { |association|
-
84
preloaders_on association, records, preload_scope
-
}
-
end
-
end
-
-
1
private
-
-
1
def preloaders_on(association, records, scope)
-
84
case association
-
when Hash
-
preloaders_for_hash(association, records, scope)
-
when Symbol
-
84
preloaders_for_one(association, records, scope)
-
when String
-
preloaders_for_one(association.to_sym, records, scope)
-
else
-
raise ArgumentError, "#{association.inspect} was not recognised for preload"
-
end
-
end
-
-
1
def preloaders_for_hash(association, records, scope)
-
association.flat_map { |parent, child|
-
loaders = preloaders_for_one parent, records, scope
-
-
recs = loaders.flat_map(&:preloaded_records).uniq
-
loaders.concat Array.wrap(child).flat_map { |assoc|
-
preloaders_on assoc, recs, scope
-
}
-
loaders
-
}
-
end
-
-
# Not all records have the same class, so group then preload group on the reflection
-
# itself so that if various subclass share the same association then we do not split
-
# them unnecessarily
-
#
-
# Additionally, polymorphic belongs_to associations can have multiple associated
-
# classes, depending on the polymorphic_type field. So we group by the classes as
-
# well.
-
1
def preloaders_for_one(association, records, scope)
-
84
grouped_records(association, records).flat_map do |reflection, klasses|
-
84
klasses.map do |rhs_klass, rs|
-
84
loader = preloader_for(reflection, rs, rhs_klass).new(rhs_klass, rs, reflection, scope)
-
84
loader.run self
-
84
loader
-
end
-
end
-
end
-
-
1
def grouped_records(association, records)
-
84
h = {}
-
84
records.each do |record|
-
104
next unless record
-
104
assoc = record.association(association)
-
104
klasses = h[assoc.reflection] ||= {}
-
104
(klasses[assoc.klass] ||= []) << record
-
end
-
84
h
-
end
-
-
1
class AlreadyLoaded # :nodoc:
-
1
attr_reader :owners, :reflection
-
-
1
def initialize(klass, owners, reflection, preload_scope)
-
@owners = owners
-
@reflection = reflection
-
end
-
-
1
def run(preloader); end
-
-
1
def preloaded_records
-
owners.flat_map { |owner| owner.association(reflection.name).target }
-
end
-
end
-
-
1
class NullPreloader # :nodoc:
-
1
def self.new(klass, owners, reflection, preload_scope); self; end
-
1
def self.run(preloader); end
-
1
def self.preloaded_records; []; end
-
end
-
-
1
def preloader_for(reflection, owners, rhs_klass)
-
84
return NullPreloader unless rhs_klass
-
-
84
if owners.first.association(reflection.name).loaded?
-
return AlreadyLoaded
-
end
-
84
reflection.check_preloadable!
-
-
84
case reflection.macro
-
when :has_many
-
reflection.options[:through] ? HasManyThrough : HasMany
-
when :has_one
-
reflection.options[:through] ? HasOneThrough : HasOne
-
when :belongs_to
-
84
BelongsTo
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class Preloader
-
1
class Association #:nodoc:
-
1
attr_reader :owners, :reflection, :preload_scope, :model, :klass
-
1
attr_reader :preloaded_records
-
-
1
def initialize(klass, owners, reflection, preload_scope)
-
84
@klass = klass
-
84
@owners = owners
-
84
@reflection = reflection
-
84
@preload_scope = preload_scope
-
84
@model = owners.first && owners.first.class
-
84
@scope = nil
-
84
@owners_by_key = nil
-
84
@preloaded_records = []
-
end
-
-
1
def run(preloader)
-
84
preload(preloader)
-
end
-
-
1
def preload(preloader)
-
raise NotImplementedError
-
end
-
-
1
def scope
-
78
@scope ||= build_scope
-
end
-
-
1
def records_for(ids)
-
78
query_scope(ids)
-
end
-
-
1
def query_scope(ids)
-
78
scope.where(association_key.in(ids))
-
end
-
-
1
def table
-
156
klass.arel_table
-
end
-
-
# The name of the key on the associated records
-
1
def association_key_name
-
raise NotImplementedError
-
end
-
-
# This is overridden by HABTM as the condition should be on the foreign_key column in
-
# the join table
-
1
def association_key
-
78
table[association_key_name]
-
end
-
-
# The name of the key on the model which declares the association
-
1
def owner_key_name
-
raise NotImplementedError
-
end
-
-
1
def owners_by_key
-
@owners_by_key ||= if key_conversion_required?
-
owners.group_by do |owner|
-
owner[owner_key_name].to_s
-
end
-
else
-
84
owners.group_by do |owner|
-
104
owner[owner_key_name]
-
end
-
84
end
-
end
-
-
1
def options
-
78
reflection.options
-
end
-
-
1
private
-
-
1
def associated_records_by_owner(preloader)
-
84
owners_map = owners_by_key
-
84
owner_keys = owners_map.keys.compact
-
-
# Each record may have multiple owners, and vice-versa
-
84
records_by_owner = owners.each_with_object({}) do |owner,h|
-
104
h[owner] = []
-
end
-
-
84
if owner_keys.any?
-
# Some databases impose a limit on the number of ids in a list (in Oracle it's 1000)
-
# Make several smaller queries if necessary or make one query if the adapter supports it
-
78
sliced = owner_keys.each_slice(klass.connection.in_clause_length || owner_keys.size)
-
-
78
records = load_slices sliced
-
78
records.each do |record, owner_key|
-
84
owners_map[owner_key].each do |owner|
-
84
records_by_owner[owner] << record
-
end
-
end
-
end
-
-
84
records_by_owner
-
end
-
-
1
def key_conversion_required?
-
168
association_key_type != owner_key_type
-
end
-
-
1
def association_key_type
-
168
@klass.type_for_attribute(association_key_name.to_s).type
-
end
-
-
1
def owner_key_type
-
168
@model.type_for_attribute(owner_key_name.to_s).type
-
end
-
-
1
def load_slices(slices)
-
78
@preloaded_records = slices.flat_map { |slice|
-
78
records_for(slice)
-
}
-
-
78
@preloaded_records.map { |record|
-
84
key = record[association_key_name]
-
84
key = key.to_s if key_conversion_required?
-
-
84
[record, key]
-
}
-
end
-
-
1
def reflection_scope
-
156
@reflection_scope ||= reflection.scope ? klass.unscoped.instance_exec(nil, &reflection.scope) : klass.unscoped
-
end
-
-
1
def build_scope
-
78
scope = klass.unscoped
-
-
78
values = reflection_scope.values
-
78
reflection_binds = reflection_scope.bind_values
-
78
preload_values = preload_scope.values
-
78
preload_binds = preload_scope.bind_values
-
-
78
scope.where_values = Array(values[:where]) + Array(preload_values[:where])
-
78
scope.references_values = Array(values[:references]) + Array(preload_values[:references])
-
78
scope.bind_values = (reflection_binds + preload_binds)
-
-
78
scope._select! preload_values[:select] || values[:select] || table[Arel.star]
-
78
scope.includes! preload_values[:includes] || values[:includes]
-
78
scope.joins! preload_values[:joins] || values[:joins]
-
78
scope.order! preload_values[:order] || values[:order]
-
-
78
if preload_values[:reordering] || values[:reordering]
-
scope.reordering_value = true
-
end
-
-
78
if preload_values[:readonly] || values[:readonly]
-
scope.readonly!
-
end
-
-
78
if options[:as]
-
scope.where!(klass.table_name => { reflection.type => model.base_class.sti_name })
-
end
-
-
78
scope.unscope_values = Array(values[:unscope]) + Array(preload_values[:unscope])
-
78
klass.default_scoped.merge(scope)
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class Preloader
-
1
class BelongsTo < SingularAssociation #:nodoc:
-
-
1
def association_key_name
-
330
reflection.options[:primary_key] || klass && klass.primary_key
-
end
-
-
1
def owner_key_name
-
272
reflection.foreign_key
-
end
-
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class Preloader
-
1
class SingularAssociation < Association #:nodoc:
-
-
1
private
-
-
1
def preload(preloader)
-
84
associated_records_by_owner(preloader).each do |owner, associated_records|
-
104
record = associated_records.first
-
-
104
association = owner.association(reflection.name)
-
104
association.target = record
-
104
association.set_inverse_instance(record) if record
-
end
-
end
-
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module Associations
-
1
class SingularAssociation < Association #:nodoc:
-
# Implements the reader method, e.g. foo.bar for Foo.has_one :bar
-
1
def reader(force_reload = false)
-
1425
if force_reload && klass
-
klass.uncached { reload }
-
elsif !loaded? || stale_target?
-
275
reload
-
end
-
-
1425
target
-
end
-
-
# Implements the writer method, e.g. foo.bar= for Foo.belongs_to :bar
-
1
def writer(record)
-
141
replace(record)
-
end
-
-
1
def create(attributes = {}, &block)
-
35
_create_record(attributes, &block)
-
end
-
-
1
def create!(attributes = {}, &block)
-
_create_record(attributes, true, &block)
-
end
-
-
1
def build(attributes = {})
-
record = build_record(attributes)
-
yield(record) if block_given?
-
set_new_record(record)
-
record
-
end
-
-
1
private
-
-
1
def create_scope
-
35
scope.scope_for_create.stringify_keys.except(klass.primary_key)
-
end
-
-
1
def get_records
-
282
return scope.limit(1).to_a if skip_statement_cache?
-
-
155
conn = klass.connection
-
155
sc = reflection.association_scope_cache(conn, owner) do
-
15
StatementCache.create(conn) { |params|
-
30
as = AssociationScope.create { params.bind }
-
15
target_scope.merge(as.scope(self, conn)).limit(1)
-
}
-
end
-
-
155
binds = AssociationScope.get_bind_values(owner, reflection.chain)
-
155
sc.execute binds, klass, klass.connection
-
end
-
-
1
def find_target
-
282
if record = get_records.first
-
264
set_inverse_instance record
-
end
-
end
-
-
1
def replace(record)
-
raise NotImplementedError, "Subclasses must implement a replace(record) method"
-
end
-
-
1
def set_new_record(record)
-
replace(record)
-
end
-
-
1
def _create_record(attributes, raise_error = false)
-
35
record = build_record(attributes)
-
35
yield(record) if block_given?
-
35
saved = record.save
-
35
set_new_record(record)
-
35
raise RecordInvalid.new(record) if !saved && raise_error
-
35
record
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
# = Active Record Through Association
-
1
module Associations
-
1
module ThroughAssociation #:nodoc:
-
-
1
delegate :source_reflection, :through_reflection, :to => :reflection
-
-
1
protected
-
-
# We merge in these scopes for two reasons:
-
#
-
# 1. To get the default_scope conditions for any of the other reflections in the chain
-
# 2. To get the type conditions for any STI models in the chain
-
1
def target_scope
-
62
scope = super
-
62
reflection.chain.drop(1).each do |reflection|
-
62
relation = reflection.klass.all
-
62
scope.merge!(
-
relation.except(:select, :create_with, :includes, :preload, :joins, :eager_load)
-
)
-
end
-
62
scope
-
end
-
-
1
private
-
-
# Construct attributes for :through pointing to owner and associate. This is used by the
-
# methods which create and delete records on the association.
-
#
-
# We only support indirectly modifying through associations which has a belongs_to source.
-
# This is the "has_many :tags, through: :taggings" situation, where the join model
-
# typically has a belongs_to on both side. In other words, associations which could also
-
# be represented as has_and_belongs_to_many associations.
-
#
-
# We do not support creating/deleting records on the association where the source has
-
# some other type, because this opens up a whole can of worms, and in basically any
-
# situation it is more natural for the user to just create or modify their join records
-
# directly as required.
-
1
def construct_join_attributes(*records)
-
ensure_mutable
-
-
if source_reflection.association_primary_key(reflection.klass) == reflection.klass.primary_key
-
join_attributes = { source_reflection.name => records }
-
else
-
join_attributes = {
-
source_reflection.foreign_key =>
-
records.map { |record|
-
record.send(source_reflection.association_primary_key(reflection.klass))
-
}
-
}
-
end
-
-
if options[:source_type]
-
join_attributes[source_reflection.foreign_type] =
-
records.map { |record| record.class.base_class.name }
-
end
-
-
if records.count == 1
-
Hash[join_attributes.map { |k, v| [k, v.first] }]
-
else
-
join_attributes
-
end
-
end
-
-
# Note: this does not capture all cases, for example it would be crazy to try to
-
# properly support stale-checking for nested associations.
-
1
def stale_state
-
28
if through_reflection.belongs_to?
-
owner[through_reflection.foreign_key] && owner[through_reflection.foreign_key].to_s
-
end
-
end
-
-
1
def foreign_key_present?
-
13
through_reflection.belongs_to? && !owner[through_reflection.foreign_key].nil?
-
end
-
-
1
def ensure_mutable
-
3
unless source_reflection.belongs_to?
-
raise HasManyThroughCantAssociateThroughHasOneOrManyReflection.new(owner, reflection)
-
end
-
end
-
-
1
def ensure_not_nested
-
6
if reflection.nested?
-
raise HasManyThroughNestedAssociationsAreReadonly.new(owner, reflection)
-
end
-
end
-
-
1
def build_record(attributes)
-
inverse = source_reflection.inverse_of
-
target = through_association.target
-
-
if inverse && target && !target.is_a?(Array)
-
attributes[inverse.foreign_key] = target.id
-
end
-
-
super(attributes)
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module ConnectionAdapters
-
1
class TransactionState
-
1
attr_reader :parent
-
-
1
VALID_STATES = Set.new([:committed, :rolledback, nil])
-
-
1
def initialize(state = nil)
-
662
@state = state
-
662
@parent = nil
-
end
-
-
1
def finalized?
-
811
@state
-
end
-
-
1
def committed?
-
223
@state == :committed
-
end
-
-
1
def rolledback?
-
66
@state == :rolledback
-
end
-
-
1
def completed?
-
committed? || rolledback?
-
end
-
-
1
def set_state(state)
-
662
if !VALID_STATES.include?(state)
-
raise ArgumentError, "Invalid transaction state: #{state}"
-
end
-
662
@state = state
-
end
-
end
-
-
1
class NullTransaction #:nodoc:
-
1
def initialize; end
-
1
def closed?; true; end
-
1
def open?; false; end
-
1
def joinable?; false; end
-
1
def add_record(record); end
-
end
-
-
1
class Transaction #:nodoc:
-
-
1
attr_reader :connection, :state, :records, :savepoint_name
-
1
attr_writer :joinable
-
-
1
def initialize(connection, options)
-
662
@connection = connection
-
662
@state = TransactionState.new
-
662
@records = []
-
662
@joinable = options.fetch(:joinable, true)
-
end
-
-
1
def add_record(record)
-
62
records << record
-
end
-
-
1
def rollback
-
497
@state.set_state(:rolledback)
-
end
-
-
1
def rollback_records
-
497
ite = records.uniq
-
497
while record = ite.shift
-
31
begin
-
31
record.rolledback! full_rollback?
-
rescue => e
-
raise if ActiveRecord::Base.raise_in_transactional_callbacks
-
record.logger.error(e) if record.respond_to?(:logger) && record.logger
-
end
-
end
-
ensure
-
497
ite.each do |i|
-
i.rolledback!(full_rollback?, false)
-
end
-
end
-
-
1
def commit
-
165
@state.set_state(:committed)
-
end
-
-
1
def commit_records
-
1
ite = records.uniq
-
1
while record = ite.shift
-
begin
-
record.committed!
-
rescue => e
-
raise if ActiveRecord::Base.raise_in_transactional_callbacks
-
record.logger.error(e) if record.respond_to?(:logger) && record.logger
-
end
-
end
-
ensure
-
1
ite.each do |i|
-
i.committed!(false)
-
end
-
end
-
-
32
def full_rollback?; true; end
-
317
def joinable?; @joinable; end
-
491
def closed?; false; end
-
491
def open?; !closed?; end
-
end
-
-
1
class SavepointTransaction < Transaction
-
-
1
def initialize(connection, savepoint_name, options)
-
171
super(connection, options)
-
171
if options[:isolation]
-
raise ActiveRecord::TransactionIsolationError, "cannot set transaction isolation in a nested transaction"
-
end
-
171
connection.create_savepoint(@savepoint_name = savepoint_name)
-
end
-
-
1
def rollback
-
7
connection.rollback_to_savepoint(savepoint_name)
-
7
super
-
7
rollback_records
-
end
-
-
1
def commit
-
164
connection.release_savepoint(savepoint_name)
-
164
super
-
164
parent = connection.transaction_manager.current_transaction
-
195
records.each { |r| parent.add_record(r) }
-
end
-
-
1
def full_rollback?; false; end
-
end
-
-
1
class RealTransaction < Transaction
-
-
1
def initialize(connection, options)
-
491
super
-
491
if options[:isolation]
-
connection.begin_isolated_db_transaction(options[:isolation])
-
else
-
491
connection.begin_db_transaction
-
end
-
end
-
-
1
def rollback
-
490
connection.rollback_db_transaction
-
490
super
-
490
rollback_records
-
end
-
-
1
def commit
-
1
connection.commit_db_transaction
-
1
super
-
1
commit_records
-
end
-
end
-
-
1
class TransactionManager #:nodoc:
-
1
def initialize(connection)
-
1
@stack = []
-
1
@connection = connection
-
end
-
-
1
def begin_transaction(options = {})
-
662
transaction =
-
if @stack.empty?
-
491
RealTransaction.new(@connection, options)
-
else
-
171
SavepointTransaction.new(@connection, "active_record_#{@stack.size}", options)
-
end
-
662
@stack.push(transaction)
-
662
transaction
-
end
-
-
1
def commit_transaction
-
165
@stack.pop.commit
-
end
-
-
1
def rollback_transaction
-
497
@stack.pop.rollback
-
end
-
-
1
def within_new_transaction(options = {})
-
172
transaction = begin_transaction options
-
172
yield
-
rescue Exception => error
-
7
rollback_transaction if transaction
-
7
raise
-
ensure
-
172
unless error
-
165
if Thread.current.status == 'aborting'
-
rollback_transaction if transaction
-
else
-
165
begin
-
165
commit_transaction
-
rescue Exception
-
transaction.rollback unless transaction.state.completed?
-
raise
-
end
-
end
-
end
-
end
-
-
1
def open_transactions
-
@stack.size
-
end
-
-
1
def current_transaction
-
1224
@stack.last || NULL_TRANSACTION
-
end
-
-
1
private
-
1
NULL_TRANSACTION = NullTransaction.new
-
end
-
end
-
end
-
1
require 'erb'
-
1
require 'yaml'
-
-
1
module ActiveRecord
-
1
class FixtureSet
-
1
class File # :nodoc:
-
1
include Enumerable
-
-
##
-
# Open a fixture file named +file+. When called with a block, the block
-
# is called with the filehandle and the filehandle is automatically closed
-
# when the block finishes.
-
1
def self.open(file)
-
19
x = new file
-
19
block_given? ? yield(x) : x
-
end
-
-
1
def initialize(file)
-
19
@file = file
-
19
@rows = nil
-
end
-
-
1
def each(&block)
-
19
rows.each(&block)
-
end
-
-
-
1
private
-
1
def rows
-
19
return @rows if @rows
-
-
19
begin
-
19
data = YAML.load(render(IO.read(@file)))
-
rescue ArgumentError, Psych::SyntaxError => error
-
raise Fixture::FormatError, "a YAML error occurred parsing #{@file}. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html\nThe exact error was:\n #{error.class}: #{error}", error.backtrace
-
end
-
19
@rows = data ? validate(data).to_a : []
-
end
-
-
1
def render(content)
-
19
context = ActiveRecord::FixtureSet::RenderContext.create_subclass.new
-
19
ERB.new(content).result(context.get_binding)
-
end
-
-
# Validate our unmarshalled data.
-
1
def validate(data)
-
19
unless Hash === data || YAML::Omap === data
-
raise Fixture::FormatError, 'fixture is not a hash'
-
end
-
-
62
raise Fixture::FormatError unless data.all? { |name, row| Hash === row }
-
19
data
-
end
-
end
-
end
-
end
-
1
require 'erb'
-
1
require 'yaml'
-
1
require 'zlib'
-
1
require 'active_support/dependencies'
-
1
require 'active_support/core_ext/digest/uuid'
-
1
require 'active_record/fixture_set/file'
-
1
require 'active_record/errors'
-
-
1
module ActiveRecord
-
1
class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
-
end
-
-
# \Fixtures are a way of organizing data that you want to test against; in short, sample data.
-
#
-
# They are stored in YAML files, one file per model, which are placed in the directory
-
# appointed by <tt>ActiveSupport::TestCase.fixture_path=(path)</tt> (this is automatically
-
# configured for Rails, so you can just put your files in <tt><your-rails-app>/test/fixtures/</tt>).
-
# The fixture file ends with the +.yml+ file extension, for example:
-
# <tt><your-rails-app>/test/fixtures/web_sites.yml</tt>).
-
#
-
# The format of a fixture file looks like this:
-
#
-
# rubyonrails:
-
# id: 1
-
# name: Ruby on Rails
-
# url: http://www.rubyonrails.org
-
#
-
# google:
-
# id: 2
-
# name: Google
-
# url: http://www.google.com
-
#
-
# This fixture file includes two fixtures. Each YAML fixture (ie. record) is given a name and
-
# is followed by an indented list of key/value pairs in the "key: value" format. Records are
-
# separated by a blank line for your viewing pleasure.
-
#
-
# Note: Fixtures are unordered. If you want ordered fixtures, use the omap YAML type.
-
# See http://yaml.org/type/omap.html
-
# for the specification. You will need ordered fixtures when you have foreign key constraints
-
# on keys in the same table. This is commonly needed for tree structures. Example:
-
#
-
# --- !omap
-
# - parent:
-
# id: 1
-
# parent_id: NULL
-
# title: Parent
-
# - child:
-
# id: 2
-
# parent_id: 1
-
# title: Child
-
#
-
# = Using Fixtures in Test Cases
-
#
-
# Since fixtures are a testing construct, we use them in our unit and functional tests. There
-
# are two ways to use the fixtures, but first let's take a look at a sample unit test:
-
#
-
# require 'test_helper'
-
#
-
# class WebSiteTest < ActiveSupport::TestCase
-
# test "web_site_count" do
-
# assert_equal 2, WebSite.count
-
# end
-
# end
-
#
-
# By default, +test_helper.rb+ will load all of your fixtures into your test
-
# database, so this test will succeed.
-
#
-
# The testing environment will automatically load the all fixtures into the database before each
-
# test. To ensure consistent data, the environment deletes the fixtures before running the load.
-
#
-
# In addition to being available in the database, the fixture's data may also be accessed by
-
# using a special dynamic method, which has the same name as the model, and accepts the
-
# name of the fixture to instantiate:
-
#
-
# test "find" do
-
# assert_equal "Ruby on Rails", web_sites(:rubyonrails).name
-
# end
-
#
-
# Alternatively, you may enable auto-instantiation of the fixture data. For instance, take the
-
# following tests:
-
#
-
# test "find_alt_method_1" do
-
# assert_equal "Ruby on Rails", @web_sites['rubyonrails']['name']
-
# end
-
#
-
# test "find_alt_method_2" do
-
# assert_equal "Ruby on Rails", @rubyonrails.name
-
# end
-
#
-
# In order to use these methods to access fixtured data within your testcases, you must specify one of the
-
# following in your <tt>ActiveSupport::TestCase</tt>-derived class:
-
#
-
# - to fully enable instantiated fixtures (enable alternate methods #1 and #2 above)
-
# self.use_instantiated_fixtures = true
-
#
-
# - create only the hash for the fixtures, do not 'find' each instance (enable alternate method #1 only)
-
# self.use_instantiated_fixtures = :no_instances
-
#
-
# Using either of these alternate methods incurs a performance hit, as the fixtured data must be fully
-
# traversed in the database to create the fixture hash and/or instance variables. This is expensive for
-
# large sets of fixtured data.
-
#
-
# = Dynamic fixtures with ERB
-
#
-
# Some times you don't care about the content of the fixtures as much as you care about the volume.
-
# In these cases, you can mix ERB in with your YAML fixtures to create a bunch of fixtures for load
-
# testing, like:
-
#
-
# <% 1.upto(1000) do |i| %>
-
# fix_<%= i %>:
-
# id: <%= i %>
-
# name: guy_<%= 1 %>
-
# <% end %>
-
#
-
# This will create 1000 very simple fixtures.
-
#
-
# Using ERB, you can also inject dynamic values into your fixtures with inserts like
-
# <tt><%= Date.today.strftime("%Y-%m-%d") %></tt>.
-
# This is however a feature to be used with some caution. The point of fixtures are that they're
-
# stable units of predictable sample data. If you feel that you need to inject dynamic values, then
-
# perhaps you should reexamine whether your application is properly testable. Hence, dynamic values
-
# in fixtures are to be considered a code smell.
-
#
-
# Helper methods defined in a fixture will not be available in other fixtures, to prevent against
-
# unwanted inter-test dependencies. Methods used by multiple fixtures should be defined in a module
-
# that is included in <tt>ActiveRecord::FixtureSet.context_class</tt>.
-
#
-
# - define a helper method in `test_helper.rb`
-
# module FixtureFileHelpers
-
# def file_sha(path)
-
# Digest::SHA2.hexdigest(File.read(Rails.root.join('test/fixtures', path)))
-
# end
-
# end
-
# ActiveRecord::FixtureSet.context_class.send :include, FixtureFileHelpers
-
#
-
# - use the helper method in a fixture
-
# photo:
-
# name: kitten.png
-
# sha: <%= file_sha 'files/kitten.png' %>
-
#
-
# = Transactional Fixtures
-
#
-
# Test cases can use begin+rollback to isolate their changes to the database instead of having to
-
# delete+insert for every test case.
-
#
-
# class FooTest < ActiveSupport::TestCase
-
# self.use_transactional_fixtures = true
-
#
-
# test "godzilla" do
-
# assert !Foo.all.empty?
-
# Foo.destroy_all
-
# assert Foo.all.empty?
-
# end
-
#
-
# test "godzilla aftermath" do
-
# assert !Foo.all.empty?
-
# end
-
# end
-
#
-
# If you preload your test database with all fixture data (probably in the rake task) and use
-
# transactional fixtures, then you may omit all fixtures declarations in your test cases since
-
# all the data's already there and every case rolls back its changes.
-
#
-
# In order to use instantiated fixtures with preloaded data, set +self.pre_loaded_fixtures+ to
-
# true. This will provide access to fixture data for every table that has been loaded through
-
# fixtures (depending on the value of +use_instantiated_fixtures+).
-
#
-
# When *not* to use transactional fixtures:
-
#
-
# 1. You're testing whether a transaction works correctly. Nested transactions don't commit until
-
# all parent transactions commit, particularly, the fixtures transaction which is begun in setup
-
# and rolled back in teardown. Thus, you won't be able to verify
-
# the results of your transaction until Active Record supports nested transactions or savepoints (in progress).
-
# 2. Your database does not support transactions. Every Active Record database supports transactions except MySQL MyISAM.
-
# Use InnoDB, MaxDB, or NDB instead.
-
#
-
# = Advanced Fixtures
-
#
-
# Fixtures that don't specify an ID get some extra features:
-
#
-
# * Stable, autogenerated IDs
-
# * Label references for associations (belongs_to, has_one, has_many)
-
# * HABTM associations as inline lists
-
#
-
# There are some more advanced features available even if the id is specified:
-
#
-
# * Autofilled timestamp columns
-
# * Fixture label interpolation
-
# * Support for YAML defaults
-
#
-
# == Stable, Autogenerated IDs
-
#
-
# Here, have a monkey fixture:
-
#
-
# george:
-
# id: 1
-
# name: George the Monkey
-
#
-
# reginald:
-
# id: 2
-
# name: Reginald the Pirate
-
#
-
# Each of these fixtures has two unique identifiers: one for the database
-
# and one for the humans. Why don't we generate the primary key instead?
-
# Hashing each fixture's label yields a consistent ID:
-
#
-
# george: # generated id: 503576764
-
# name: George the Monkey
-
#
-
# reginald: # generated id: 324201669
-
# name: Reginald the Pirate
-
#
-
# Active Record looks at the fixture's model class, discovers the correct
-
# primary key, and generates it right before inserting the fixture
-
# into the database.
-
#
-
# The generated ID for a given label is constant, so we can discover
-
# any fixture's ID without loading anything, as long as we know the label.
-
#
-
# == Label references for associations (belongs_to, has_one, has_many)
-
#
-
# Specifying foreign keys in fixtures can be very fragile, not to
-
# mention difficult to read. Since Active Record can figure out the ID of
-
# any fixture from its label, you can specify FK's by label instead of ID.
-
#
-
# === belongs_to
-
#
-
# Let's break out some more monkeys and pirates.
-
#
-
# ### in pirates.yml
-
#
-
# reginald:
-
# id: 1
-
# name: Reginald the Pirate
-
# monkey_id: 1
-
#
-
# ### in monkeys.yml
-
#
-
# george:
-
# id: 1
-
# name: George the Monkey
-
# pirate_id: 1
-
#
-
# Add a few more monkeys and pirates and break this into multiple files,
-
# and it gets pretty hard to keep track of what's going on. Let's
-
# use labels instead of IDs:
-
#
-
# ### in pirates.yml
-
#
-
# reginald:
-
# name: Reginald the Pirate
-
# monkey: george
-
#
-
# ### in monkeys.yml
-
#
-
# george:
-
# name: George the Monkey
-
# pirate: reginald
-
#
-
# Pow! All is made clear. Active Record reflects on the fixture's model class,
-
# finds all the +belongs_to+ associations, and allows you to specify
-
# a target *label* for the *association* (monkey: george) rather than
-
# a target *id* for the *FK* (<tt>monkey_id: 1</tt>).
-
#
-
# ==== Polymorphic belongs_to
-
#
-
# Supporting polymorphic relationships is a little bit more complicated, since
-
# Active Record needs to know what type your association is pointing at. Something
-
# like this should look familiar:
-
#
-
# ### in fruit.rb
-
#
-
# belongs_to :eater, polymorphic: true
-
#
-
# ### in fruits.yml
-
#
-
# apple:
-
# id: 1
-
# name: apple
-
# eater_id: 1
-
# eater_type: Monkey
-
#
-
# Can we do better? You bet!
-
#
-
# apple:
-
# eater: george (Monkey)
-
#
-
# Just provide the polymorphic target type and Active Record will take care of the rest.
-
#
-
# === has_and_belongs_to_many
-
#
-
# Time to give our monkey some fruit.
-
#
-
# ### in monkeys.yml
-
#
-
# george:
-
# id: 1
-
# name: George the Monkey
-
#
-
# ### in fruits.yml
-
#
-
# apple:
-
# id: 1
-
# name: apple
-
#
-
# orange:
-
# id: 2
-
# name: orange
-
#
-
# grape:
-
# id: 3
-
# name: grape
-
#
-
# ### in fruits_monkeys.yml
-
#
-
# apple_george:
-
# fruit_id: 1
-
# monkey_id: 1
-
#
-
# orange_george:
-
# fruit_id: 2
-
# monkey_id: 1
-
#
-
# grape_george:
-
# fruit_id: 3
-
# monkey_id: 1
-
#
-
# Let's make the HABTM fixture go away.
-
#
-
# ### in monkeys.yml
-
#
-
# george:
-
# id: 1
-
# name: George the Monkey
-
# fruits: apple, orange, grape
-
#
-
# ### in fruits.yml
-
#
-
# apple:
-
# name: apple
-
#
-
# orange:
-
# name: orange
-
#
-
# grape:
-
# name: grape
-
#
-
# Zap! No more fruits_monkeys.yml file. We've specified the list of fruits
-
# on George's fixture, but we could've just as easily specified a list
-
# of monkeys on each fruit. As with +belongs_to+, Active Record reflects on
-
# the fixture's model class and discovers the +has_and_belongs_to_many+
-
# associations.
-
#
-
# == Autofilled Timestamp Columns
-
#
-
# If your table/model specifies any of Active Record's
-
# standard timestamp columns (+created_at+, +created_on+, +updated_at+, +updated_on+),
-
# they will automatically be set to <tt>Time.now</tt>.
-
#
-
# If you've set specific values, they'll be left alone.
-
#
-
# == Fixture label interpolation
-
#
-
# The label of the current fixture is always available as a column value:
-
#
-
# geeksomnia:
-
# name: Geeksomnia's Account
-
# subdomain: $LABEL
-
# email: $LABEL@email.com
-
#
-
# Also, sometimes (like when porting older join table fixtures) you'll need
-
# to be able to get a hold of the identifier for a given label. ERB
-
# to the rescue:
-
#
-
# george_reginald:
-
# monkey_id: <%= ActiveRecord::FixtureSet.identify(:reginald) %>
-
# pirate_id: <%= ActiveRecord::FixtureSet.identify(:george) %>
-
#
-
# == Support for YAML defaults
-
#
-
# You can set and reuse defaults in your fixtures YAML file.
-
# This is the same technique used in the +database.yml+ file to specify
-
# defaults:
-
#
-
# DEFAULTS: &DEFAULTS
-
# created_on: <%= 3.weeks.ago.to_s(:db) %>
-
#
-
# first:
-
# name: Smurf
-
# <<: *DEFAULTS
-
#
-
# second:
-
# name: Fraggle
-
# <<: *DEFAULTS
-
#
-
# Any fixture labeled "DEFAULTS" is safely ignored.
-
1
class FixtureSet
-
#--
-
# An instance of FixtureSet is normally stored in a single YAML file and
-
# possibly in a folder with the same name.
-
#++
-
-
1
MAX_ID = 2 ** 30 - 1
-
-
2
@@all_cached_fixtures = Hash.new { |h,k| h[k] = {} }
-
-
1
def self.default_fixture_model_name(fixture_set_name, config = ActiveRecord::Base) # :nodoc:
-
19
config.pluralize_table_names ?
-
fixture_set_name.singularize.camelize :
-
fixture_set_name.camelize
-
end
-
-
1
def self.default_fixture_table_name(fixture_set_name, config = ActiveRecord::Base) # :nodoc:
-
"#{ config.table_name_prefix }"\
-
"#{ fixture_set_name.tr('/', '_') }"\
-
"#{ config.table_name_suffix }".to_sym
-
end
-
-
1
def self.reset_cache
-
@@all_cached_fixtures.clear
-
end
-
-
1
def self.cache_for_connection(connection)
-
1281
@@all_cached_fixtures[connection]
-
end
-
-
1
def self.fixture_is_cached?(connection, table_name)
-
1216
cache_for_connection(connection)[table_name]
-
end
-
-
1
def self.cached_fixtures(connection, keys_to_fetch = nil)
-
64
if keys_to_fetch
-
64
cache_for_connection(connection).values_at(*keys_to_fetch)
-
else
-
cache_for_connection(connection).values
-
end
-
end
-
-
1
def self.cache_fixtures(connection, fixtures_map)
-
1
cache_for_connection(connection).update(fixtures_map)
-
end
-
-
1
def self.instantiate_fixtures(object, fixture_set, load_instances = true)
-
if load_instances
-
fixture_set.each do |fixture_name, fixture|
-
begin
-
object.instance_variable_set "@#{fixture_name}", fixture.find
-
rescue FixtureClassNotFound
-
nil
-
end
-
end
-
end
-
end
-
-
1
def self.instantiate_all_loaded_fixtures(object, load_instances = true)
-
all_loaded_fixtures.each_value do |fixture_set|
-
instantiate_fixtures(object, fixture_set, load_instances)
-
end
-
end
-
-
1
cattr_accessor :all_loaded_fixtures
-
1
self.all_loaded_fixtures = {}
-
-
1
class ClassCache
-
1
def initialize(class_names, config)
-
64
@class_names = class_names.stringify_keys
-
64
@config = config
-
-
# Remove string values that aren't constants or subclasses of AR
-
64
@class_names.delete_if { |klass_name, klass| !insert_class(@class_names, klass_name, klass) }
-
end
-
-
1
def [](fs_name)
-
19
@class_names.fetch(fs_name) {
-
19
klass = default_fixture_model(fs_name, @config).safe_constantize
-
19
insert_class(@class_names, fs_name, klass)
-
}
-
end
-
-
1
private
-
-
1
def insert_class(class_names, name, klass)
-
# We only want to deal with AR objects.
-
19
if klass && klass < ActiveRecord::Base
-
19
class_names[name] = klass
-
else
-
class_names[name] = nil
-
end
-
end
-
-
1
def default_fixture_model(fs_name, config)
-
19
ActiveRecord::FixtureSet.default_fixture_model_name(fs_name, config)
-
end
-
end
-
-
1
def self.create_fixtures(fixtures_directory, fixture_set_names, class_names = {}, config = ActiveRecord::Base)
-
64
fixture_set_names = Array(fixture_set_names).map(&:to_s)
-
64
class_names = ClassCache.new class_names, config
-
-
# FIXME: Apparently JK uses this.
-
64
connection = block_given? ? yield : ActiveRecord::Base.connection
-
-
64
files_to_read = fixture_set_names.reject { |fs_name|
-
1216
fixture_is_cached?(connection, fs_name)
-
}
-
-
64
unless files_to_read.empty?
-
1
connection.disable_referential_integrity do
-
1
fixtures_map = {}
-
-
1
fixture_sets = files_to_read.map do |fs_name|
-
19
klass = class_names[fs_name]
-
19
conn = klass ? klass.connection : connection
-
19
fixtures_map[fs_name] = new( # ActiveRecord::FixtureSet.new
-
conn,
-
fs_name,
-
klass,
-
::File.join(fixtures_directory, fs_name))
-
end
-
-
1
update_all_loaded_fixtures fixtures_map
-
-
1
connection.transaction(:requires_new => true) do
-
1
fixture_sets.each do |fs|
-
19
conn = fs.model_class.respond_to?(:connection) ? fs.model_class.connection : connection
-
19
table_rows = fs.table_rows
-
-
19
table_rows.each_key do |table|
-
19
conn.delete "DELETE FROM #{conn.quote_table_name(table)}", 'Fixture Delete'
-
end
-
-
19
table_rows.each do |fixture_set_name, rows|
-
19
rows.each do |row|
-
43
conn.insert_fixture(row, fixture_set_name)
-
end
-
end
-
-
# Cap primary key sequences to max(pk).
-
19
if conn.respond_to?(:reset_pk_sequence!)
-
19
conn.reset_pk_sequence!(fs.table_name)
-
end
-
end
-
end
-
-
1
cache_fixtures(connection, fixtures_map)
-
end
-
end
-
64
cached_fixtures(connection, fixture_set_names)
-
end
-
-
# Returns a consistent, platform-independent identifier for +label+.
-
# Integer identifiers are values less than 2^30. UUIDs are RFC 4122 version 5 SHA-1 hashes.
-
1
def self.identify(label, column_type = :integer)
-
83
if column_type == :uuid
-
Digest::UUID.uuid_v5(Digest::UUID::OID_NAMESPACE, label.to_s)
-
else
-
83
Zlib.crc32(label.to_s) % MAX_ID
-
end
-
end
-
-
# Superclass for the evaluation contexts used by ERB fixtures.
-
1
def self.context_class
-
19
@context_class ||= Class.new
-
end
-
-
1
def self.update_all_loaded_fixtures(fixtures_map) # :nodoc:
-
1
all_loaded_fixtures.update(fixtures_map)
-
end
-
-
1
attr_reader :table_name, :name, :fixtures, :model_class, :config
-
-
1
def initialize(connection, name, class_name, path, config = ActiveRecord::Base)
-
19
@name = name
-
19
@path = path
-
19
@config = config
-
19
@model_class = nil
-
-
19
if class_name.is_a?(Class) # TODO: Should be an AR::Base type class, or any?
-
19
@model_class = class_name
-
else
-
@model_class = class_name.safe_constantize if class_name
-
end
-
-
19
@connection = connection
-
-
19
@table_name = ( model_class.respond_to?(:table_name) ?
-
model_class.table_name :
-
self.class.default_fixture_table_name(name, config) )
-
-
19
@fixtures = read_fixture_files path, @model_class
-
end
-
-
1
def [](x)
-
948
fixtures[x]
-
end
-
-
1
def []=(k,v)
-
fixtures[k] = v
-
end
-
-
1
def each(&block)
-
fixtures.each(&block)
-
end
-
-
1
def size
-
fixtures.size
-
end
-
-
# Returns a hash of rows to be inserted. The key is the table, the value is
-
# a list of rows to insert to that table.
-
1
def table_rows
-
19
now = config.default_timezone == :utc ? Time.now.utc : Time.now
-
19
now = now.to_s(:db)
-
-
# allow a standard key to be used for doing defaults in YAML
-
19
fixtures.delete('DEFAULTS')
-
-
# track any join tables we need to insert later
-
19
rows = Hash.new { |h,table| h[table] = [] }
-
-
19
rows[table_name] = fixtures.map do |label, fixture|
-
43
row = fixture.to_hash
-
-
43
if model_class
-
# fill in timestamp columns if they aren't specified and the model is set to record_timestamps
-
43
if model_class.record_timestamps
-
43
timestamp_column_names.each do |c_name|
-
86
row[c_name] = now unless row.key?(c_name)
-
end
-
end
-
-
# interpolate the fixture label
-
43
row.each do |key, value|
-
278
row[key] = value.gsub("$LABEL", label.to_s) if value.is_a?(String)
-
end
-
-
# generate a primary key if necessary
-
43
if has_primary_key_column? && !row.include?(primary_key_name)
-
43
row[primary_key_name] = ActiveRecord::FixtureSet.identify(label, primary_key_type)
-
end
-
-
# If STI is used, find the correct subclass for association reflection
-
43
reflection_class =
-
if row.include?(inheritance_column_name)
-
4
row[inheritance_column_name].constantize rescue model_class
-
else
-
39
model_class
-
end
-
-
43
reflection_class._reflections.each_value do |association|
-
162
case association.macro
-
when :belongs_to
-
# Do not replace association name with association foreign key if they are named the same
-
55
fk_name = (association.options[:foreign_key] || "#{association.name}_id").to_s
-
-
55
if association.name.to_s != fk_name && value = row.delete(association.name.to_s)
-
40
if association.polymorphic? && value.sub!(/\s*\(([^\)]*)\)\s*$/, "")
-
# support polymorphic belongs_to as "label (Type)"
-
row[association.foreign_type] = $1
-
end
-
-
40
fk_type = reflection_class.columns_hash[fk_name].type
-
40
row[fk_name] = ActiveRecord::FixtureSet.identify(value, fk_type)
-
end
-
when :has_many
-
92
if association.options[:through]
-
32
add_join_records(rows, row, HasManyThroughProxy.new(association))
-
end
-
end
-
end
-
end
-
-
43
row
-
end
-
19
rows
-
end
-
-
1
class ReflectionProxy # :nodoc:
-
1
def initialize(association)
-
32
@association = association
-
end
-
-
1
def join_table
-
@association.join_table
-
end
-
-
1
def name
-
32
@association.name
-
end
-
-
1
def primary_key_type
-
@association.klass.column_types[@association.klass.primary_key].type
-
end
-
end
-
-
1
class HasManyThroughProxy < ReflectionProxy # :nodoc:
-
1
def rhs_key
-
@association.foreign_key
-
end
-
-
1
def lhs_key
-
@association.through_reflection.foreign_key
-
end
-
-
1
def join_table
-
@association.through_reflection.table_name
-
end
-
end
-
-
1
private
-
1
def primary_key_name
-
124
@primary_key_name ||= model_class && model_class.primary_key
-
end
-
-
1
def primary_key_type
-
43
@primary_key_type ||= model_class && model_class.column_types[model_class.primary_key].type
-
end
-
-
1
def add_join_records(rows, row, association)
-
# This is the case when the join table has no fixtures file
-
32
if (targets = row.delete(association.name.to_s))
-
table_name = association.join_table
-
column_type = association.primary_key_type
-
lhs_key = association.lhs_key
-
rhs_key = association.rhs_key
-
-
targets = targets.is_a?(Array) ? targets : targets.split(/\s*,\s*/)
-
rows[table_name].concat targets.map { |target|
-
{ lhs_key => row[primary_key_name],
-
rhs_key => ActiveRecord::FixtureSet.identify(target, column_type) }
-
}
-
end
-
end
-
-
1
def has_primary_key_column?
-
@has_primary_key_column ||= primary_key_name &&
-
62
model_class.columns.any? { |c| c.name == primary_key_name }
-
end
-
-
1
def timestamp_column_names
-
@timestamp_column_names ||=
-
43
%w(created_at created_on updated_at updated_on) & column_names
-
end
-
-
1
def inheritance_column_name
-
47
@inheritance_column_name ||= model_class && model_class.inheritance_column
-
end
-
-
1
def column_names
-
233
@column_names ||= @connection.columns(@table_name).collect { |c| c.name }
-
end
-
-
1
def read_fixture_files(path, model_class)
-
19
yaml_files = Dir["#{path}/{**,*}/*.yml"].select { |f|
-
::File.file?(f)
-
} + [yaml_file_path(path)]
-
-
19
yaml_files.each_with_object({}) do |file, fixtures|
-
19
FixtureSet::File.open(file) do |fh|
-
19
fh.each do |fixture_name, row|
-
43
fixtures[fixture_name] = ActiveRecord::Fixture.new(row, model_class)
-
end
-
end
-
end
-
end
-
-
1
def yaml_file_path(path)
-
19
"#{path}.yml"
-
end
-
-
end
-
-
#--
-
# Deprecate 'Fixtures' in favor of 'FixtureSet'.
-
#++
-
# :nodoc:
-
1
Fixtures = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveRecord::Fixtures', 'ActiveRecord::FixtureSet')
-
-
1
class Fixture #:nodoc:
-
1
include Enumerable
-
-
1
class FixtureError < StandardError #:nodoc:
-
end
-
-
1
class FormatError < FixtureError #:nodoc:
-
end
-
-
1
attr_reader :model_class, :fixture
-
-
1
def initialize(fixture, model_class)
-
43
@fixture = fixture
-
43
@model_class = model_class
-
end
-
-
1
def class_name
-
model_class.name if model_class
-
end
-
-
1
def each
-
fixture.each { |item| yield item }
-
end
-
-
1
def [](key)
-
fixture[key]
-
end
-
-
1
alias :to_hash :fixture
-
-
1
def find
-
455
if model_class
-
455
model_class.unscoped do
-
455
model_class.find(fixture[model_class.primary_key])
-
end
-
else
-
raise FixtureClassNotFound, "No class attached to find."
-
end
-
end
-
end
-
end
-
-
1
module ActiveRecord
-
1
module TestFixtures
-
1
extend ActiveSupport::Concern
-
-
1
def before_setup
-
490
setup_fixtures
-
490
super
-
end
-
-
1
def after_teardown
-
490
super
-
490
teardown_fixtures
-
end
-
-
1
included do
-
1
class_attribute :fixture_path, :instance_writer => false
-
1
class_attribute :fixture_table_names
-
1
class_attribute :fixture_class_names
-
1
class_attribute :use_transactional_fixtures
-
1
class_attribute :use_instantiated_fixtures # true, false, or :no_instances
-
1
class_attribute :pre_loaded_fixtures
-
1
class_attribute :config
-
-
1
self.fixture_table_names = []
-
1
self.use_transactional_fixtures = true
-
1
self.use_instantiated_fixtures = false
-
1
self.pre_loaded_fixtures = false
-
1
self.config = ActiveRecord::Base
-
-
1
self.fixture_class_names = Hash.new do |h, fixture_set_name|
-
h[fixture_set_name] = ActiveRecord::FixtureSet.default_fixture_model_name(fixture_set_name, self.config)
-
end
-
end
-
-
1
module ClassMethods
-
# Sets the model class for a fixture when the class name cannot be inferred from the fixture name.
-
#
-
# Examples:
-
#
-
# set_fixture_class some_fixture: SomeModel,
-
# 'namespaced/fixture' => Another::Model
-
#
-
# The keys must be the fixture names, that coincide with the short paths to the fixture files.
-
1
def set_fixture_class(class_names = {})
-
self.fixture_class_names = self.fixture_class_names.merge(class_names.stringify_keys)
-
end
-
-
1
def fixtures(*fixture_set_names)
-
1
if fixture_set_names.first == :all
-
1
fixture_set_names = Dir["#{fixture_path}/{**,*}/*.{yml}"]
-
20
fixture_set_names.map! { |f| f[(fixture_path.to_s.size + 1)..-5] }
-
else
-
fixture_set_names = fixture_set_names.flatten.map { |n| n.to_s }
-
end
-
-
1
self.fixture_table_names |= fixture_set_names
-
1
setup_fixture_accessors(fixture_set_names)
-
end
-
-
1
def setup_fixture_accessors(fixture_set_names = nil)
-
1
fixture_set_names = Array(fixture_set_names || fixture_table_names)
-
1
methods = Module.new do
-
1
fixture_set_names.each do |fs_name|
-
19
fs_name = fs_name.to_s
-
19
accessor_name = fs_name.tr('/', '_').to_sym
-
-
19
define_method(accessor_name) do |*fixture_names|
-
493
force_reload = fixture_names.pop if fixture_names.last == true || fixture_names.last == :reload
-
-
493
@fixture_cache[fs_name] ||= {}
-
-
493
instances = fixture_names.map do |f_name|
-
493
f_name = f_name.to_s
-
493
@fixture_cache[fs_name].delete(f_name) if force_reload
-
-
493
if @loaded_fixtures[fs_name][f_name]
-
493
@fixture_cache[fs_name][f_name] ||= @loaded_fixtures[fs_name][f_name].find
-
else
-
raise StandardError, "No fixture named '#{f_name}' found for fixture set '#{fs_name}'"
-
end
-
end
-
-
493
instances.size == 1 ? instances.first : instances
-
end
-
19
private accessor_name
-
end
-
end
-
1
include methods
-
end
-
-
1
def uses_transaction(*methods)
-
@uses_transaction = [] unless defined?(@uses_transaction)
-
@uses_transaction.concat methods.map { |m| m.to_s }
-
end
-
-
1
def uses_transaction?(method)
-
980
@uses_transaction = [] unless defined?(@uses_transaction)
-
980
@uses_transaction.include?(method.to_s)
-
end
-
end
-
-
1
def run_in_transaction?
-
use_transactional_fixtures &&
-
980
!self.class.uses_transaction?(method_name)
-
end
-
-
1
def setup_fixtures(config = ActiveRecord::Base)
-
490
if pre_loaded_fixtures && !use_transactional_fixtures
-
raise RuntimeError, 'pre_loaded_fixtures requires use_transactional_fixtures'
-
end
-
-
490
@fixture_cache = {}
-
490
@fixture_connections = []
-
490
@@already_loaded_fixtures ||= {}
-
-
# Load fixtures once and begin transaction.
-
490
if run_in_transaction?
-
490
if @@already_loaded_fixtures[self.class]
-
426
@loaded_fixtures = @@already_loaded_fixtures[self.class]
-
else
-
64
@loaded_fixtures = load_fixtures(config)
-
64
@@already_loaded_fixtures[self.class] = @loaded_fixtures
-
end
-
490
@fixture_connections = enlist_fixture_connections
-
490
@fixture_connections.each do |connection|
-
490
connection.begin_transaction joinable: false
-
end
-
# Load fixtures for every test.
-
else
-
ActiveRecord::FixtureSet.reset_cache
-
@@already_loaded_fixtures[self.class] = nil
-
@loaded_fixtures = load_fixtures(config)
-
end
-
-
# Instantiate fixtures for every test if requested.
-
490
instantiate_fixtures if use_instantiated_fixtures
-
end
-
-
1
def teardown_fixtures
-
# Rollback changes if a transaction is active.
-
490
if run_in_transaction?
-
490
@fixture_connections.each do |connection|
-
490
connection.rollback_transaction if connection.transaction_open?
-
end
-
490
@fixture_connections.clear
-
else
-
ActiveRecord::FixtureSet.reset_cache
-
end
-
-
490
ActiveRecord::Base.clear_active_connections!
-
end
-
-
1
def enlist_fixture_connections
-
490
ActiveRecord::Base.connection_handler.connection_pool_list.map(&:connection)
-
end
-
-
1
private
-
1
def load_fixtures(config)
-
64
fixtures = ActiveRecord::FixtureSet.create_fixtures(fixture_path, fixture_table_names, fixture_class_names, config)
-
1280
Hash[fixtures.map { |f| [f.name, f] }]
-
end
-
-
1
def instantiate_fixtures
-
if pre_loaded_fixtures
-
raise RuntimeError, 'Load fixtures before instantiating them.' if ActiveRecord::FixtureSet.all_loaded_fixtures.empty?
-
ActiveRecord::FixtureSet.instantiate_all_loaded_fixtures(self, load_instances?)
-
else
-
raise RuntimeError, 'Load fixtures before instantiating them.' if @loaded_fixtures.nil?
-
@loaded_fixtures.each_value do |fixture_set|
-
ActiveRecord::FixtureSet.instantiate_fixtures(self, fixture_set, load_instances?)
-
end
-
end
-
end
-
-
1
def load_instances?
-
use_instantiated_fixtures != :no_instances
-
end
-
end
-
end
-
-
1
class ActiveRecord::FixtureSet::RenderContext # :nodoc:
-
1
def self.create_subclass
-
19
Class.new ActiveRecord::FixtureSet.context_class do
-
19
def get_binding
-
19
binding()
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
module LegacyYamlAdapter
-
1
def self.convert(klass, coder)
-
1062
return coder unless coder.is_a?(Psych::Coder)
-
-
case coder["active_record_yaml_version"]
-
when 0 then coder
-
else
-
if coder["attributes"].is_a?(AttributeSet)
-
coder
-
else
-
Rails41.convert(klass, coder)
-
end
-
end
-
end
-
-
1
module Rails41
-
1
def self.convert(klass, coder)
-
attributes = klass.attributes_builder
-
.build_from_database(coder["attributes"])
-
new_record = coder["attributes"][klass.primary_key].blank?
-
-
{
-
"attributes" => attributes,
-
"new_record" => new_record,
-
}
-
end
-
end
-
end
-
end
-
# -*- coding: utf-8 -*-
-
-
1
module ActiveRecord
-
1
module NullRelation # :nodoc:
-
1
def exec_queries
-
@records = []
-
end
-
-
1
def pluck(*column_names)
-
[]
-
end
-
-
1
def delete_all(_conditions = nil)
-
0
-
end
-
-
1
def update_all(_updates, _conditions = nil, _options = {})
-
0
-
end
-
-
1
def delete(_id_or_array)
-
0
-
end
-
-
1
def size
-
calculate :size, nil
-
end
-
-
1
def empty?
-
2
true
-
end
-
-
1
def any?
-
4
false
-
end
-
-
1
def many?
-
false
-
end
-
-
1
def to_sql
-
""
-
end
-
-
1
def count(*)
-
calculate :count, nil
-
end
-
-
1
def sum(*)
-
calculate :sum, nil
-
end
-
-
1
def average(*)
-
calculate :average, nil
-
end
-
-
1
def minimum(*)
-
calculate :minimum, nil
-
end
-
-
1
def maximum(*)
-
calculate :maximum, nil
-
end
-
-
1
def calculate(operation, _column_name, _options = {})
-
# TODO: Remove _options argument as soon we remove support to
-
# activerecord-deprecated_finders.
-
if [:count, :sum, :size].include? operation
-
group_values.any? ? Hash.new : 0
-
elsif [:average, :minimum, :maximum].include?(operation) && group_values.any?
-
Hash.new
-
else
-
nil
-
end
-
end
-
-
1
def exists?(_id = false)
-
false
-
end
-
end
-
end
-
1
require 'active_support/core_ext/module/attr_internal'
-
1
require 'active_record/log_subscriber'
-
-
1
module ActiveRecord
-
1
module Railties # :nodoc:
-
1
module ControllerRuntime #:nodoc:
-
1
extend ActiveSupport::Concern
-
-
1
protected
-
-
1
attr_internal :db_runtime
-
-
1
def process_action(action, *args)
-
# We also need to reset the runtime before each action
-
# because of queries in middleware or in cases we are streaming
-
# and it won't be cleaned up by the method below.
-
69
ActiveRecord::LogSubscriber.reset_runtime
-
69
super
-
end
-
-
1
def cleanup_view_runtime
-
68
if ActiveRecord::Base.connected?
-
68
db_rt_before_render = ActiveRecord::LogSubscriber.reset_runtime
-
68
self.db_runtime = (db_runtime || 0) + db_rt_before_render
-
68
runtime = super
-
68
db_rt_after_render = ActiveRecord::LogSubscriber.reset_runtime
-
68
self.db_runtime += db_rt_after_render
-
68
runtime - db_rt_after_render
-
else
-
super
-
end
-
end
-
-
1
def append_info_to_payload(payload)
-
69
super
-
69
if ActiveRecord::Base.connected?
-
69
payload[:db_runtime] = (db_runtime || 0) + ActiveRecord::LogSubscriber.reset_runtime
-
end
-
end
-
-
1
module ClassMethods # :nodoc:
-
1
def log_process_action(payload)
-
69
messages, db_runtime = super, payload[:db_runtime]
-
69
messages << ("ActiveRecord: %.1fms" % db_runtime.to_f) if db_runtime
-
69
messages
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
class PredicateBuilder # :nodoc:
-
1
@handlers = []
-
-
1
autoload :RelationHandler, 'active_record/relation/predicate_builder/relation_handler'
-
1
autoload :ArrayHandler, 'active_record/relation/predicate_builder/array_handler'
-
-
1
def self.resolve_column_aliases(klass, hash)
-
# This method is a hot spot, so for now, use Hash[] to dup the hash.
-
# https://bugs.ruby-lang.org/issues/7166
-
1018
hash = Hash[hash]
-
1018
hash.keys.grep(Symbol) do |key|
-
483
if klass.attribute_alias? key
-
2
hash[klass.attribute_alias(key)] = hash.delete key
-
end
-
end
-
1018
hash
-
end
-
-
1
def self.build_from_hash(klass, attributes, default_table)
-
1018
queries = []
-
-
1018
attributes.each do |column, value|
-
1018
table = default_table
-
-
1018
if value.is_a?(Hash)
-
4
if value.empty?
-
queries << '1=0'
-
else
-
4
table = Arel::Table.new(column, default_table.engine)
-
4
association = klass._reflect_on_association(column)
-
-
4
value.each do |k, v|
-
4
queries.concat expand(association && association.klass, table, k, v)
-
end
-
end
-
else
-
1014
column = column.to_s
-
-
1014
if column.include?('.')
-
table_name, column = column.split('.', 2)
-
table = Arel::Table.new(table_name, default_table.engine)
-
end
-
-
1014
queries.concat expand(klass, table, column, value)
-
end
-
end
-
-
1018
queries
-
end
-
-
1
def self.expand(klass, table, column, value)
-
1018
queries = []
-
-
# Find the foreign key when using queries such as:
-
# Post.where(author: author)
-
#
-
# For polymorphic relationships, find the foreign key and type:
-
# PriceEstimate.where(estimate_of: treasure)
-
1018
if klass && reflection = klass._reflect_on_association(column)
-
8
base_class = polymorphic_base_class_from_value(value)
-
-
8
if reflection.polymorphic? && base_class
-
3
queries << build(table[reflection.foreign_type], base_class)
-
end
-
-
8
column = reflection.foreign_key
-
-
8
if base_class
-
8
primary_key = reflection.association_primary_key(base_class)
-
8
value = convert_value_to_association_ids(value, primary_key)
-
end
-
end
-
-
1018
queries << build(table[column], value)
-
1018
queries
-
end
-
-
1
def self.polymorphic_base_class_from_value(value)
-
8
case value
-
when Relation
-
value.klass.base_class
-
when Array
-
val = value.compact.first
-
val.class.base_class if val.is_a?(Base)
-
when Base
-
8
value.class.base_class
-
end
-
end
-
-
1
def self.references(attributes)
-
attributes.map do |key, value|
-
1018
if value.is_a?(Hash)
-
4
key
-
else
-
1014
key = key.to_s
-
1014
key.split('.').first if key.include?('.')
-
end
-
1018
end.compact
-
end
-
-
# Define how a class is converted to Arel nodes when passed to +where+.
-
# The handler can be any object that responds to +call+, and will be used
-
# for any value that +===+ the class given. For example:
-
#
-
# MyCustomDateRange = Struct.new(:start, :end)
-
# handler = proc do |column, range|
-
# Arel::Nodes::Between.new(column,
-
# Arel::Nodes::And.new([range.start, range.end])
-
# )
-
# end
-
# ActiveRecord::PredicateBuilder.register_handler(MyCustomDateRange, handler)
-
1
def self.register_handler(klass, handler)
-
6
@handlers.unshift([klass, handler])
-
end
-
-
954
BASIC_OBJECT_HANDLER = ->(attribute, value) { attribute.eq(value) } # :nodoc:
-
1
register_handler(BasicObject, BASIC_OBJECT_HANDLER)
-
# FIXME: I think we need to deprecate this behavior
-
4
register_handler(Class, ->(attribute, value) { attribute.eq(value.name) })
-
1
register_handler(Base, ->(attribute, value) { attribute.eq(value.id) })
-
45
register_handler(Range, ->(attribute, value) { attribute.between(value) })
-
1
register_handler(Relation, RelationHandler.new)
-
1
register_handler(Array, ArrayHandler.new)
-
-
1
def self.build(attribute, value)
-
1021
handler_for(value).call(attribute, value)
-
end
-
1
private_class_method :build
-
-
1
def self.handler_for(object)
-
13605
@handlers.detect { |klass, _| klass === object }.last
-
end
-
1
private_class_method :handler_for
-
-
1
def self.convert_value_to_association_ids(value, primary_key)
-
8
case value
-
when Relation
-
value.select(primary_key)
-
when Array
-
value.map { |v| convert_value_to_association_ids(v, primary_key) }
-
when Base
-
8
value._read_attribute(primary_key)
-
else
-
value
-
end
-
end
-
-
1
def self.can_be_bound?(value) # :nodoc:
-
!value.nil? &&
-
1022
!value.is_a?(Hash) &&
-
handler_for(value) == BASIC_OBJECT_HANDLER
-
end
-
end
-
end
-
1
require 'active_support/core_ext/string/filters'
-
-
1
module ActiveRecord
-
1
class PredicateBuilder
-
1
class ArrayHandler # :nodoc:
-
1
def call(attribute, value)
-
50
values = value.map { |x| x.is_a?(Base) ? x.id : x }
-
21
nils, values = values.partition(&:nil?)
-
-
39
if values.any? { |val| val.is_a?(Array) }
-
ActiveSupport::Deprecation.warn(<<-MSG.squish)
-
Passing a nested array to Active Record finder methods is
-
deprecated and will be removed. Flatten your array before using
-
it for 'IN' conditions.
-
MSG
-
-
values = values.flatten
-
end
-
-
21
return attribute.in([]) if values.empty? && nils.empty?
-
-
34
ranges, values = values.partition { |v| v.is_a?(Range) }
-
-
16
values_predicate =
-
case values.length
-
when 0 then NullPredicate
-
14
when 1 then attribute.eq(values.first)
-
2
else attribute.in(values)
-
end
-
-
16
unless nils.empty?
-
11
values_predicate = values_predicate.or(attribute.eq(nil))
-
end
-
-
16
array_predicates = ranges.map { |range| attribute.between(range) }
-
16
array_predicates.unshift(values_predicate)
-
16
array_predicates.inject { |composite, predicate| composite.or(predicate) }
-
end
-
-
1
module NullPredicate # :nodoc:
-
1
def self.or(other)
-
other
-
end
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
1
class PredicateBuilder
-
1
class RelationHandler # :nodoc:
-
1
def call(attribute, value)
-
if value.select_values.empty?
-
value = value.select(value.klass.arel_table[value.klass.primary_key])
-
end
-
-
attribute.in(value.arel)
-
end
-
end
-
end
-
end
-
1
module ActiveRecord
-
###
-
# This class encapsulates a Result returned from calling +exec_query+ on any
-
# database connection adapter. For example:
-
#
-
# result = ActiveRecord::Base.connection.exec_query('SELECT id, title, body FROM posts')
-
# result # => #<ActiveRecord::Result:0xdeadbeef>
-
#
-
# # Get the column names of the result:
-
# result.columns
-
# # => ["id", "title", "body"]
-
#
-
# # Get the record values of the result:
-
# result.rows
-
# # => [[1, "title_1", "body_1"],
-
# [2, "title_2", "body_2"],
-
# ...
-
# ]
-
#
-
# # Get an array of hashes representing the result (column => value):
-
# result.to_hash
-
# # => [{"id" => 1, "title" => "title_1", "body" => "body_1"},
-
# {"id" => 2, "title" => "title_2", "body" => "body_2"},
-
# ...
-
# ]
-
#
-
# # ActiveRecord::Result also includes Enumerable.
-
# result.each do |row|
-
# puts row['title'] + " " + row['body']
-
# end
-
1
class Result
-
1
include Enumerable
-
-
1
IDENTITY_TYPE = Type::Value.new # :nodoc:
-
-
1
attr_reader :columns, :rows, :column_types
-
-
1
def initialize(columns, rows, column_types = {})
-
1799
@columns = columns
-
1799
@rows = rows
-
1799
@hash_rows = nil
-
1799
@column_types = column_types
-
end
-
-
1
def length
-
1043
@rows.length
-
end
-
-
1
def each
-
1369
if block_given?
-
2757
hash_rows.each { |row| yield row }
-
else
-
hash_rows.to_enum { @rows.size }
-
end
-
end
-
-
1
def to_hash
-
hash_rows
-
end
-
-
1
alias :map! :map
-
1
alias :collect! :map
-
-
# Returns true if there are no records.
-
1
def empty?
-
rows.empty?
-
end
-
-
1
def to_ary
-
hash_rows
-
end
-
-
1
def [](idx)
-
hash_rows[idx]
-
end
-
-
1
def last
-
hash_rows.last
-
end
-
-
1
def cast_values(type_overrides = {}) # :nodoc:
-
560
types = columns.map { |name| column_type(name, type_overrides) }
-
280
result = rows.map do |values|
-
280
types.zip(values).map { |type, value| type.type_cast_from_database(value) }
-
end
-
-
280
columns.one? ? result.map!(&:first) : result
-
end
-
-
1
def initialize_copy(other)
-
54
@columns = columns.dup
-
54
@rows = rows.dup
-
54
@column_types = column_types.dup
-
54
@hash_rows = nil
-
end
-
-
1
private
-
-
1
def column_type(name, type_overrides = {})
-
280
type_overrides.fetch(name) do
-
column_types.fetch(name, IDENTITY_TYPE)
-
end
-
end
-
-
1
def hash_rows
-
@hash_rows ||=
-
begin
-
# We freeze the strings to prevent them getting duped when
-
# used as keys in ActiveRecord::Base's @attributes hash
-
24279
columns = @columns.map { |c| c.dup.freeze }
-
1369
@rows.map { |row|
-
# In the past we used Hash[columns.zip(row)]
-
# though elegant, the verbose way is much more efficient
-
# both time and memory wise cause it avoids a big array allocation
-
# this method is called a lot and needs to be micro optimised
-
1388
hash = {}
-
-
1388
index = 0
-
1388
length = columns.length
-
-
1388
while index < length
-
23362
hash[columns[index]] = row[index]
-
23362
index += 1
-
end
-
-
1388
hash
-
}
-
1369
end
-
end
-
end
-
end
-
1
require 'active_record/scoping/default'
-
1
require 'active_record/scoping/named'
-
1
require 'active_record/base'
-
-
1
module ActiveRecord
-
1
class SchemaMigration < ActiveRecord::Base
-
1
class << self
-
1
def primary_key
-
nil
-
end
-
-
1
def table_name
-
4
"#{table_name_prefix}#{ActiveRecord::Base.schema_migrations_table_name}#{table_name_suffix}"
-
end
-
-
1
def index_name
-
"#{table_name_prefix}unique_#{ActiveRecord::Base.schema_migrations_table_name}#{table_name_suffix}"
-
end
-
-
1
def table_exists?
-
connection.table_exists?(table_name)
-
end
-
-
1
def create_table(limit=nil)
-
unless table_exists?
-
version_options = {null: false}
-
version_options[:limit] = limit if limit
-
-
connection.create_table(table_name, id: false) do |t|
-
t.column :version, :string, version_options
-
end
-
connection.add_index table_name, :version, unique: true, name: index_name
-
end
-
end
-
-
1
def drop_table
-
if table_exists?
-
connection.remove_index table_name, name: index_name
-
connection.drop_table(table_name)
-
end
-
end
-
-
1
def normalize_migration_number(number)
-
"%.3d" % number.to_i
-
end
-
-
1
def normalized_versions
-
pluck(:version).map { |v| normalize_migration_number v }
-
end
-
end
-
-
1
def version
-
62
super.to_i
-
end
-
end
-
end
-
1
module ActiveRecord
-
-
# Statement cache is used to cache a single statement in order to avoid creating the AST again.
-
# Initializing the cache is done by passing the statement in the create block:
-
#
-
# cache = StatementCache.create(Book.connection) do |params|
-
# Book.where(name: "my book").where("author_id > 3")
-
# end
-
#
-
# The cached statement is executed by using the +execute+ method:
-
#
-
# cache.execute([], Book, Book.connection)
-
#
-
# The relation returned by the block is cached, and for each +execute+ call the cached relation gets duped.
-
# Database is queried when +to_a+ is called on the relation.
-
#
-
# If you want to cache the statement without the values you can use the +bind+ method of the
-
# block parameter.
-
#
-
# cache = StatementCache.create(Book.connection) do |params|
-
# Book.where(name: params.bind)
-
# end
-
#
-
# And pass the bind values as the first argument of +execute+ call.
-
#
-
# cache.execute(["my book"], Book, Book.connection)
-
1
class StatementCache # :nodoc:
-
1
class Substitute; end # :nodoc:
-
-
1
class Query # :nodoc:
-
1
def initialize(sql)
-
21
@sql = sql
-
end
-
-
1
def sql_for(binds, connection)
-
206
@sql
-
end
-
end
-
-
1
class PartialQuery < Query # :nodoc:
-
1
def initialize values
-
@values = values
-
@indexes = values.each_with_index.find_all { |thing,i|
-
Arel::Nodes::BindParam === thing
-
}.map(&:last)
-
end
-
-
1
def sql_for(binds, connection)
-
val = @values.dup
-
binds = binds.dup
-
@indexes.each { |i| val[i] = connection.quote(*binds.shift.reverse) }
-
val.join
-
end
-
end
-
-
1
def self.query(visitor, ast)
-
21
Query.new visitor.accept(ast, Arel::Collectors::SQLString.new).value
-
end
-
-
1
def self.partial_query(visitor, ast, collector)
-
collected = visitor.accept(ast, collector).value
-
PartialQuery.new collected
-
end
-
-
1
class Params # :nodoc:
-
22
def bind; Substitute.new; end
-
end
-
-
1
class BindMap # :nodoc:
-
1
def initialize(bind_values)
-
21
@indexes = []
-
21
@bind_values = bind_values
-
-
21
bind_values.each_with_index do |(_, value), i|
-
21
if Substitute === value
-
21
@indexes << i
-
end
-
end
-
end
-
-
1
def bind(values)
-
412
bvs = @bind_values.map { |pair| pair.dup }
-
412
@indexes.each_with_index { |offset,i| bvs[offset][1] = values[i] }
-
206
bvs
-
end
-
end
-
-
1
attr_reader :bind_map, :query_builder
-
-
1
def self.create(connection, block = Proc.new)
-
21
relation = block.call Params.new
-
21
bind_map = BindMap.new relation.bind_values
-
21
query_builder = connection.cacheable_query relation.arel
-
21
new query_builder, bind_map
-
end
-
-
1
def initialize(query_builder, bind_map)
-
21
@query_builder = query_builder
-
21
@bind_map = bind_map
-
end
-
-
1
def execute(params, klass, connection)
-
206
bind_values = bind_map.bind params
-
-
206
sql = query_builder.sql_for bind_values, connection
-
-
206
klass.find_by_sql sql, bind_values
-
end
-
1
alias :call :execute
-
end
-
end
-
1
require 'active_support'
-
1
require 'active_support/time'
-
1
require 'active_support/core_ext'
-
1
module ActiveSupport
-
# Backtraces often include many lines that are not relevant for the context
-
# under review. This makes it hard to find the signal amongst the backtrace
-
# noise, and adds debugging time. With a BacktraceCleaner, filters and
-
# silencers are used to remove the noisy lines, so that only the most relevant
-
# lines remain.
-
#
-
# Filters are used to modify lines of data, while silencers are used to remove
-
# lines entirely. The typical filter use case is to remove lengthy path
-
# information from the start of each line, and view file paths relevant to the
-
# app directory instead of the file system root. The typical silencer use case
-
# is to exclude the output of a noisy library from the backtrace, so that you
-
# can focus on the rest.
-
#
-
# bc = BacktraceCleaner.new
-
# bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix
-
# bc.add_silencer { |line| line =~ /mongrel|rubygems/ } # skip any lines from mongrel or rubygems
-
# bc.clean(exception.backtrace) # perform the cleanup
-
#
-
# To reconfigure an existing BacktraceCleaner (like the default one in Rails)
-
# and show as much data as possible, you can always call
-
# <tt>BacktraceCleaner#remove_silencers!</tt>, which will restore the
-
# backtrace to a pristine state. If you need to reconfigure an existing
-
# BacktraceCleaner so that it does not filter or modify the paths of any lines
-
# of the backtrace, you can call <tt>BacktraceCleaner#remove_filters!</tt>
-
# These two methods will give you a completely untouched backtrace.
-
#
-
# Inspired by the Quiet Backtrace gem by Thoughtbot.
-
1
class BacktraceCleaner
-
1
def initialize
-
1
@filters, @silencers = [], []
-
end
-
-
# Returns the backtrace after all filters and silencers have been run
-
# against it. Filters run first, then silencers.
-
1
def clean(backtrace, kind = :silent)
-
68
filtered = filter_backtrace(backtrace)
-
-
68
case kind
-
when :silent
-
68
silence(filtered)
-
when :noise
-
noise(filtered)
-
else
-
filtered
-
end
-
end
-
1
alias :filter :clean
-
-
# Adds a filter from the block provided. Each line in the backtrace will be
-
# mapped against this filter.
-
#
-
# # Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb"
-
# backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') }
-
1
def add_filter(&block)
-
4
@filters << block
-
end
-
-
# Adds a silencer from the block provided. If the silencer returns +true+
-
# for a given line, it will be excluded from the clean backtrace.
-
#
-
# # Will reject all lines that include the word "mongrel", like "/gems/mongrel/server.rb" or "/app/my_mongrel_server/rb"
-
# backtrace_cleaner.add_silencer { |line| line =~ /mongrel/ }
-
1
def add_silencer(&block)
-
1
@silencers << block
-
end
-
-
# Removes all silencers, but leaves in the filters. Useful if your
-
# context of debugging suddenly expands as you suspect a bug in one of
-
# the libraries you use.
-
1
def remove_silencers!
-
@silencers = []
-
end
-
-
# Removes all filters, but leaves in the silencers. Useful if you suddenly
-
# need to see entire filepaths in the backtrace that you had already
-
# filtered out.
-
1
def remove_filters!
-
@filters = []
-
end
-
-
1
private
-
1
def filter_backtrace(backtrace)
-
68
@filters.each do |f|
-
7056
backtrace = backtrace.map { |line| f.call(line) }
-
end
-
-
68
backtrace
-
end
-
-
1
def silence(backtrace)
-
68
@silencers.each do |s|
-
1764
backtrace = backtrace.reject { |line| s.call(line) }
-
end
-
-
68
backtrace
-
end
-
-
1
def noise(backtrace)
-
backtrace - silence(backtrace)
-
end
-
end
-
end
-
1
require 'benchmark'
-
1
require 'zlib'
-
1
require 'active_support/core_ext/array/extract_options'
-
1
require 'active_support/core_ext/array/wrap'
-
1
require 'active_support/core_ext/benchmark'
-
1
require 'active_support/core_ext/module/attribute_accessors'
-
1
require 'active_support/core_ext/numeric/bytes'
-
1
require 'active_support/core_ext/numeric/time'
-
1
require 'active_support/core_ext/object/to_param'
-
1
require 'active_support/core_ext/string/inflections'
-
1
require 'active_support/deprecation'
-
-
1
module ActiveSupport
-
# See ActiveSupport::Cache::Store for documentation.
-
1
module Cache
-
1
autoload :FileStore, 'active_support/cache/file_store'
-
1
autoload :MemoryStore, 'active_support/cache/memory_store'
-
1
autoload :MemCacheStore, 'active_support/cache/mem_cache_store'
-
1
autoload :NullStore, 'active_support/cache/null_store'
-
-
# These options mean something to all cache implementations. Individual cache
-
# implementations may support additional options.
-
1
UNIVERSAL_OPTIONS = [:namespace, :compress, :compress_threshold, :expires_in, :race_condition_ttl]
-
-
1
module Strategy
-
1
autoload :LocalCache, 'active_support/cache/strategy/local_cache'
-
end
-
-
1
class << self
-
# Creates a new Store object according to the given options.
-
#
-
# If no arguments are passed to this method, then a new
-
# ActiveSupport::Cache::MemoryStore object will be returned.
-
#
-
# If you pass a Symbol as the first argument, then a corresponding cache
-
# store class under the ActiveSupport::Cache namespace will be created.
-
# For example:
-
#
-
# ActiveSupport::Cache.lookup_store(:memory_store)
-
# # => returns a new ActiveSupport::Cache::MemoryStore object
-
#
-
# ActiveSupport::Cache.lookup_store(:mem_cache_store)
-
# # => returns a new ActiveSupport::Cache::MemCacheStore object
-
#
-
# Any additional arguments will be passed to the corresponding cache store
-
# class's constructor:
-
#
-
# ActiveSupport::Cache.lookup_store(:file_store, '/tmp/cache')
-
# # => same as: ActiveSupport::Cache::FileStore.new('/tmp/cache')
-
#
-
# If the first argument is not a Symbol, then it will simply be returned:
-
#
-
# ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new)
-
# # => returns MyOwnCacheStore.new
-
1
def lookup_store(*store_option)
-
2
store, *parameters = *Array.wrap(store_option).flatten
-
-
2
case store
-
when Symbol
-
1
retrieve_store_class(store).new(*parameters)
-
when nil
-
ActiveSupport::Cache::MemoryStore.new
-
else
-
1
store
-
end
-
end
-
-
# Expands out the +key+ argument into a key that can be used for the
-
# cache store. Optionally accepts a namespace, and all keys will be
-
# scoped within that namespace.
-
#
-
# If the +key+ argument provided is an array, or responds to +to_a+, then
-
# each of elements in the array will be turned into parameters/keys and
-
# concatenated into a single key. For example:
-
#
-
# expand_cache_key([:foo, :bar]) # => "foo/bar"
-
# expand_cache_key([:foo, :bar], "namespace") # => "namespace/foo/bar"
-
#
-
# The +key+ argument can also respond to +cache_key+ or +to_param+.
-
1
def expand_cache_key(key, namespace = nil)
-
expanded_cache_key = namespace ? "#{namespace}/" : ""
-
-
if prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
-
expanded_cache_key << "#{prefix}/"
-
end
-
-
expanded_cache_key << retrieve_cache_key(key)
-
expanded_cache_key
-
end
-
-
1
private
-
1
def retrieve_cache_key(key)
-
case
-
when key.respond_to?(:cache_key) then key.cache_key
-
when key.is_a?(Array) then key.map { |element| retrieve_cache_key(element) }.to_param
-
when key.respond_to?(:to_a) then retrieve_cache_key(key.to_a)
-
else key.to_param
-
end.to_s
-
end
-
-
# Obtains the specified cache store class, given the name of the +store+.
-
# Raises an error when the store class cannot be found.
-
1
def retrieve_store_class(store)
-
1
require "active_support/cache/#{store}"
-
rescue LoadError => e
-
raise "Could not find cache store adapter for #{store} (#{e})"
-
else
-
1
ActiveSupport::Cache.const_get(store.to_s.camelize)
-
end
-
end
-
-
# An abstract cache store class. There are multiple cache store
-
# implementations, each having its own additional features. See the classes
-
# under the ActiveSupport::Cache module, e.g.
-
# ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most
-
# popular cache store for large production websites.
-
#
-
# Some implementations may not support all methods beyond the basic cache
-
# methods of +fetch+, +write+, +read+, +exist?+, and +delete+.
-
#
-
# ActiveSupport::Cache::Store can store any serializable Ruby object.
-
#
-
# cache = ActiveSupport::Cache::MemoryStore.new
-
#
-
# cache.read('city') # => nil
-
# cache.write('city', "Duckburgh")
-
# cache.read('city') # => "Duckburgh"
-
#
-
# Keys are always translated into Strings and are case sensitive. When an
-
# object is specified as a key and has a +cache_key+ method defined, this
-
# method will be called to define the key. Otherwise, the +to_param+
-
# method will be called. Hashes and Arrays can also be used as keys. The
-
# elements will be delimited by slashes, and the elements within a Hash
-
# will be sorted by key so they are consistent.
-
#
-
# cache.read('city') == cache.read(:city) # => true
-
#
-
# Nil values can be cached.
-
#
-
# If your cache is on a shared infrastructure, you can define a namespace
-
# for your cache entries. If a namespace is defined, it will be prefixed on
-
# to every key. The namespace can be either a static value or a Proc. If it
-
# is a Proc, it will be invoked when each key is evaluated so that you can
-
# use application logic to invalidate keys.
-
#
-
# cache.namespace = -> { @last_mod_time } # Set the namespace to a variable
-
# @last_mod_time = Time.now # Invalidate the entire cache by changing namespace
-
#
-
# Caches can also store values in a compressed format to save space and
-
# reduce time spent sending data. Since there is overhead, values must be
-
# large enough to warrant compression. To turn on compression either pass
-
# <tt>compress: true</tt> in the initializer or as an option to +fetch+
-
# or +write+. To specify the threshold at which to compress values, set the
-
# <tt>:compress_threshold</tt> option. The default threshold is 16K.
-
1
class Store
-
1
cattr_accessor :logger, :instance_writer => true
-
-
1
attr_reader :silence, :options
-
1
alias :silence? :silence
-
-
# Create a new cache. The options will be passed to any write method calls
-
# except for <tt>:namespace</tt> which can be used to set the global
-
# namespace for the cache.
-
1
def initialize(options = nil)
-
24
@options = options ? options.dup : {}
-
end
-
-
# Silence the logger.
-
1
def silence!
-
@silence = true
-
self
-
end
-
-
# Silence the logger within a block.
-
1
def mute
-
previous_silence, @silence = defined?(@silence) && @silence, true
-
yield
-
ensure
-
@silence = previous_silence
-
end
-
-
# :deprecated:
-
1
def self.instrument=(boolean)
-
ActiveSupport::Deprecation.warn "ActiveSupport::Cache.instrument= is deprecated and will be removed in Rails 5. Instrumentation is now always on so you can safely stop using it."
-
true
-
end
-
-
# :deprecated:
-
1
def self.instrument
-
ActiveSupport::Deprecation.warn "ActiveSupport::Cache.instrument is deprecated and will be removed in Rails 5. Instrumentation is now always on so you can safely stop using it."
-
true
-
end
-
-
# Fetches data from the cache, using the given key. If there is data in
-
# the cache with the given key, then that data is returned.
-
#
-
# If there is no such data in the cache (a cache miss), then +nil+ will be
-
# returned. However, if a block has been passed, that block will be passed
-
# the key and executed in the event of a cache miss. The return value of the
-
# block will be written to the cache under the given cache key, and that
-
# return value will be returned.
-
#
-
# cache.write('today', 'Monday')
-
# cache.fetch('today') # => "Monday"
-
#
-
# cache.fetch('city') # => nil
-
# cache.fetch('city') do
-
# 'Duckburgh'
-
# end
-
# cache.fetch('city') # => "Duckburgh"
-
#
-
# You may also specify additional options via the +options+ argument.
-
# Setting <tt>force: true</tt> will force a cache miss:
-
#
-
# cache.write('today', 'Monday')
-
# cache.fetch('today', force: true) # => nil
-
#
-
# Setting <tt>:compress</tt> will store a large cache entry set by the call
-
# in a compressed format.
-
#
-
# Setting <tt>:expires_in</tt> will set an expiration time on the cache.
-
# All caches support auto-expiring content after a specified number of
-
# seconds. This value can be specified as an option to the constructor
-
# (in which case all entries will be affected), or it can be supplied to
-
# the +fetch+ or +write+ method to effect just one entry.
-
#
-
# cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes)
-
# cache.write(key, value, expires_in: 1.minute) # Set a lower value for one entry
-
#
-
# Setting <tt>:race_condition_ttl</tt> is very useful in situations where
-
# a cache entry is used very frequently and is under heavy load. If a
-
# cache expires and due to heavy load several different processes will try
-
# to read data natively and then they all will try to write to cache. To
-
# avoid that case the first process to find an expired cache entry will
-
# bump the cache expiration time by the value set in <tt>:race_condition_ttl</tt>.
-
# Yes, this process is extending the time for a stale value by another few
-
# seconds. Because of extended life of the previous cache, other processes
-
# will continue to use slightly stale data for a just a bit longer. In the
-
# meantime that first process will go ahead and will write into cache the
-
# new value. After that all the processes will start getting the new value.
-
# The key is to keep <tt>:race_condition_ttl</tt> small.
-
#
-
# If the process regenerating the entry errors out, the entry will be
-
# regenerated after the specified number of seconds. Also note that the
-
# life of stale cache is extended only if it expired recently. Otherwise
-
# a new value is generated and <tt>:race_condition_ttl</tt> does not play
-
# any role.
-
#
-
# # Set all values to expire after one minute.
-
# cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute)
-
#
-
# cache.write('foo', 'original value')
-
# val_1 = nil
-
# val_2 = nil
-
# sleep 60
-
#
-
# Thread.new do
-
# val_1 = cache.fetch('foo', race_condition_ttl: 10) do
-
# sleep 1
-
# 'new value 1'
-
# end
-
# end
-
#
-
# Thread.new do
-
# val_2 = cache.fetch('foo', race_condition_ttl: 10) do
-
# 'new value 2'
-
# end
-
# end
-
#
-
# # val_1 => "new value 1"
-
# # val_2 => "original value"
-
# # sleep 10 # First thread extend the life of cache by another 10 seconds
-
# # cache.fetch('foo') => "new value 1"
-
#
-
# Other options will be handled by the specific cache store implementation.
-
# Internally, #fetch calls #read_entry, and calls #write_entry on a cache
-
# miss. +options+ will be passed to the #read and #write calls.
-
#
-
# For example, MemCacheStore's #write method supports the +:raw+
-
# option, which tells the memcached server to store all values as strings.
-
# We can use this option with #fetch too:
-
#
-
# cache = ActiveSupport::Cache::MemCacheStore.new
-
# cache.fetch("foo", force: true, raw: true) do
-
# :bar
-
# end
-
# cache.fetch('foo') # => "bar"
-
1
def fetch(name, options = nil)
-
if block_given?
-
options = merged_options(options)
-
key = namespaced_key(name, options)
-
-
cached_entry = find_cached_entry(key, name, options) unless options[:force]
-
entry = handle_expired_entry(cached_entry, key, options)
-
-
if entry
-
get_entry_value(entry, name, options)
-
else
-
save_block_result_to_cache(name, options) { |_name| yield _name }
-
end
-
else
-
read(name, options)
-
end
-
end
-
-
# Fetches data from the cache, using the given key. If there is data in
-
# the cache with the given key, then that data is returned. Otherwise,
-
# +nil+ is returned.
-
#
-
# Options are passed to the underlying cache implementation.
-
1
def read(name, options = nil)
-
options = merged_options(options)
-
key = namespaced_key(name, options)
-
instrument(:read, name, options) do |payload|
-
entry = read_entry(key, options)
-
if entry
-
if entry.expired?
-
delete_entry(key, options)
-
payload[:hit] = false if payload
-
nil
-
else
-
payload[:hit] = true if payload
-
entry.value
-
end
-
else
-
payload[:hit] = false if payload
-
nil
-
end
-
end
-
end
-
-
# Read multiple values at once from the cache. Options can be passed
-
# in the last argument.
-
#
-
# Some cache implementation may optimize this method.
-
#
-
# Returns a hash mapping the names provided to the values found.
-
1
def read_multi(*names)
-
options = names.extract_options!
-
options = merged_options(options)
-
results = {}
-
names.each do |name|
-
key = namespaced_key(name, options)
-
entry = read_entry(key, options)
-
if entry
-
if entry.expired?
-
delete_entry(key, options)
-
else
-
results[name] = entry.value
-
end
-
end
-
end
-
results
-
end
-
-
# Fetches data from the cache, using the given keys. If there is data in
-
# the cache with the given keys, then that data is returned. Otherwise,
-
# the supplied block is called for each key for which there was no data,
-
# and the result will be written to the cache and returned.
-
#
-
# Options are passed to the underlying cache implementation.
-
#
-
# Returns a hash with the data for each of the names. For example:
-
#
-
# cache.write("bim", "bam")
-
# cache.fetch_multi("bim", "boom") { |key| key * 2 }
-
# # => { "bam" => "bam", "boom" => "boomboom" }
-
#
-
1
def fetch_multi(*names)
-
options = names.extract_options!
-
options = merged_options(options)
-
results = read_multi(*names, options)
-
-
names.each_with_object({}) do |name, memo|
-
memo[name] = results.fetch(name) do
-
value = yield name
-
write(name, value, options)
-
value
-
end
-
end
-
end
-
-
# Writes the value to the cache, with the key.
-
#
-
# Options are passed to the underlying cache implementation.
-
1
def write(name, value, options = nil)
-
options = merged_options(options)
-
-
instrument(:write, name, options) do
-
entry = Entry.new(value, options)
-
write_entry(namespaced_key(name, options), entry, options)
-
end
-
end
-
-
# Deletes an entry in the cache. Returns +true+ if an entry is deleted.
-
#
-
# Options are passed to the underlying cache implementation.
-
1
def delete(name, options = nil)
-
options = merged_options(options)
-
-
instrument(:delete, name) do
-
delete_entry(namespaced_key(name, options), options)
-
end
-
end
-
-
# Returns +true+ if the cache contains an entry for the given key.
-
#
-
# Options are passed to the underlying cache implementation.
-
1
def exist?(name, options = nil)
-
options = merged_options(options)
-
-
instrument(:exist?, name) do
-
entry = read_entry(namespaced_key(name, options), options)
-
(entry && !entry.expired?) || false
-
end
-
end
-
-
# Delete all entries with keys matching the pattern.
-
#
-
# Options are passed to the underlying cache implementation.
-
#
-
# All implementations may not support this method.
-
1
def delete_matched(matcher, options = nil)
-
raise NotImplementedError.new("#{self.class.name} does not support delete_matched")
-
end
-
-
# Increment an integer value in the cache.
-
#
-
# Options are passed to the underlying cache implementation.
-
#
-
# All implementations may not support this method.
-
1
def increment(name, amount = 1, options = nil)
-
raise NotImplementedError.new("#{self.class.name} does not support increment")
-
end
-
-
# Decrement an integer value in the cache.
-
#
-
# Options are passed to the underlying cache implementation.
-
#
-
# All implementations may not support this method.
-
1
def decrement(name, amount = 1, options = nil)
-
raise NotImplementedError.new("#{self.class.name} does not support decrement")
-
end
-
-
# Cleanup the cache by removing expired entries.
-
#
-
# Options are passed to the underlying cache implementation.
-
#
-
# All implementations may not support this method.
-
1
def cleanup(options = nil)
-
raise NotImplementedError.new("#{self.class.name} does not support cleanup")
-
end
-
-
# Clear the entire cache. Be careful with this method since it could
-
# affect other processes if shared cache is being used.
-
#
-
# The options hash is passed to the underlying cache implementation.
-
#
-
# All implementations may not support this method.
-
1
def clear(options = nil)
-
raise NotImplementedError.new("#{self.class.name} does not support clear")
-
end
-
-
1
protected
-
# Add the namespace defined in the options to a pattern designed to
-
# match keys. Implementations that support delete_matched should call
-
# this method to translate a pattern that matches names into one that
-
# matches namespaced keys.
-
1
def key_matcher(pattern, options)
-
prefix = options[:namespace].is_a?(Proc) ? options[:namespace].call : options[:namespace]
-
if prefix
-
source = pattern.source
-
if source.start_with?('^')
-
source = source[1, source.length]
-
else
-
source = ".*#{source[0, source.length]}"
-
end
-
Regexp.new("^#{Regexp.escape(prefix)}:#{source}", pattern.options)
-
else
-
pattern
-
end
-
end
-
-
# Read an entry from the cache implementation. Subclasses must implement
-
# this method.
-
1
def read_entry(key, options) # :nodoc:
-
raise NotImplementedError.new
-
end
-
-
# Write an entry to the cache implementation. Subclasses must implement
-
# this method.
-
1
def write_entry(key, entry, options) # :nodoc:
-
raise NotImplementedError.new
-
end
-
-
# Delete an entry from the cache implementation. Subclasses must
-
# implement this method.
-
1
def delete_entry(key, options) # :nodoc:
-
raise NotImplementedError.new
-
end
-
-
1
private
-
# Merge the default options with ones specific to a method call.
-
1
def merged_options(call_options) # :nodoc:
-
if call_options
-
options.merge(call_options)
-
else
-
options.dup
-
end
-
end
-
-
# Expand key to be a consistent string value. Invoke +cache_key+ if
-
# object responds to +cache_key+. Otherwise, +to_param+ method will be
-
# called. If the key is a Hash, then keys will be sorted alphabetically.
-
1
def expanded_key(key) # :nodoc:
-
return key.cache_key.to_s if key.respond_to?(:cache_key)
-
-
case key
-
when Array
-
if key.size > 1
-
key = key.collect{|element| expanded_key(element)}
-
else
-
key = key.first
-
end
-
when Hash
-
key = key.sort_by { |k,_| k.to_s }.collect{|k,v| "#{k}=#{v}"}
-
end
-
-
key.to_param
-
end
-
-
# Prefix a key with the namespace. Namespace and key will be delimited
-
# with a colon.
-
1
def namespaced_key(key, options)
-
key = expanded_key(key)
-
namespace = options[:namespace] if options
-
prefix = namespace.is_a?(Proc) ? namespace.call : namespace
-
key = "#{prefix}:#{key}" if prefix
-
key
-
end
-
-
1
def instrument(operation, key, options = nil)
-
log(operation, key, options)
-
-
payload = { :key => key }
-
payload.merge!(options) if options.is_a?(Hash)
-
ActiveSupport::Notifications.instrument("cache_#{operation}.active_support", payload){ yield(payload) }
-
end
-
-
1
def log(operation, key, options = nil)
-
return unless logger && logger.debug? && !silence?
-
logger.debug("Cache #{operation}: #{key}#{options.blank? ? "" : " (#{options.inspect})"}")
-
end
-
-
1
def find_cached_entry(key, name, options)
-
instrument(:read, name, options) do |payload|
-
payload[:super_operation] = :fetch if payload
-
read_entry(key, options)
-
end
-
end
-
-
1
def handle_expired_entry(entry, key, options)
-
if entry && entry.expired?
-
race_ttl = options[:race_condition_ttl].to_i
-
if (race_ttl > 0) && (Time.now.to_f - entry.expires_at <= race_ttl)
-
# When an entry has :race_condition_ttl defined, put the stale entry back into the cache
-
# for a brief period while the entry is begin recalculated.
-
entry.expires_at = Time.now + race_ttl
-
write_entry(key, entry, :expires_in => race_ttl * 2)
-
else
-
delete_entry(key, options)
-
end
-
entry = nil
-
end
-
entry
-
end
-
-
1
def get_entry_value(entry, name, options)
-
instrument(:fetch_hit, name, options) { |payload| }
-
entry.value
-
end
-
-
1
def save_block_result_to_cache(name, options)
-
result = instrument(:generate, name, options) do |payload|
-
yield(name)
-
end
-
-
write(name, result, options)
-
result
-
end
-
end
-
-
# This class is used to represent cache entries. Cache entries have a value and an optional
-
# expiration time. The expiration time is used to support the :race_condition_ttl option
-
# on the cache.
-
#
-
# Since cache entries in most instances will be serialized, the internals of this class are highly optimized
-
# using short instance variable names that are lazily defined.
-
1
class Entry # :nodoc:
-
1
DEFAULT_COMPRESS_LIMIT = 16.kilobytes
-
-
# Create a new cache entry for the specified value. Options supported are
-
# +:compress+, +:compress_threshold+, and +:expires_in+.
-
1
def initialize(value, options = {})
-
if should_compress?(value, options)
-
@value = compress(value)
-
@compressed = true
-
else
-
@value = value
-
end
-
-
@created_at = Time.now.to_f
-
@expires_in = options[:expires_in]
-
@expires_in = @expires_in.to_f if @expires_in
-
end
-
-
1
def value
-
convert_version_4beta1_entry! if defined?(@v)
-
compressed? ? uncompress(@value) : @value
-
end
-
-
# Check if the entry is expired. The +expires_in+ parameter can override
-
# the value set when the entry was created.
-
1
def expired?
-
convert_version_4beta1_entry! if defined?(@v)
-
@expires_in && @created_at + @expires_in <= Time.now.to_f
-
end
-
-
1
def expires_at
-
@expires_in ? @created_at + @expires_in : nil
-
end
-
-
1
def expires_at=(value)
-
if value
-
@expires_in = value.to_f - @created_at
-
else
-
@expires_in = nil
-
end
-
end
-
-
# Returns the size of the cached value. This could be less than
-
# <tt>value.size</tt> if the data is compressed.
-
1
def size
-
if defined?(@s)
-
@s
-
else
-
case value
-
when NilClass
-
0
-
when String
-
@value.bytesize
-
else
-
@s = Marshal.dump(@value).bytesize
-
end
-
end
-
end
-
-
# Duplicate the value in a class. This is used by cache implementations that don't natively
-
# serialize entries to protect against accidental cache modifications.
-
1
def dup_value!
-
convert_version_4beta1_entry! if defined?(@v)
-
-
if @value && !compressed? && !(@value.is_a?(Numeric) || @value == true || @value == false)
-
if @value.is_a?(String)
-
@value = @value.dup
-
else
-
@value = Marshal.load(Marshal.dump(@value))
-
end
-
end
-
end
-
-
1
private
-
1
def should_compress?(value, options)
-
if value && options[:compress]
-
compress_threshold = options[:compress_threshold] || DEFAULT_COMPRESS_LIMIT
-
serialized_value_size = (value.is_a?(String) ? value : Marshal.dump(value)).bytesize
-
-
return true if serialized_value_size >= compress_threshold
-
end
-
-
false
-
end
-
-
1
def compressed?
-
defined?(@compressed) ? @compressed : false
-
end
-
-
1
def compress(value)
-
Zlib::Deflate.deflate(Marshal.dump(value))
-
end
-
-
1
def uncompress(value)
-
Marshal.load(Zlib::Inflate.inflate(value))
-
end
-
-
# The internals of this method changed between Rails 3.x and 4.0. This method provides the glue
-
# to ensure that cache entries created under the old version still work with the new class definition.
-
1
def convert_version_4beta1_entry!
-
if defined?(@v)
-
@value = @v
-
remove_instance_variable(:@v)
-
end
-
-
if defined?(@c)
-
@compressed = @c
-
remove_instance_variable(:@c)
-
end
-
-
if defined?(@x) && @x
-
@created_at ||= Time.now.to_f
-
@expires_in = @x - @created_at
-
remove_instance_variable(:@x)
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/marshal'
-
1
require 'active_support/core_ext/file/atomic'
-
1
require 'active_support/core_ext/string/conversions'
-
1
require 'uri/common'
-
-
1
module ActiveSupport
-
1
module Cache
-
# A cache store implementation which stores everything on the filesystem.
-
#
-
# FileStore implements the Strategy::LocalCache strategy which implements
-
# an in-memory cache inside of a block.
-
1
class FileStore < Store
-
1
attr_reader :cache_path
-
-
1
DIR_FORMATTER = "%03X"
-
1
FILENAME_MAX_SIZE = 228 # max filename size on file system is 255, minus room for timestamp and random characters appended by Tempfile (used by atomic write)
-
1
FILEPATH_MAX_SIZE = 900 # max is 1024, plus some room
-
1
EXCLUDED_DIRS = ['.', '..'].freeze
-
-
1
def initialize(cache_path, options = nil)
-
1
super(options)
-
1
@cache_path = cache_path.to_s
-
1
extend Strategy::LocalCache
-
end
-
-
# Deletes all items from the cache. In this case it deletes all the entries in the specified
-
# file store directory except for .gitkeep. Be careful which directory is specified in your
-
# config file when using +FileStore+ because everything in that directory will be deleted.
-
1
def clear(options = nil)
-
root_dirs = Dir.entries(cache_path).reject {|f| (EXCLUDED_DIRS + [".gitkeep"]).include?(f)}
-
FileUtils.rm_r(root_dirs.collect{|f| File.join(cache_path, f)})
-
end
-
-
# Preemptively iterates through all stored keys and removes the ones which have expired.
-
1
def cleanup(options = nil)
-
options = merged_options(options)
-
search_dir(cache_path) do |fname|
-
key = file_path_key(fname)
-
entry = read_entry(key, options)
-
delete_entry(key, options) if entry && entry.expired?
-
end
-
end
-
-
# Increments an already existing integer value that is stored in the cache.
-
# If the key is not found nothing is done.
-
1
def increment(name, amount = 1, options = nil)
-
modify_value(name, amount, options)
-
end
-
-
# Decrements an already existing integer value that is stored in the cache.
-
# If the key is not found nothing is done.
-
1
def decrement(name, amount = 1, options = nil)
-
modify_value(name, -amount, options)
-
end
-
-
1
def delete_matched(matcher, options = nil)
-
options = merged_options(options)
-
instrument(:delete_matched, matcher.inspect) do
-
matcher = key_matcher(matcher, options)
-
search_dir(cache_path) do |path|
-
key = file_path_key(path)
-
delete_entry(key, options) if key.match(matcher)
-
end
-
end
-
end
-
-
1
protected
-
-
1
def read_entry(key, options)
-
file_name = key_file_path(key)
-
if File.exist?(file_name)
-
File.open(file_name) { |f| Marshal.load(f) }
-
end
-
rescue => e
-
logger.error("FileStoreError (#{e}): #{e.message}") if logger
-
nil
-
end
-
-
1
def write_entry(key, entry, options)
-
file_name = key_file_path(key)
-
return false if options[:unless_exist] && File.exist?(file_name)
-
ensure_cache_path(File.dirname(file_name))
-
File.atomic_write(file_name, cache_path) {|f| Marshal.dump(entry, f)}
-
true
-
end
-
-
1
def delete_entry(key, options)
-
file_name = key_file_path(key)
-
if File.exist?(file_name)
-
begin
-
File.delete(file_name)
-
delete_empty_directories(File.dirname(file_name))
-
true
-
rescue => e
-
# Just in case the error was caused by another process deleting the file first.
-
raise e if File.exist?(file_name)
-
false
-
end
-
end
-
end
-
-
1
private
-
# Lock a file for a block so only one process can modify it at a time.
-
1
def lock_file(file_name, &block) # :nodoc:
-
if File.exist?(file_name)
-
File.open(file_name, 'r+') do |f|
-
begin
-
f.flock File::LOCK_EX
-
yield
-
ensure
-
f.flock File::LOCK_UN
-
end
-
end
-
else
-
yield
-
end
-
end
-
-
# Translate a key into a file path.
-
1
def key_file_path(key)
-
if key.size > FILEPATH_MAX_SIZE
-
key = Digest::MD5.hexdigest(key)
-
end
-
-
fname = URI.encode_www_form_component(key)
-
hash = Zlib.adler32(fname)
-
hash, dir_1 = hash.divmod(0x1000)
-
dir_2 = hash.modulo(0x1000)
-
fname_paths = []
-
-
# Make sure file name doesn't exceed file system limits.
-
begin
-
fname_paths << fname[0, FILENAME_MAX_SIZE]
-
fname = fname[FILENAME_MAX_SIZE..-1]
-
end until fname.blank?
-
-
File.join(cache_path, DIR_FORMATTER % dir_1, DIR_FORMATTER % dir_2, *fname_paths)
-
end
-
-
# Translate a file path into a key.
-
1
def file_path_key(path)
-
fname = path[cache_path.to_s.size..-1].split(File::SEPARATOR, 4).last
-
URI.decode_www_form_component(fname, Encoding::UTF_8)
-
end
-
-
# Delete empty directories in the cache.
-
1
def delete_empty_directories(dir)
-
return if File.realpath(dir) == File.realpath(cache_path)
-
if Dir.entries(dir).reject {|f| EXCLUDED_DIRS.include?(f)}.empty?
-
Dir.delete(dir) rescue nil
-
delete_empty_directories(File.dirname(dir))
-
end
-
end
-
-
# Make sure a file path's directories exist.
-
1
def ensure_cache_path(path)
-
FileUtils.makedirs(path) unless File.exist?(path)
-
end
-
-
1
def search_dir(dir, &callback)
-
return if !File.exist?(dir)
-
Dir.foreach(dir) do |d|
-
next if EXCLUDED_DIRS.include?(d)
-
name = File.join(dir, d)
-
if File.directory?(name)
-
search_dir(name, &callback)
-
else
-
callback.call name
-
end
-
end
-
end
-
-
# Modifies the amount of an already existing integer value that is stored in the cache.
-
# If the key is not found nothing is done.
-
1
def modify_value(name, amount, options)
-
file_name = key_file_path(namespaced_key(name, options))
-
-
lock_file(file_name) do
-
options = merged_options(options)
-
-
if num = read(name, options)
-
num = num.to_i + amount
-
write(name, num, options)
-
num
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/object/duplicable'
-
1
require 'active_support/core_ext/string/inflections'
-
1
require 'active_support/per_thread_registry'
-
-
1
module ActiveSupport
-
1
module Cache
-
1
module Strategy
-
# Caches that implement LocalCache will be backed by an in-memory cache for the
-
# duration of a block. Repeated calls to the cache for the same key will hit the
-
# in-memory cache for faster access.
-
1
module LocalCache
-
1
autoload :Middleware, 'active_support/cache/strategy/local_cache_middleware'
-
-
# Class for storing and registering the local caches.
-
1
class LocalCacheRegistry # :nodoc:
-
1
extend ActiveSupport::PerThreadRegistry
-
-
1
def initialize
-
1
@registry = {}
-
end
-
-
1
def cache_for(local_cache_key)
-
@registry[local_cache_key]
-
end
-
-
1
def set_cache_for(local_cache_key, value)
-
46
@registry[local_cache_key] = value
-
end
-
-
47
def self.set_cache_for(l, v); instance.set_cache_for l, v; end
-
1
def self.cache_for(l); instance.cache_for l; end
-
end
-
-
# Simple memory backed cache. This cache is not thread safe and is intended only
-
# for serving as a temporary memory cache for a single thread.
-
1
class LocalStore < Store
-
1
def initialize
-
23
super
-
23
@data = {}
-
end
-
-
# Don't allow synchronizing since it isn't thread safe,
-
1
def synchronize # :nodoc:
-
yield
-
end
-
-
1
def clear(options = nil)
-
@data.clear
-
end
-
-
1
def read_entry(key, options)
-
@data[key]
-
end
-
-
1
def write_entry(key, value, options)
-
@data[key] = value
-
true
-
end
-
-
1
def delete_entry(key, options)
-
!!@data.delete(key)
-
end
-
end
-
-
# Use a local cache for the duration of block.
-
1
def with_local_cache
-
use_temporary_local_cache(LocalStore.new) { yield }
-
end
-
# Middleware class can be inserted as a Rack handler to be local cache for the
-
# duration of request.
-
1
def middleware
-
@middleware ||= Middleware.new(
-
"ActiveSupport::Cache::Strategy::LocalCache",
-
1
local_cache_key)
-
end
-
-
1
def clear(options = nil) # :nodoc:
-
local_cache.clear(options) if local_cache
-
super
-
end
-
-
1
def cleanup(options = nil) # :nodoc:
-
local_cache.clear(options) if local_cache
-
super
-
end
-
-
1
def increment(name, amount = 1, options = nil) # :nodoc:
-
value = bypass_local_cache{super}
-
set_cache_value(value, name, amount, options)
-
value
-
end
-
-
1
def decrement(name, amount = 1, options = nil) # :nodoc:
-
value = bypass_local_cache{super}
-
set_cache_value(value, name, amount, options)
-
value
-
end
-
-
1
protected
-
1
def read_entry(key, options) # :nodoc:
-
if local_cache
-
entry = local_cache.read_entry(key, options)
-
unless entry
-
entry = super
-
local_cache.write_entry(key, entry, options)
-
end
-
entry
-
else
-
super
-
end
-
end
-
-
1
def write_entry(key, entry, options) # :nodoc:
-
local_cache.write_entry(key, entry, options) if local_cache
-
super
-
end
-
-
1
def delete_entry(key, options) # :nodoc:
-
local_cache.delete_entry(key, options) if local_cache
-
super
-
end
-
-
1
def set_cache_value(value, name, amount, options)
-
if local_cache
-
local_cache.mute do
-
if value
-
local_cache.write(name, value, options)
-
else
-
local_cache.delete(name, options)
-
end
-
end
-
end
-
end
-
-
1
private
-
-
1
def local_cache_key
-
1
@local_cache_key ||= "#{self.class.name.underscore}_local_cache_#{object_id}".gsub(/[\/-]/, '_').to_sym
-
end
-
-
1
def local_cache
-
LocalCacheRegistry.cache_for(local_cache_key)
-
end
-
-
1
def bypass_local_cache
-
use_temporary_local_cache(nil) { yield }
-
end
-
-
1
def use_temporary_local_cache(temporary_cache)
-
save_cache = LocalCacheRegistry.cache_for(local_cache_key)
-
begin
-
LocalCacheRegistry.set_cache_for(local_cache_key, temporary_cache)
-
yield
-
ensure
-
LocalCacheRegistry.set_cache_for(local_cache_key, save_cache)
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require 'rack/body_proxy'
-
1
require 'rack/utils'
-
-
1
module ActiveSupport
-
1
module Cache
-
1
module Strategy
-
1
module LocalCache
-
-
#--
-
# This class wraps up local storage for middlewares. Only the middleware method should
-
# construct them.
-
1
class Middleware # :nodoc:
-
1
attr_reader :name, :local_cache_key
-
-
1
def initialize(name, local_cache_key)
-
1
@name = name
-
1
@local_cache_key = local_cache_key
-
1
@app = nil
-
end
-
-
1
def new(app)
-
1
@app = app
-
1
self
-
end
-
-
1
def call(env)
-
23
LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)
-
23
response = @app.call(env)
-
23
response[2] = ::Rack::BodyProxy.new(response[2]) do
-
23
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
-
end
-
23
response
-
rescue Rack::Utils::InvalidParameterError
-
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
-
[400, {}, []]
-
rescue Exception
-
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
-
raise
-
end
-
end
-
end
-
end
-
end
-
end
-
1
Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].each do |path|
-
24
require path
-
end
-
1
require 'securerandom'
-
-
1
module Digest
-
1
module UUID
-
1
DNS_NAMESPACE = "k\xA7\xB8\x10\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
-
1
URL_NAMESPACE = "k\xA7\xB8\x11\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
-
1
OID_NAMESPACE = "k\xA7\xB8\x12\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
-
1
X500_NAMESPACE = "k\xA7\xB8\x14\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
-
-
# Generates a v5 non-random UUID (Universally Unique IDentifier).
-
#
-
# Using Digest::MD5 generates version 3 UUIDs; Digest::SHA1 generates version 5 UUIDs.
-
# uuid_from_hash always generates the same UUID for a given name and namespace combination.
-
#
-
# See RFC 4122 for details of UUID at: http://www.ietf.org/rfc/rfc4122.txt
-
1
def self.uuid_from_hash(hash_class, uuid_namespace, name)
-
if hash_class == Digest::MD5
-
version = 3
-
elsif hash_class == Digest::SHA1
-
version = 5
-
else
-
raise ArgumentError, "Expected Digest::SHA1 or Digest::MD5, got #{hash_class.name}."
-
end
-
-
hash = hash_class.new
-
hash.update(uuid_namespace)
-
hash.update(name)
-
-
ary = hash.digest.unpack('NnnnnN')
-
ary[2] = (ary[2] & 0x0FFF) | (version << 12)
-
ary[3] = (ary[3] & 0x3FFF) | 0x8000
-
-
"%08x-%04x-%04x-%04x-%04x%08x" % ary
-
end
-
-
# Convenience method for uuid_from_hash using Digest::MD5.
-
1
def self.uuid_v3(uuid_namespace, name)
-
self.uuid_from_hash(Digest::MD5, uuid_namespace, name)
-
end
-
-
# Convenience method for uuid_from_hash using Digest::SHA1.
-
1
def self.uuid_v5(uuid_namespace, name)
-
self.uuid_from_hash(Digest::SHA1, uuid_namespace, name)
-
end
-
-
# Convenience method for SecureRandom.uuid.
-
1
def self.uuid_v4
-
SecureRandom.uuid
-
end
-
end
-
end
-
1
require 'active_support/core_ext/file/atomic'
-
1
require 'fileutils'
-
-
1
class File
-
# Write to a file atomically. Useful for situations where you don't
-
# want other processes or threads to see half-written files.
-
#
-
# File.atomic_write('important.file') do |file|
-
# file.write('hello')
-
# end
-
#
-
# If your temp directory is not on the same filesystem as the file you're
-
# trying to write, you can provide a different temporary directory.
-
#
-
# File.atomic_write('/data/something.important', '/data/tmp') do |file|
-
# file.write('hello')
-
# end
-
1
def self.atomic_write(file_name, temp_dir = Dir.tmpdir)
-
require 'tempfile' unless defined?(Tempfile)
-
require 'fileutils' unless defined?(FileUtils)
-
-
temp_file = Tempfile.new(basename(file_name), temp_dir)
-
temp_file.binmode
-
yield temp_file
-
temp_file.close
-
-
if File.exist?(file_name)
-
# Get original file permissions
-
old_stat = stat(file_name)
-
else
-
# If not possible, probe which are the default permissions in the
-
# destination directory.
-
old_stat = probe_stat_in(dirname(file_name))
-
end
-
-
# Overwrite original file with temp file
-
FileUtils.mv(temp_file.path, file_name)
-
-
# Set correct permissions on new file
-
begin
-
chown(old_stat.uid, old_stat.gid, file_name)
-
# This operation will affect filesystem ACL's
-
chmod(old_stat.mode, file_name)
-
rescue Errno::EPERM, Errno::EACCES
-
# Changing file ownership failed, moving on.
-
end
-
end
-
-
# Private utility method.
-
1
def self.probe_stat_in(dir) #:nodoc:
-
basename = [
-
'.permissions_check',
-
Thread.current.object_id,
-
Process.pid,
-
rand(1000000)
-
].join('.')
-
-
file_name = join(dir, basename)
-
FileUtils.touch(file_name)
-
stat(file_name)
-
ensure
-
FileUtils.rm_f(file_name) if file_name
-
end
-
end
-
1
require 'active_support/core_ext/hash/compact'
-
1
require 'active_support/core_ext/hash/conversions'
-
1
require 'active_support/core_ext/hash/deep_merge'
-
1
require 'active_support/core_ext/hash/except'
-
1
require 'active_support/core_ext/hash/indifferent_access'
-
1
require 'active_support/core_ext/hash/keys'
-
1
require 'active_support/core_ext/hash/reverse_merge'
-
1
require 'active_support/core_ext/hash/slice'
-
1
require 'active_support/core_ext/hash/transform_values'
-
1
class Hash
-
# Returns a hash with non +nil+ values.
-
#
-
# hash = { a: true, b: false, c: nil}
-
# hash.compact # => { a: true, b: false}
-
# hash # => { a: true, b: false, c: nil}
-
# { c: nil }.compact # => {}
-
1
def compact
-
self.select { |_, value| !value.nil? }
-
end
-
-
# Replaces current hash with non +nil+ values.
-
#
-
# hash = { a: true, b: false, c: nil}
-
# hash.compact! # => { a: true, b: false}
-
# hash # => { a: true, b: false}
-
1
def compact!
-
self.reject! { |_, value| value.nil? }
-
end
-
end
-
1
require 'active_support/core_ext/integer/multiple'
-
1
require 'active_support/core_ext/integer/inflections'
-
1
require 'active_support/core_ext/integer/time'
-
1
require 'active_support/inflector'
-
-
1
class Integer
-
# Ordinalize turns a number into an ordinal string used to denote the
-
# position in an ordered sequence such as 1st, 2nd, 3rd, 4th.
-
#
-
# 1.ordinalize # => "1st"
-
# 2.ordinalize # => "2nd"
-
# 1002.ordinalize # => "1002nd"
-
# 1003.ordinalize # => "1003rd"
-
# -11.ordinalize # => "-11th"
-
# -1001.ordinalize # => "-1001st"
-
1
def ordinalize
-
ActiveSupport::Inflector.ordinalize(self)
-
end
-
-
# Ordinal returns the suffix used to denote the position
-
# in an ordered sequence such as 1st, 2nd, 3rd, 4th.
-
#
-
# 1.ordinal # => "st"
-
# 2.ordinal # => "nd"
-
# 1002.ordinal # => "nd"
-
# 1003.ordinal # => "rd"
-
# -11.ordinal # => "th"
-
# -1001.ordinal # => "st"
-
1
def ordinal
-
ActiveSupport::Inflector.ordinal(self)
-
end
-
end
-
1
class Integer
-
# Check whether the integer is evenly divisible by the argument.
-
#
-
# 0.multiple_of?(0) # => true
-
# 6.multiple_of?(5) # => false
-
# 10.multiple_of?(2) # => true
-
1
def multiple_of?(number)
-
number != 0 ? self % number == 0 : zero?
-
end
-
end
-
1
require 'active_support/core_ext/kernel/agnostics'
-
1
require 'active_support/core_ext/kernel/concern'
-
1
require 'active_support/core_ext/kernel/debugger' if RUBY_VERSION < '2.0.0'
-
1
require 'active_support/core_ext/kernel/reporting'
-
1
require 'active_support/core_ext/kernel/singleton_class'
-
1
class Object
-
# Makes backticks behave (somewhat more) similarly on all platforms.
-
# On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the
-
# spawned shell prints a message to stderr and sets $?. We emulate
-
# Unix on the former but not the latter.
-
1
def `(command) #:nodoc:
-
2
super
-
rescue Errno::ENOENT => e
-
STDERR.puts "#$0: #{e}"
-
end
-
end
-
1
require 'active_support/core_ext/module/concerning'
-
-
1
module Kernel
-
# A shortcut to define a toplevel concern, not within a module.
-
#
-
# See Module::Concerning for more.
-
1
def concern(topic, &module_definition)
-
Object.concern topic, &module_definition
-
end
-
end
-
1
require 'active_support/core_ext/module/aliasing'
-
-
1
module Marshal
-
1
class << self
-
1
def load_with_autoloading(source)
-
43
load_without_autoloading(source)
-
rescue ArgumentError, NameError => exc
-
if exc.message.match(%r|undefined class/module (.+)|)
-
# try loading the class/module
-
$1.constantize
-
# if it is a IO we need to go back to read the object
-
source.rewind if source.respond_to?(:rewind)
-
retry
-
else
-
raise exc
-
end
-
end
-
-
1
alias_method_chain :load, :autoloading
-
end
-
end
-
1
require 'active_support/core_ext/numeric/bytes'
-
1
require 'active_support/core_ext/numeric/time'
-
1
require 'active_support/core_ext/numeric/conversions'
-
1
require 'active_support/core_ext/big_decimal/conversions'
-
1
require 'active_support/number_helper'
-
-
1
class Numeric
-
-
# Provides options for converting numbers into formatted strings.
-
# Options are provided for phone numbers, currency, percentage,
-
# precision, positional notation, file size and pretty printing.
-
#
-
# ==== Options
-
#
-
# For details on which formats use which options, see ActiveSupport::NumberHelper
-
#
-
# ==== Examples
-
#
-
# Phone Numbers:
-
# 5551234.to_s(:phone) # => 555-1234
-
# 1235551234.to_s(:phone) # => 123-555-1234
-
# 1235551234.to_s(:phone, area_code: true) # => (123) 555-1234
-
# 1235551234.to_s(:phone, delimiter: ' ') # => 123 555 1234
-
# 1235551234.to_s(:phone, area_code: true, extension: 555) # => (123) 555-1234 x 555
-
# 1235551234.to_s(:phone, country_code: 1) # => +1-123-555-1234
-
# 1235551234.to_s(:phone, country_code: 1, extension: 1343, delimiter: '.')
-
# # => +1.123.555.1234 x 1343
-
#
-
# Currency:
-
# 1234567890.50.to_s(:currency) # => $1,234,567,890.50
-
# 1234567890.506.to_s(:currency) # => $1,234,567,890.51
-
# 1234567890.506.to_s(:currency, precision: 3) # => $1,234,567,890.506
-
# 1234567890.506.to_s(:currency, locale: :fr) # => 1 234 567 890,51 €
-
# -1234567890.50.to_s(:currency, negative_format: '(%u%n)')
-
# # => ($1,234,567,890.50)
-
# 1234567890.50.to_s(:currency, unit: '£', separator: ',', delimiter: '')
-
# # => £1234567890,50
-
# 1234567890.50.to_s(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u')
-
# # => 1234567890,50 £
-
#
-
# Percentage:
-
# 100.to_s(:percentage) # => 100.000%
-
# 100.to_s(:percentage, precision: 0) # => 100%
-
# 1000.to_s(:percentage, delimiter: '.', separator: ',') # => 1.000,000%
-
# 302.24398923423.to_s(:percentage, precision: 5) # => 302.24399%
-
# 1000.to_s(:percentage, locale: :fr) # => 1 000,000%
-
# 100.to_s(:percentage, format: '%n %') # => 100.000 %
-
#
-
# Delimited:
-
# 12345678.to_s(:delimited) # => 12,345,678
-
# 12345678.05.to_s(:delimited) # => 12,345,678.05
-
# 12345678.to_s(:delimited, delimiter: '.') # => 12.345.678
-
# 12345678.to_s(:delimited, delimiter: ',') # => 12,345,678
-
# 12345678.05.to_s(:delimited, separator: ' ') # => 12,345,678 05
-
# 12345678.05.to_s(:delimited, locale: :fr) # => 12 345 678,05
-
# 98765432.98.to_s(:delimited, delimiter: ' ', separator: ',')
-
# # => 98 765 432,98
-
#
-
# Rounded:
-
# 111.2345.to_s(:rounded) # => 111.235
-
# 111.2345.to_s(:rounded, precision: 2) # => 111.23
-
# 13.to_s(:rounded, precision: 5) # => 13.00000
-
# 389.32314.to_s(:rounded, precision: 0) # => 389
-
# 111.2345.to_s(:rounded, significant: true) # => 111
-
# 111.2345.to_s(:rounded, precision: 1, significant: true) # => 100
-
# 13.to_s(:rounded, precision: 5, significant: true) # => 13.000
-
# 111.234.to_s(:rounded, locale: :fr) # => 111,234
-
# 13.to_s(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true)
-
# # => 13
-
# 389.32314.to_s(:rounded, precision: 4, significant: true) # => 389.3
-
# 1111.2345.to_s(:rounded, precision: 2, separator: ',', delimiter: '.')
-
# # => 1.111,23
-
#
-
# Human-friendly size in Bytes:
-
# 123.to_s(:human_size) # => 123 Bytes
-
# 1234.to_s(:human_size) # => 1.21 KB
-
# 12345.to_s(:human_size) # => 12.1 KB
-
# 1234567.to_s(:human_size) # => 1.18 MB
-
# 1234567890.to_s(:human_size) # => 1.15 GB
-
# 1234567890123.to_s(:human_size) # => 1.12 TB
-
# 1234567.to_s(:human_size, precision: 2) # => 1.2 MB
-
# 483989.to_s(:human_size, precision: 2) # => 470 KB
-
# 1234567.to_s(:human_size, precision: 2, separator: ',') # => 1,2 MB
-
# 1234567890123.to_s(:human_size, precision: 5) # => "1.1228 TB"
-
# 524288000.to_s(:human_size, precision: 5) # => "500 MB"
-
#
-
# Human-friendly format:
-
# 123.to_s(:human) # => "123"
-
# 1234.to_s(:human) # => "1.23 Thousand"
-
# 12345.to_s(:human) # => "12.3 Thousand"
-
# 1234567.to_s(:human) # => "1.23 Million"
-
# 1234567890.to_s(:human) # => "1.23 Billion"
-
# 1234567890123.to_s(:human) # => "1.23 Trillion"
-
# 1234567890123456.to_s(:human) # => "1.23 Quadrillion"
-
# 1234567890123456789.to_s(:human) # => "1230 Quadrillion"
-
# 489939.to_s(:human, precision: 2) # => "490 Thousand"
-
# 489939.to_s(:human, precision: 4) # => "489.9 Thousand"
-
# 1234567.to_s(:human, precision: 4,
-
# significant: false) # => "1.2346 Million"
-
# 1234567.to_s(:human, precision: 1,
-
# separator: ',',
-
# significant: false) # => "1,2 Million"
-
1
def to_formatted_s(format = :default, options = {})
-
case format
-
when :phone
-
return ActiveSupport::NumberHelper.number_to_phone(self, options)
-
when :currency
-
return ActiveSupport::NumberHelper.number_to_currency(self, options)
-
when :percentage
-
return ActiveSupport::NumberHelper.number_to_percentage(self, options)
-
when :delimited
-
return ActiveSupport::NumberHelper.number_to_delimited(self, options)
-
when :rounded
-
return ActiveSupport::NumberHelper.number_to_rounded(self, options)
-
when :human
-
return ActiveSupport::NumberHelper.number_to_human(self, options)
-
when :human_size
-
return ActiveSupport::NumberHelper.number_to_human_size(self, options)
-
else
-
self.to_default_s
-
end
-
end
-
-
1
[Float, Fixnum, Bignum, BigDecimal].each do |klass|
-
4
klass.send(:alias_method, :to_default_s, :to_s)
-
-
4
klass.send(:define_method, :to_s) do |*args|
-
17051
if args[0].is_a?(Symbol)
-
format = args[0]
-
options = args[1] || {}
-
-
self.to_formatted_s(format, options)
-
else
-
17051
to_default_s(*args)
-
end
-
end
-
end
-
end
-
class Thread
-
LOCK = Mutex.new # :nodoc:
-
-
# Returns the value of a thread local variable that has been set. Note that
-
# these are different than fiber local values.
-
#
-
# Thread local values are carried along with threads, and do not respect
-
# fibers. For example:
-
#
-
# Thread.new {
-
# Thread.current.thread_variable_set("foo", "bar") # set a thread local
-
# Thread.current["foo"] = "bar" # set a fiber local
-
#
-
# Fiber.new {
-
# Fiber.yield [
-
# Thread.current.thread_variable_get("foo"), # get the thread local
-
# Thread.current["foo"], # get the fiber local
-
# ]
-
# }.resume
-
# }.join.value # => ['bar', nil]
-
#
-
# The value <tt>"bar"</tt> is returned for the thread local, where +nil+ is returned
-
# for the fiber local. The fiber is executed in the same thread, so the
-
# thread local values are available.
-
def thread_variable_get(key)
-
_locals[key.to_sym]
-
end
-
-
# Sets a thread local with +key+ to +value+. Note that these are local to
-
# threads, and not to fibers. Please see Thread#thread_variable_get for
-
# more information.
-
def thread_variable_set(key, value)
-
_locals[key.to_sym] = value
-
end
-
-
# Returns an array of the names of the thread-local variables (as Symbols).
-
#
-
# thr = Thread.new do
-
# Thread.current.thread_variable_set(:cat, 'meow')
-
# Thread.current.thread_variable_set("dog", 'woof')
-
# end
-
# thr.join # => #<Thread:0x401b3f10 dead>
-
# thr.thread_variables # => [:dog, :cat]
-
#
-
# Note that these are not fiber local variables. Please see Thread#thread_variable_get
-
# for more details.
-
def thread_variables
-
_locals.keys
-
end
-
-
# Returns <tt>true</tt> if the given string (or symbol) exists as a
-
# thread-local variable.
-
#
-
# me = Thread.current
-
# me.thread_variable_set(:oliver, "a")
-
# me.thread_variable?(:oliver) # => true
-
# me.thread_variable?(:stanley) # => false
-
#
-
# Note that these are not fiber local variables. Please see Thread#thread_variable_get
-
# for more details.
-
def thread_variable?(key)
-
_locals.has_key?(key.to_sym)
-
end
-
-
# Freezes the thread so that thread local variables cannot be set via
-
# Thread#thread_variable_set, nor can fiber local variables be set.
-
#
-
# me = Thread.current
-
# me.freeze
-
# me.thread_variable_set(:oliver, "a") #=> RuntimeError: can't modify frozen thread locals
-
# me[:oliver] = "a" #=> RuntimeError: can't modify frozen thread locals
-
def freeze
-
_locals.freeze
-
super
-
end
-
-
private
-
-
def _locals
-
if defined?(@_locals)
-
@_locals
-
else
-
LOCK.synchronize { @_locals ||= {} }
-
end
-
end
-
1
end unless Thread.instance_methods.include?(:thread_variable_set)
-
1
require 'openssl'
-
1
require 'base64'
-
1
require 'active_support/core_ext/array/extract_options'
-
-
1
module ActiveSupport
-
# MessageEncryptor is a simple way to encrypt values which get stored
-
# somewhere you don't trust.
-
#
-
# The cipher text and initialization vector are base64 encoded and returned
-
# to you.
-
#
-
# This can be used in situations similar to the <tt>MessageVerifier</tt>, but
-
# where you don't want users to be able to determine the value of the payload.
-
#
-
# salt = SecureRandom.random_bytes(64)
-
# key = ActiveSupport::KeyGenerator.new('password').generate_key(salt) # => "\x89\xE0\x156\xAC..."
-
# crypt = ActiveSupport::MessageEncryptor.new(key) # => #<ActiveSupport::MessageEncryptor ...>
-
# encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..."
-
# crypt.decrypt_and_verify(encrypted_data) # => "my secret data"
-
1
class MessageEncryptor
-
1
module NullSerializer #:nodoc:
-
1
def self.load(value)
-
4
value
-
end
-
-
1
def self.dump(value)
-
10
value
-
end
-
end
-
-
1
class InvalidMessage < StandardError; end
-
1
OpenSSLCipherError = OpenSSL::Cipher::CipherError
-
-
# Initialize a new MessageEncryptor. +secret+ must be at least as long as
-
# the cipher key size. For the default 'aes-256-cbc' cipher, this is 256
-
# bits. If you are using a user-entered secret, you can generate a suitable
-
# key with <tt>OpenSSL::Digest::SHA256.new(user_secret).digest</tt> or
-
# similar.
-
#
-
# Options:
-
# * <tt>:cipher</tt> - Cipher to use. Can be any cipher returned by
-
# <tt>OpenSSL::Cipher.ciphers</tt>. Default is 'aes-256-cbc'.
-
# * <tt>:digest</tt> - String of digest to use for signing. Default is +SHA1+.
-
# * <tt>:serializer</tt> - Object serializer to use. Default is +Marshal+.
-
1
def initialize(secret, *signature_key_or_options)
-
23
options = signature_key_or_options.extract_options!
-
23
sign_secret = signature_key_or_options.first
-
23
@secret = secret
-
23
@sign_secret = sign_secret
-
23
@cipher = options[:cipher] || 'aes-256-cbc'
-
23
@verifier = MessageVerifier.new(@sign_secret || @secret, digest: options[:digest] || 'SHA1', serializer: NullSerializer)
-
23
@serializer = options[:serializer] || Marshal
-
end
-
-
# Encrypt and sign a message. We need to sign the message in order to avoid
-
# padding attacks. Reference: http://www.limited-entropy.com/padding-oracle-attacks.
-
1
def encrypt_and_sign(value)
-
5
verifier.generate(_encrypt(value))
-
end
-
-
# Decrypt and verify a message. We need to verify the message in order to
-
# avoid padding attacks. Reference: http://www.limited-entropy.com/padding-oracle-attacks.
-
1
def decrypt_and_verify(value)
-
2
_decrypt(verifier.verify(value))
-
end
-
-
1
private
-
-
1
def _encrypt(value)
-
5
cipher = new_cipher
-
5
cipher.encrypt
-
5
cipher.key = @secret
-
-
# Rely on OpenSSL for the initialization vector
-
5
iv = cipher.random_iv
-
-
5
encrypted_data = cipher.update(@serializer.dump(value))
-
5
encrypted_data << cipher.final
-
-
5
"#{::Base64.strict_encode64 encrypted_data}--#{::Base64.strict_encode64 iv}"
-
end
-
-
1
def _decrypt(encrypted_message)
-
2
cipher = new_cipher
-
6
encrypted_data, iv = encrypted_message.split("--").map {|v| ::Base64.strict_decode64(v)}
-
-
2
cipher.decrypt
-
2
cipher.key = @secret
-
2
cipher.iv = iv
-
-
2
decrypted_data = cipher.update(encrypted_data)
-
2
decrypted_data << cipher.final
-
-
2
@serializer.load(decrypted_data)
-
rescue OpenSSLCipherError, TypeError, ArgumentError
-
raise InvalidMessage
-
end
-
-
1
def new_cipher
-
7
OpenSSL::Cipher::Cipher.new(@cipher)
-
end
-
-
1
def verifier
-
7
@verifier
-
end
-
end
-
end
-
# encoding: utf-8
-
1
require 'active_support/json'
-
1
require 'active_support/core_ext/string/access'
-
1
require 'active_support/core_ext/string/behavior'
-
1
require 'active_support/core_ext/module/delegation'
-
-
1
module ActiveSupport #:nodoc:
-
1
module Multibyte #:nodoc:
-
# Chars enables you to work transparently with UTF-8 encoding in the Ruby
-
# String class without having extensive knowledge about the encoding. A
-
# Chars object accepts a string upon initialization and proxies String
-
# methods in an encoding safe manner. All the normal String methods are also
-
# implemented on the proxy.
-
#
-
# String methods are proxied through the Chars object, and can be accessed
-
# through the +mb_chars+ method. Methods which would normally return a
-
# String object now return a Chars object so methods can be chained.
-
#
-
# 'The Perfect String '.mb_chars.downcase.strip.normalize # => "the perfect string"
-
#
-
# Chars objects are perfectly interchangeable with String objects as long as
-
# no explicit class checks are made. If certain methods do explicitly check
-
# the class, call +to_s+ before you pass chars objects to them.
-
#
-
# bad.explicit_checking_method 'T'.mb_chars.downcase.to_s
-
#
-
# The default Chars implementation assumes that the encoding of the string
-
# is UTF-8, if you want to handle different encodings you can write your own
-
# multibyte string handler and configure it through
-
# ActiveSupport::Multibyte.proxy_class.
-
#
-
# class CharsForUTF32
-
# def size
-
# @wrapped_string.size / 4
-
# end
-
#
-
# def self.accepts?(string)
-
# string.length % 4 == 0
-
# end
-
# end
-
#
-
# ActiveSupport::Multibyte.proxy_class = CharsForUTF32
-
1
class Chars
-
1
include Comparable
-
1
attr_reader :wrapped_string
-
1
alias to_s wrapped_string
-
1
alias to_str wrapped_string
-
-
1
delegate :<=>, :=~, :acts_like_string?, :to => :wrapped_string
-
-
# Creates a new Chars instance by wrapping _string_.
-
1
def initialize(string)
-
@wrapped_string = string
-
@wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen?
-
end
-
-
# Forward all undefined methods to the wrapped string.
-
1
def method_missing(method, *args, &block)
-
result = @wrapped_string.__send__(method, *args, &block)
-
if method.to_s =~ /!$/
-
self if result
-
else
-
result.kind_of?(String) ? chars(result) : result
-
end
-
end
-
-
# Returns +true+ if _obj_ responds to the given method. Private methods
-
# are included in the search only if the optional second parameter
-
# evaluates to +true+.
-
1
def respond_to_missing?(method, include_private)
-
@wrapped_string.respond_to?(method, include_private)
-
end
-
-
# Returns +true+ when the proxy class can handle the string. Returns
-
# +false+ otherwise.
-
1
def self.consumes?(string)
-
string.encoding == Encoding::UTF_8
-
end
-
-
# Works just like <tt>String#split</tt>, with the exception that the items
-
# in the resulting list are Chars instances instead of String. This makes
-
# chaining methods easier.
-
#
-
# 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"]
-
1
def split(*args)
-
@wrapped_string.split(*args).map { |i| self.class.new(i) }
-
end
-
-
# Works like <tt>String#slice!</tt>, but returns an instance of
-
# Chars, or nil if the string was not modified.
-
1
def slice!(*args)
-
chars(@wrapped_string.slice!(*args))
-
end
-
-
# Reverses all characters in the string.
-
#
-
# 'Café'.mb_chars.reverse.to_s # => 'éfaC'
-
1
def reverse
-
chars(Unicode.unpack_graphemes(@wrapped_string).reverse.flatten.pack('U*'))
-
end
-
-
# Limits the byte size of the string to a number of bytes without breaking
-
# characters. Usable when the storage for a string is limited for some
-
# reason.
-
#
-
# 'こんにちは'.mb_chars.limit(7).to_s # => "こん"
-
1
def limit(limit)
-
slice(0...translate_offset(limit))
-
end
-
-
# Converts characters in the string to uppercase.
-
#
-
# 'Laurent, où sont les tests ?'.mb_chars.upcase.to_s # => "LAURENT, OÙ SONT LES TESTS ?"
-
1
def upcase
-
chars Unicode.upcase(@wrapped_string)
-
end
-
-
# Converts characters in the string to lowercase.
-
#
-
# 'VĚDA A VÝZKUM'.mb_chars.downcase.to_s # => "věda a výzkum"
-
1
def downcase
-
chars Unicode.downcase(@wrapped_string)
-
end
-
-
# Converts characters in the string to the opposite case.
-
#
-
# 'El Cañón".mb_chars.swapcase.to_s # => "eL cAÑÓN"
-
1
def swapcase
-
chars Unicode.swapcase(@wrapped_string)
-
end
-
-
# Converts the first character to uppercase and the remainder to lowercase.
-
#
-
# 'über'.mb_chars.capitalize.to_s # => "Über"
-
1
def capitalize
-
(slice(0) || chars('')).upcase + (slice(1..-1) || chars('')).downcase
-
end
-
-
# Capitalizes the first letter of every word, when possible.
-
#
-
# "ÉL QUE SE ENTERÓ".mb_chars.titleize # => "Él Que Se Enteró"
-
# "日本語".mb_chars.titleize # => "日本語"
-
1
def titleize
-
chars(downcase.to_s.gsub(/\b('?\S)/u) { Unicode.upcase($1)})
-
end
-
1
alias_method :titlecase, :titleize
-
-
# Returns the KC normalization of the string by default. NFKC is
-
# considered the best normalization form for passing strings to databases
-
# and validations.
-
#
-
# * <tt>form</tt> - The form you want to normalize in. Should be one of the following:
-
# <tt>:c</tt>, <tt>:kc</tt>, <tt>:d</tt>, or <tt>:kd</tt>. Default is
-
# ActiveSupport::Multibyte::Unicode.default_normalization_form
-
1
def normalize(form = nil)
-
chars(Unicode.normalize(@wrapped_string, form))
-
end
-
-
# Performs canonical decomposition on all the characters.
-
#
-
# 'é'.length # => 2
-
# 'é'.mb_chars.decompose.to_s.length # => 3
-
1
def decompose
-
chars(Unicode.decompose(:canonical, @wrapped_string.codepoints.to_a).pack('U*'))
-
end
-
-
# Performs composition on all the characters.
-
#
-
# 'é'.length # => 3
-
# 'é'.mb_chars.compose.to_s.length # => 2
-
1
def compose
-
chars(Unicode.compose(@wrapped_string.codepoints.to_a).pack('U*'))
-
end
-
-
# Returns the number of grapheme clusters in the string.
-
#
-
# 'क्षि'.mb_chars.length # => 4
-
# 'क्षि'.mb_chars.grapheme_length # => 3
-
1
def grapheme_length
-
Unicode.unpack_graphemes(@wrapped_string).length
-
end
-
-
# Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent
-
# resulting in a valid UTF-8 string.
-
#
-
# Passing +true+ will forcibly tidy all bytes, assuming that the string's
-
# encoding is entirely CP1252 or ISO-8859-1.
-
1
def tidy_bytes(force = false)
-
chars(Unicode.tidy_bytes(@wrapped_string, force))
-
end
-
-
1
def as_json(options = nil) #:nodoc:
-
to_s.as_json(options)
-
end
-
-
1
%w(capitalize downcase reverse tidy_bytes upcase).each do |method|
-
5
define_method("#{method}!") do |*args|
-
@wrapped_string = send(method, *args).to_s
-
self
-
end
-
end
-
-
1
protected
-
-
1
def translate_offset(byte_offset) #:nodoc:
-
return nil if byte_offset.nil?
-
return 0 if @wrapped_string == ''
-
-
begin
-
@wrapped_string.byteslice(0...byte_offset).unpack('U*').length
-
rescue ArgumentError
-
byte_offset -= 1
-
retry
-
end
-
end
-
-
1
def chars(string) #:nodoc:
-
self.class.new(string)
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/module/delegation'
-
1
require 'active_support/core_ext/object/blank'
-
1
require 'logger'
-
1
require 'active_support/logger'
-
-
1
module ActiveSupport
-
# Wraps any standard Logger object to provide tagging capabilities.
-
#
-
# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
-
# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff"
-
# logger.tagged('BCX', "Jason") { logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff"
-
# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff"
-
#
-
# This is used by the default Rails.logger as configured by Railties to make
-
# it easy to stamp log lines with subdomains, request ids, and anything else
-
# to aid debugging of multi-user production applications.
-
1
module TaggedLogging
-
1
module Formatter # :nodoc:
-
# This method is invoked when a log event occurs.
-
1
def call(severity, timestamp, progname, msg)
-
5216
super(severity, timestamp, progname, "#{tags_text}#{msg}")
-
end
-
-
1
def tagged(*tags)
-
23
new_tags = push_tags(*tags)
-
23
yield self
-
ensure
-
23
pop_tags(new_tags.size)
-
end
-
-
1
def push_tags(*tags)
-
23
tags.flatten.reject(&:blank?).tap do |new_tags|
-
23
current_tags.concat new_tags
-
end
-
end
-
-
1
def pop_tags(size = 1)
-
23
current_tags.pop size
-
end
-
-
1
def clear_tags!
-
23
current_tags.clear
-
end
-
-
1
def current_tags
-
5285
Thread.current[:activesupport_tagged_logging_tags] ||= []
-
end
-
-
1
private
-
1
def tags_text
-
5216
tags = current_tags
-
5216
if tags.any?
-
tags.collect { |tag| "[#{tag}] " }.join
-
end
-
end
-
end
-
-
1
def self.new(logger)
-
# Ensure we set a default formatter so we aren't extending nil!
-
1
logger.formatter ||= ActiveSupport::Logger::SimpleFormatter.new
-
1
logger.formatter.extend Formatter
-
1
logger.extend(self)
-
end
-
-
1
delegate :push_tags, :pop_tags, :clear_tags!, to: :formatter
-
-
1
def tagged(*tags)
-
46
formatter.tagged(*tags) { yield self }
-
end
-
-
1
def flush
-
23
clear_tags!
-
23
super if defined?(super)
-
end
-
end
-
end
-
1
gem 'minitest' # make sure we get the gem, not stdlib
-
1
require 'minitest'
-
1
require 'active_support/testing/tagged_logging'
-
1
require 'active_support/testing/setup_and_teardown'
-
1
require 'active_support/testing/assertions'
-
1
require 'active_support/testing/deprecation'
-
1
require 'active_support/testing/declarative'
-
1
require 'active_support/testing/isolation'
-
1
require 'active_support/testing/constant_lookup'
-
1
require 'active_support/testing/time_helpers'
-
1
require 'active_support/core_ext/kernel/reporting'
-
1
require 'active_support/deprecation'
-
-
1
module ActiveSupport
-
1
class TestCase < ::Minitest::Test
-
1
Assertion = Minitest::Assertion
-
-
1
class << self
-
# Sets the order in which test cases are run.
-
#
-
# ActiveSupport::TestCase.test_order = :random # => :random
-
#
-
# Valid values are:
-
# * +:random+ (to run tests in random order)
-
# * +:parallel+ (to run tests in parallel)
-
# * +:sorted+ (to run tests alphabetically by method name)
-
# * +:alpha+ (equivalent to +:sorted+)
-
1
def test_order=(new_order)
-
ActiveSupport.test_order = new_order
-
end
-
-
# Returns the order in which test cases are run.
-
#
-
# ActiveSupport::TestCase.test_order # => :sorted
-
#
-
# Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+.
-
# Defaults to +:sorted+.
-
1
def test_order
-
228
test_order = ActiveSupport.test_order
-
-
228
if test_order.nil?
-
ActiveSupport::Deprecation.warn "You did not specify a value for the " \
-
"configuration option `active_support.test_order`. In Rails 5, " \
-
"the default value of this option will change from `:sorted` to " \
-
"`:random`.\n" \
-
"To disable this warning and keep the current behavior, you can add " \
-
"the following line to your `config/environments/test.rb`:\n" \
-
"\n" \
-
" Rails.application.configure do\n" \
-
" config.active_support.test_order = :sorted\n" \
-
" end\n" \
-
"\n" \
-
"Alternatively, you can opt into the future behavior by setting this " \
-
"option to `:random`."
-
-
test_order = :sorted
-
self.test_order = test_order
-
end
-
-
228
test_order
-
end
-
-
1
alias :my_tests_are_order_dependent! :i_suck_and_my_tests_are_order_dependent!
-
end
-
-
1
alias_method :method_name, :name
-
-
1
include ActiveSupport::Testing::TaggedLogging
-
1
include ActiveSupport::Testing::SetupAndTeardown
-
1
include ActiveSupport::Testing::Assertions
-
1
include ActiveSupport::Testing::Deprecation
-
1
include ActiveSupport::Testing::TimeHelpers
-
1
extend ActiveSupport::Testing::Declarative
-
-
# test/unit backwards compatibility methods
-
1
alias :assert_raise :assert_raises
-
1
alias :assert_not_empty :refute_empty
-
1
alias :assert_not_equal :refute_equal
-
1
alias :assert_not_in_delta :refute_in_delta
-
1
alias :assert_not_in_epsilon :refute_in_epsilon
-
1
alias :assert_not_includes :refute_includes
-
1
alias :assert_not_instance_of :refute_instance_of
-
1
alias :assert_not_kind_of :refute_kind_of
-
1
alias :assert_no_match :refute_match
-
1
alias :assert_not_nil :refute_nil
-
1
alias :assert_not_operator :refute_operator
-
1
alias :assert_not_predicate :refute_predicate
-
1
alias :assert_not_respond_to :refute_respond_to
-
1
alias :assert_not_same :refute_same
-
-
# Fails if the block raises an exception.
-
#
-
# assert_nothing_raised do
-
# ...
-
# end
-
1
def assert_nothing_raised(*args)
-
5
yield
-
end
-
end
-
end
-
1
require 'active_support/core_ext/object/blank'
-
-
1
module ActiveSupport
-
1
module Testing
-
1
module Assertions
-
# Assert that an expression is not truthy. Passes if <tt>object</tt> is
-
# +nil+ or +false+. "Truthy" means "considered true in a conditional"
-
# like <tt>if foo</tt>.
-
#
-
# assert_not nil # => true
-
# assert_not false # => true
-
# assert_not 'foo' # => Expected "foo" to be nil or false
-
#
-
# An error message can be specified.
-
#
-
# assert_not foo, 'foo should be false'
-
1
def assert_not(object, message = nil)
-
64
message ||= "Expected #{mu_pp(object)} to be nil or false"
-
64
assert !object, message
-
end
-
-
# Test numeric difference between the return value of an expression as a
-
# result of what is evaluated in the yielded block.
-
#
-
# assert_difference 'Article.count' do
-
# post :create, article: {...}
-
# end
-
#
-
# An arbitrary expression is passed in and evaluated.
-
#
-
# assert_difference 'assigns(:article).comments(:reload).size' do
-
# post :create, comment: {...}
-
# end
-
#
-
# An arbitrary positive or negative difference can be specified.
-
# The default is <tt>1</tt>.
-
#
-
# assert_difference 'Article.count', -1 do
-
# post :delete, id: ...
-
# end
-
#
-
# An array of expressions can also be passed in and evaluated.
-
#
-
# assert_difference [ 'Article.count', 'Post.count' ], 2 do
-
# post :create, article: {...}
-
# end
-
#
-
# A lambda or a list of lambdas can be passed in and evaluated:
-
#
-
# assert_difference ->{ Article.count }, 2 do
-
# post :create, article: {...}
-
# end
-
#
-
# assert_difference [->{ Article.count }, ->{ Post.count }], 2 do
-
# post :create, article: {...}
-
# end
-
#
-
# An error message can be specified.
-
#
-
# assert_difference 'Article.count', -1, 'An Article should be destroyed' do
-
# post :delete, id: ...
-
# end
-
1
def assert_difference(expression, difference = 1, message = nil, &block)
-
20
expressions = Array(expression)
-
-
20
exps = expressions.map { |e|
-
60
e.respond_to?(:call) ? e : lambda { eval(e, block.binding) }
-
}
-
40
before = exps.map { |e| e.call }
-
-
20
yield
-
-
20
expressions.zip(exps).each_with_index do |(code, e), i|
-
20
error = "#{code.inspect} didn't change by #{difference}"
-
20
error = "#{message}.\n#{error}" if message
-
20
assert_equal(before[i] + difference, e.call, error)
-
end
-
end
-
-
# Assertion that the numeric result of evaluating an expression is not
-
# changed before and after invoking the passed in block.
-
#
-
# assert_no_difference 'Article.count' do
-
# post :create, article: invalid_attributes
-
# end
-
#
-
# An error message can be specified.
-
#
-
# assert_no_difference 'Article.count', 'An Article should not be created' do
-
# post :create, article: invalid_attributes
-
# end
-
1
def assert_no_difference(expression, message = nil, &block)
-
7
assert_difference expression, 0, message, &block
-
end
-
end
-
end
-
end
-
1
gem 'minitest'
-
-
1
require 'minitest'
-
-
1
Minitest.autorun
-
1
require "active_support/concern"
-
1
require "active_support/inflector"
-
-
1
module ActiveSupport
-
1
module Testing
-
# Resolves a constant from a minitest spec name.
-
#
-
# Given the following spec-style test:
-
#
-
# describe WidgetsController, :index do
-
# describe "authenticated user" do
-
# describe "returns widgets" do
-
# it "has a controller that exists" do
-
# assert_kind_of WidgetsController, @controller
-
# end
-
# end
-
# end
-
# end
-
#
-
# The test will have the following name:
-
#
-
# "WidgetsController::index::authenticated user::returns widgets"
-
#
-
# The constant WidgetsController can be resolved from the name.
-
# The following code will resolve the constant:
-
#
-
# controller = determine_constant_from_test_name(name) do |constant|
-
# Class === constant && constant < ::ActionController::Metal
-
# end
-
1
module ConstantLookup
-
1
extend ::ActiveSupport::Concern
-
-
1
module ClassMethods # :nodoc:
-
1
def determine_constant_from_test_name(test_name)
-
10
names = test_name.split "::"
-
10
while names.size > 0 do
-
10
names.last.sub!(/Test$/, "")
-
10
begin
-
10
constant = names.join("::").safe_constantize
-
10
break(constant) if yield(constant)
-
ensure
-
10
names.pop
-
end
-
end
-
end
-
end
-
-
end
-
end
-
end
-
1
module ActiveSupport
-
1
module Testing
-
1
module Declarative
-
1
unless defined?(Spec)
-
# Helper to define a test method using a String. Under the hood, it replaces
-
# spaces with underscores and defines the test method.
-
#
-
# test "verify something" do
-
# ...
-
# end
-
1
def test(name, &block)
-
482
test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
-
482
defined = method_defined? test_name
-
482
raise "#{test_name} is already defined in #{self}" if defined
-
482
if block_given?
-
482
define_method(test_name, &block)
-
else
-
define_method(test_name) do
-
flunk "No implementation provided for #{name}"
-
end
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/deprecation'
-
-
1
module ActiveSupport
-
1
module Testing
-
1
module Deprecation #:nodoc:
-
1
def assert_deprecated(match = nil, &block)
-
result, warnings = collect_deprecations(&block)
-
assert !warnings.empty?, "Expected a deprecation warning within the block but received none"
-
if match
-
match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp)
-
assert warnings.any? { |w| w =~ match }, "No deprecation warning matched #{match}: #{warnings.join(', ')}"
-
end
-
result
-
end
-
-
1
def assert_not_deprecated(&block)
-
result, deprecations = collect_deprecations(&block)
-
assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n #{deprecations * "\n "}"
-
result
-
end
-
-
1
def collect_deprecations
-
old_behavior = ActiveSupport::Deprecation.behavior
-
deprecations = []
-
ActiveSupport::Deprecation.behavior = Proc.new do |message, callstack|
-
deprecations << message
-
end
-
result = yield
-
[result, deprecations]
-
ensure
-
ActiveSupport::Deprecation.behavior = old_behavior
-
end
-
end
-
end
-
end
-
1
require 'rbconfig'
-
-
1
module ActiveSupport
-
1
module Testing
-
1
module Isolation
-
1
require 'thread'
-
-
1
def self.included(klass) #:nodoc:
-
klass.class_eval do
-
parallelize_me!
-
end
-
end
-
-
1
def self.forking_env?
-
1
!ENV["NO_FORK"] && ((RbConfig::CONFIG['host_os'] !~ /mswin|mingw/) && (RUBY_PLATFORM !~ /java/))
-
end
-
-
1
@@class_setup_mutex = Mutex.new
-
-
1
def _run_class_setup # class setup method should only happen in parent
-
@@class_setup_mutex.synchronize do
-
unless defined?(@@ran_class_setup) || ENV['ISOLATION_TEST']
-
self.class.setup if self.class.respond_to?(:setup)
-
@@ran_class_setup = true
-
end
-
end
-
end
-
-
1
def run
-
serialized = run_in_isolation do
-
super
-
end
-
-
Marshal.load(serialized)
-
end
-
-
1
module Forking
-
1
def run_in_isolation(&blk)
-
read, write = IO.pipe
-
read.binmode
-
write.binmode
-
-
pid = fork do
-
read.close
-
yield
-
write.puts [Marshal.dump(self.dup)].pack("m")
-
exit!
-
end
-
-
write.close
-
result = read.read
-
Process.wait2(pid)
-
return result.unpack("m")[0]
-
end
-
end
-
-
1
module Subprocess
-
1
ORIG_ARGV = ARGV.dup unless defined?(ORIG_ARGV)
-
-
# Crazy H4X to get this working in windows / jruby with
-
# no forking.
-
1
def run_in_isolation(&blk)
-
require "tempfile"
-
-
if ENV["ISOLATION_TEST"]
-
yield
-
File.open(ENV["ISOLATION_OUTPUT"], "w") do |file|
-
file.puts [Marshal.dump(self.dup)].pack("m")
-
end
-
exit!
-
else
-
Tempfile.open("isolation") do |tmpfile|
-
env = {
-
ISOLATION_TEST: self.class.name,
-
ISOLATION_OUTPUT: tmpfile.path
-
}
-
-
load_paths = $-I.map {|p| "-I\"#{File.expand_path(p)}\"" }.join(" ")
-
orig_args = ORIG_ARGV.join(" ")
-
test_opts = "-n#{self.class.name}##{self.name}"
-
command = "#{Gem.ruby} #{load_paths} #{$0} #{orig_args} #{test_opts}"
-
-
# IO.popen lets us pass env in a cross-platform way
-
child = IO.popen([env, command])
-
-
begin
-
Process.wait(child.pid)
-
rescue Errno::ECHILD # The child process may exit before we wait
-
nil
-
end
-
-
return tmpfile.read.unpack("m")[0]
-
end
-
end
-
end
-
end
-
-
1
include forking_env? ? Forking : Subprocess
-
end
-
end
-
end
-
1
require 'active_support/concern'
-
1
require 'active_support/callbacks'
-
-
1
module ActiveSupport
-
1
module Testing
-
# Adds support for +setup+ and +teardown+ callbacks.
-
# These callbacks serve as a replacement to overwriting the
-
# <tt>#setup</tt> and <tt>#teardown</tt> methods of your TestCase.
-
#
-
# class ExampleTest < ActiveSupport::TestCase
-
# setup do
-
# # ...
-
# end
-
#
-
# teardown do
-
# # ...
-
# end
-
# end
-
1
module SetupAndTeardown
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
include ActiveSupport::Callbacks
-
1
define_callbacks :setup, :teardown
-
end
-
-
1
module ClassMethods
-
# Add a callback, which runs before <tt>TestCase#setup</tt>.
-
1
def setup(*args, &block)
-
11
set_callback(:setup, :before, *args, &block)
-
end
-
-
# Add a callback, which runs after <tt>TestCase#teardown</tt>.
-
1
def teardown(*args, &block)
-
4
set_callback(:teardown, :after, *args, &block)
-
end
-
end
-
-
1
def before_setup # :nodoc:
-
490
super
-
490
run_callbacks :setup
-
end
-
-
1
def after_teardown # :nodoc:
-
490
run_callbacks :teardown
-
490
super
-
end
-
end
-
end
-
end
-
1
module ActiveSupport
-
1
module Testing
-
# Logs a "PostsControllerTest: test name" heading before each test to
-
# make test.log easier to search and follow along with.
-
1
module TaggedLogging #:nodoc:
-
1
attr_writer :tagged_logger
-
-
1
def before_setup
-
490
if tagged_logger && tagged_logger.info?
-
490
heading = "#{self.class}: #{name}"
-
490
divider = '-' * heading.size
-
490
tagged_logger.info divider
-
490
tagged_logger.info heading
-
490
tagged_logger.info divider
-
end
-
490
super
-
end
-
-
1
private
-
1
def tagged_logger
-
2450
@tagged_logger ||= (defined?(Rails.logger) && Rails.logger)
-
end
-
end
-
end
-
end
-
1
module ActiveSupport
-
1
module Testing
-
1
class SimpleStubs # :nodoc:
-
1
Stub = Struct.new(:object, :method_name, :original_method)
-
-
1
def initialize
-
@stubs = {}
-
end
-
-
1
def stub_object(object, method_name, return_value)
-
key = [object.object_id, method_name]
-
-
if stub = @stubs[key]
-
unstub_object(stub)
-
end
-
-
new_name = "__simple_stub__#{method_name}"
-
-
@stubs[key] = Stub.new(object, method_name, new_name)
-
-
object.singleton_class.send :alias_method, new_name, method_name
-
object.define_singleton_method(method_name) { return_value }
-
end
-
-
1
def unstub_all!
-
@stubs.each_value do |stub|
-
unstub_object(stub)
-
end
-
@stubs = {}
-
end
-
-
1
private
-
-
1
def unstub_object(stub)
-
singleton_class = stub.object.singleton_class
-
singleton_class.send :undef_method, stub.method_name
-
singleton_class.send :alias_method, stub.method_name, stub.original_method
-
singleton_class.send :undef_method, stub.original_method
-
end
-
end
-
-
# Containing helpers that helps you test passage of time.
-
1
module TimeHelpers
-
# Changes current time to the time in the future or in the past by a given time difference by
-
# stubbing +Time.now+ and +Date.today+.
-
#
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
# travel 1.day
-
# Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00
-
# Date.current # => Sun, 10 Nov 2013
-
#
-
# This method also accepts a block, which will return the current time back to its original
-
# state at the end of the block:
-
#
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
# travel 1.day do
-
# User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00
-
# end
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
1
def travel(duration, &block)
-
travel_to Time.now + duration, &block
-
end
-
-
# Changes current time to the given time by stubbing +Time.now+ and
-
# +Date.today+ to return the time or date passed into this method.
-
#
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
# travel_to Time.new(2004, 11, 24, 01, 04, 44)
-
# Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
-
# Date.current # => Wed, 24 Nov 2004
-
#
-
# Dates are taken as their timestamp at the beginning of the day in the
-
# application time zone. <tt>Time.current</tt> returns said timestamp,
-
# and <tt>Time.now</tt> its equivalent in the system time zone. Similarly,
-
# <tt>Date.current</tt> returns a date equal to the argument, and
-
# <tt>Date.today</tt> the date according to <tt>Time.now</tt>, which may
-
# be different. (Note that you rarely want to deal with <tt>Time.now</tt>,
-
# or <tt>Date.today</tt>, in order to honor the application time zone
-
# please always use <tt>Time.current</tt> and <tt>Date.current</tt>.)
-
#
-
# Note that the usec for the time passed will be set to 0 to prevent rounding
-
# errors with external services, like MySQL (which will round instead of floor,
-
# leading to off-by-one-second errors).
-
#
-
# This method also accepts a block, which will return the current time back to its original
-
# state at the end of the block:
-
#
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
# travel_to Time.new(2004, 11, 24, 01, 04, 44) do
-
# Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
-
# end
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
1
def travel_to(date_or_time)
-
if date_or_time.is_a?(Date) && !date_or_time.is_a?(DateTime)
-
now = date_or_time.midnight.to_time
-
else
-
now = date_or_time.to_time.change(usec: 0)
-
end
-
-
simple_stubs.stub_object(Time, :now, now)
-
simple_stubs.stub_object(Date, :today, now.to_date)
-
-
if block_given?
-
begin
-
yield
-
ensure
-
travel_back
-
end
-
end
-
end
-
-
# Returns the current time back to its original state, by removing the stubs added by
-
# `travel` and `travel_to`.
-
#
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
# travel_to Time.new(2004, 11, 24, 01, 04, 44)
-
# Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
-
# travel_back
-
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
-
1
def travel_back
-
simple_stubs.unstub_all!
-
end
-
-
1
private
-
-
1
def simple_stubs
-
@simple_stubs ||= SimpleStubs.new
-
end
-
end
-
end
-
end
-
1
module Airbrake
-
1
module Rails
-
##
-
# Contains helper methods that can be used inside Rails controllers to send
-
# notices to Airbrake. The main benefit of using them instead of the direct
-
# API is that they automatically add information from the Rack environment
-
# to notices.
-
1
module ActionController
-
1
private
-
-
##
-
# A helper method for sending notices to Airbrake *asynchronously*.
-
# Attaches information from the Rack env.
-
# @see Airbrake#notify, #notify_airbrake_sync
-
1
def notify_airbrake(exception, parameters = {}, notifier = :default)
-
return unless (notice = build_notice(exception))
-
Airbrake.notify(notice, parameters, notifier)
-
end
-
-
##
-
# A helper method for sending notices to Airbrake *synchronously*.
-
# Attaches information from the Rack env.
-
# @see Airbrake#notify_sync, #notify_airbrake
-
1
def notify_airbrake_sync(exception, parameters = {}, notifier = :default)
-
return unless (notice = build_notice(exception))
-
Airbrake.notify_sync(notice, parameters, notifier)
-
end
-
-
##
-
# @param [Exception] exception
-
# @return [Airbrake::Notice] the notice with information from the Rack env
-
1
def build_notice(exception)
-
Airbrake::Rack::NoticeBuilder.new(request.env).build_notice(exception)
-
end
-
end
-
end
-
end
-
1
module Airbrake
-
1
module Rails
-
##
-
# Rails <4.2 has a bug with regard to swallowing exceptions in the
-
# +after_commit+ and the +after_rollback+ hooks: it doesn't bubble up
-
# exceptions from there.
-
#
-
# This module makes it possible to report exceptions occurring there.
-
#
-
# @see https://github.com/rails/rails/pull/14488 Detailed description of the
-
# bug and the fix
-
# @see https://goo.gl/348lor Rails 4.2+ implementation (fixed)
-
# @see https://goo.gl/ddFNg7 Rails <4.2 implementation (bugged)
-
1
module ActiveRecord
-
##
-
# @return [Array<Symbol>] the hooks that needs fixing
-
1
KINDS = [:commit, :rollback].freeze
-
-
##
-
# Patches default +run_callbacks+ with our version, which is capable of
-
# notifying about exceptions.
-
#
-
# rubocop:disable Lint/RescueException
-
1
def run_callbacks(kind, *args, &block)
-
# Let the post process handle the exception if it's not a bugged hook.
-
return super unless KINDS.include?(kind)
-
-
# Handle the exception ourselves. The 'ex' exception won't be
-
# propagated, therefore we must notify it here.
-
begin
-
super
-
rescue Exception => ex
-
Airbrake.notify(ex)
-
raise ex
-
end
-
end
-
# rubocop:enable Lint/RescueException
-
end
-
end
-
end
-
1
module ANSI
-
-
# Table of codes used throughout the system.
-
#
-
# @see http://en.wikipedia.org/wiki/ANSI_escape_code
-
1
CHART = {
-
:clear => 0,
-
:reset => 0,
-
:bright => 1,
-
:bold => 1,
-
:faint => 2,
-
:dark => 2,
-
:italic => 3,
-
:underline => 4,
-
:underscore => 4,
-
:blink => 5,
-
:slow_blink => 5,
-
:rapid => 6,
-
:rapid_blink => 6,
-
:invert => 7,
-
:inverse => 7,
-
:reverse => 7,
-
:negative => 7,
-
:swap => 7,
-
:conceal => 8,
-
:concealed => 8,
-
:hide => 9,
-
:strike => 9,
-
-
:default_font => 10,
-
:font_default => 10,
-
:font0 => 10,
-
:font1 => 11,
-
:font2 => 12,
-
:font3 => 13,
-
:font4 => 14,
-
:font5 => 15,
-
:font6 => 16,
-
:font7 => 17,
-
:font8 => 18,
-
:font9 => 19,
-
:fraktur => 20,
-
:bright_off => 21,
-
:bold_off => 21,
-
:double_underline => 21,
-
:clean => 22,
-
:italic_off => 23,
-
:fraktur_off => 23,
-
:underline_off => 24,
-
:blink_off => 25,
-
:inverse_off => 26,
-
:positive => 26,
-
:conceal_off => 27,
-
:show => 27,
-
:reveal => 27,
-
:crossed_off => 29,
-
:crossed_out_off => 29,
-
-
:black => 30,
-
:red => 31,
-
:green => 32,
-
:yellow => 33,
-
:blue => 34,
-
:magenta => 35,
-
:cyan => 36,
-
:white => 37,
-
-
:on_black => 40,
-
:on_red => 41,
-
:on_green => 42,
-
:on_yellow => 43,
-
:on_blue => 44,
-
:on_magenta => 45,
-
:on_cyan => 46,
-
:on_white => 47,
-
-
:frame => 51,
-
:encircle => 52,
-
:overline => 53,
-
:frame_off => 54,
-
:encircle_off => 54,
-
:overline_off => 55,
-
}
-
-
#
-
1
SPECIAL_CHART = {
-
:save => "\e[s", # Save current cursor positon.
-
:restore => "\e[u", # Restore saved cursor positon.
-
:clear_eol => "\e[K", # Clear to the end of the current line.
-
:clr => "\e[K", # Clear to the end of the current line.
-
:clear_right => "\e[0K", # Clear to the end of the current line.
-
:clear_left => "\e[1K", # Clear to the start of the current line.
-
:clear_line => "\e[2K", # Clear the entire current line.
-
:clear_screen => "\e[2J", # Clear the screen and move cursor to home.
-
:cls => "\e[2J", # Clear the screen and move cursor to home.
-
:cursor_hide => "\e[?25l", # Hide the cursor.
-
:cursor_show => "\e[?25h" # Show the cursor.
-
}
-
-
end
-
1
module ANSI
-
-
# Global variable can be used to prevent ANSI codes
-
# from being used in ANSI's methods that do so to string.
-
#
-
# NOTE: This has no effect on methods that return ANSI codes.
-
1
$ansi = true
-
-
1
if RUBY_PLATFORM =~ /(win32|w32)/
-
1
begin
-
1
require 'Win32/Console/ANSI'
-
rescue LoadError
-
1
warn "ansi: 'gem install win32console' to use color on Windows"
-
1
$ansi = false
-
end
-
end
-
-
1
require 'ansi/constants'
-
-
# TODO: up, down, right, left, etc could have yielding methods too?
-
-
# ANSI Codes
-
#
-
# Ansi::Code module makes it very easy to use ANSI codes.
-
# These are especially nice for beautifying shell output.
-
#
-
# Ansi::Code.red + "Hello" + Ansi::Code.blue + "World"
-
# => "\e[31mHello\e[34mWorld"
-
#
-
# Ansi::Code.red{ "Hello" } + Ansi::Code.blue{ "World" }
-
# => "\e[31mHello\e[0m\e[34mWorld\e[0m"
-
#
-
# IMPORTANT! Do not mixin Ansi::Code, instead use {ANSI::Mixin}.
-
#
-
# See {ANSI::CHART} for list of all supported codes.
-
#
-
1
module Code
-
1
extend self
-
-
# include ANSI Constants
-
1
include Constants
-
-
# Regexp for matching most ANSI codes.
-
1
PATTERN = /\e\[(\d+)m/
-
-
# ANSI clear code.
-
1
ENDCODE = "\e[0m"
-
-
# List of primary styles.
-
1
def self.styles
-
%w{bold dark italic underline underscore blink rapid reverse negative concealed strike}
-
end
-
-
# List of primary colors.
-
1
def self.colors
-
9
%w{black red green yellow blue magenta cyan white}
-
end
-
-
# Return ANSI code given a list of symbolic names.
-
1
def [](*codes)
-
code(*codes)
-
end
-
-
# Dynamically create color on color methods.
-
#
-
# @deprecated
-
#
-
1
colors.each do |color|
-
8
colors.each do |on_color|
-
64
module_eval <<-END, __FILE__, __LINE__
-
def #{color}_on_#{on_color}(string=nil)
-
if string
-
return string unless $ansi
-
#warn "use ANSI block notation for future versions"
-
return #{color.upcase} + ON_#{color.upcase} + string + ENDCODE
-
end
-
if block_given?
-
return yield unless $ansi
-
#{color.upcase} + ON_#{on_color.upcase} + yield.to_s + ENDCODE
-
else
-
#{color.upcase} + ON_#{on_color.upcase}
-
end
-
end
-
END
-
end
-
end
-
-
# Use method missing to dispatch ANSI code methods.
-
1
def method_missing(code, *args, &blk)
-
141
esc = nil
-
-
141
if CHART.key?(code)
-
139
esc = "\e[#{CHART[code]}m"
-
elsif SPECIAL_CHART.key?(code)
-
esc = SPECIAL_CHART[code]
-
end
-
-
141
if esc
-
139
if string = args.first
-
69
return string unless $ansi
-
#warn "use ANSI block notation for future versions"
-
return "#{esc}#{string}#{ENDCODE}"
-
end
-
70
if block_given?
-
70
return yield unless $ansi
-
return "#{esc}#{yield}#{ENDCODE}"
-
end
-
esc
-
else
-
2
super(code, *args, &blk)
-
end
-
end
-
-
# TODO: How to deal with position codes when $ansi is false?
-
# Should we raise an error or just not push the codes?
-
# For now, we will leave this it as is.
-
-
# Like +move+ but returns to original position after
-
# yielding the block.
-
1
def display(line, column=0) #:yield:
-
result = "\e[s"
-
result << "\e[#{line.to_i};#{column.to_i}H"
-
if block_given?
-
result << yield
-
result << "\e[u"
-
#elsif string
-
# result << string
-
# result << "\e[u"
-
end
-
result
-
end
-
-
# Move cursor to line and column.
-
1
def move(line, column=0)
-
"\e[#{line.to_i};#{column.to_i}H"
-
end
-
-
# Move cursor up a specified number of spaces.
-
1
def up(spaces=1)
-
"\e[#{spaces.to_i}A"
-
end
-
-
# Move cursor down a specified number of spaces.
-
1
def down(spaces=1)
-
"\e[#{spaces.to_i}B"
-
end
-
-
# Move cursor left a specified number of spaces.
-
1
def left(spaces=1)
-
"\e[#{spaces.to_i}D"
-
end
-
1
alias :back :left
-
-
# Move cursor right a specified number of spaces.
-
1
def right(spaces=1)
-
"\e[#{spaces.to_i}C"
-
end
-
1
alias :forward :right
-
-
##
-
#def position
-
# "\e[#;#R"
-
#end
-
-
# Apply ANSI codes to a first argument or block value.
-
#
-
# @example
-
# ansi("Valentine", :red, :on_white)
-
#
-
# @example
-
# ansi(:red, :on_white){ "Valentine" }
-
#
-
# @return [String]
-
# String wrapped ANSI code.
-
#
-
1
def ansi(*codes) #:yield:
-
if block_given?
-
string = yield.to_s
-
else
-
# first argument must be the string
-
string = codes.shift.to_s
-
end
-
-
return string unless $ansi
-
-
c = code(*codes)
-
-
c + string.gsub(ENDCODE, ENDCODE + c) + ENDCODE
-
end
-
-
# TODO: Allow selective removal using *codes argument?
-
-
# Remove ANSI codes from string or block value.
-
#
-
# @param [String] string
-
# String from which to remove ANSI codes.
-
#
-
# @return [String]
-
# String wrapped ANSI code.
-
#
-
1
def unansi(string=nil) #:yield:
-
if block_given?
-
string = yield.to_s
-
else
-
string = string.to_s
-
end
-
string.gsub(PATTERN, '')
-
end
-
-
# Alias for #ansi method.
-
#
-
# @deprecated
-
# Here for backward compatibility.
-
1
alias_method :style, :ansi
-
-
# Alias for #unansi method.
-
#
-
# @deprecated
-
# Here for backwards compatibility.
-
1
alias_method :unstyle, :unansi
-
-
# Alternate term for #ansi.
-
#
-
# @deprecated
-
# May change in future definition.
-
1
alias_method :color, :ansi
-
-
# Alias for unansi.
-
#
-
# @deprecated
-
# May change in future definition.
-
1
alias_method :uncolor, :unansi
-
-
# Look-up code from chart, or if Integer simply pass through.
-
# Also resolves :random and :on_random.
-
#
-
# @param codes [Array<Symbol,Integer]
-
# Symbols or integers to convert to ANSI code.
-
#
-
# @return [String] ANSI code
-
1
def code(*codes)
-
list = []
-
codes.each do |code|
-
list << \
-
case code
-
when Integer
-
code
-
when Array
-
rgb_code(*code)
-
when :random, 'random'
-
random
-
when :on_random, 'on_random'
-
random(true)
-
when String
-
# TODO: code =~ /\d\d\d\d\d\d/ ?
-
if code.start_with?('#')
-
hex_code(code)
-
else
-
CHART[code.to_sym]
-
end
-
else
-
CHART[code.to_sym]
-
end
-
end
-
"\e[" + (list * ";") + "m"
-
end
-
-
# Provides a random primary ANSI color.
-
#
-
# @param background [Boolean]
-
# Use `true` for background color, otherwise foreground color.
-
#
-
# @return [Integer] ANSI color number
-
1
def random(background=false)
-
(background ? 40 : 30) + rand(8)
-
end
-
-
# Creates an XTerm 256 color escape code from RGB value(s). The
-
# RGB value can be three arguments red, green and blue respectively
-
# each from 0 to 255, or the RGB value can be a single CSS-style
-
# hex string.
-
#
-
# @param background [Boolean]
-
# Use `true` for background color, otherwise foreground color.
-
#
-
1
def rgb(*args)
-
case args.size
-
when 1, 2
-
hex, background = *args
-
esc = "\e[" + hex_code(hex, background) + "m"
-
when 3, 4
-
red, green, blue, background = *args
-
esc = "\e[" + rgb_code(red, green, blue, background) + "m"
-
else
-
raise ArgumentError
-
end
-
-
if block_given?
-
return yield.to_s unless $ansi
-
return "#{esc}#{yield}#{ENDCODE}"
-
else
-
return esc
-
end
-
end
-
-
#private
-
-
# Creates an xterm-256 color from rgb value.
-
#
-
# @param background [Boolean]
-
# Use `true` for background color, otherwise foreground color.
-
#
-
1
def rgb_code(red, green, blue, background=false)
-
"#{background ? 48 : 38};5;#{rgb_256(red, green, blue)}"
-
end
-
-
# Creates an xterm-256 color code from a CSS-style color string.
-
#
-
# @param string [String]
-
# Hex string in CSS style, .e.g. `#5FA0C2`.
-
#
-
# @param background [Boolean]
-
# Use `true` for background color, otherwise foreground color.
-
#
-
1
def hex_code(string, background=false)
-
string.tr!('#','')
-
x = (string.size == 6 ? 2 : 1)
-
r, g, b = [0,1,2].map{ |i| string[i*x,2].to_i(16) }
-
rgb_code(r, g, b, background)
-
end
-
-
# Given red, green and blue values between 0 and 255, this method
-
# returns the closest XTerm 256 color value.
-
#
-
1
def rgb_256(r, g, b)
-
# TODO: what was rgb_valid for?
-
#r, g, b = [r, g, b].map{ |c| rgb_valid(c); (6 * (c.to_f / 256.0)).to_i }
-
r, g, b = [r, g, b].map{ |c| (6 * (c.to_f / 256.0)).to_i }
-
v = (r * 36 + g * 6 + b + 16).abs
-
raise ArgumentError, "RGB value is outside 0-255 range -- #{v}" if v > 255
-
v
-
end
-
-
end
-
-
#
-
1
extend Code
-
end
-
-
1
module ANSI
-
-
1
require 'ansi/chart'
-
-
# Converts {CHART} and {SPECIAL_CHART} entries into constants.
-
# So for example, the CHART entry for :red becomes:
-
#
-
# ANSI::Constants::RED #=> "\e[31m"
-
#
-
# The ANSI Constants are include into ANSI::Code and can be included
-
# any where will they would be of use.
-
#
-
1
module Constants
-
-
1
CHART.each do |name, code|
-
72
const_set(name.to_s.upcase, "\e[#{code}m")
-
end
-
-
1
SPECIAL_CHART.each do |name, code|
-
11
const_set(name.to_s.upcase, code)
-
end
-
-
end
-
-
end
-
1
module Authority
-
-
# Should be included into all models in a Rails app. Provides the model
-
# with both class and instance methods like `updatable_by?(user)`
-
# Exactly which methods get defined is determined from `config.abilities`;
-
# the module is evaluated after any user-supplied config block is run
-
# in order to make that possible.
-
# All delegate to the methods of the same name on the model's authorizer.
-
-
1
module Abilities
-
1
extend ActiveSupport::Concern
-
-
1
included do |base|
-
1
class_attribute :authorizer_name
-
-
# Set the default authorizer for this model.
-
# - Look for an authorizer named like the model inside the model's namespace.
-
# - If there is none, use 'ApplicationAuthorizer'
-
1
self.authorizer_name = begin
-
1
"#{base.name}Authorizer".constantize.name
-
rescue NameError => e
-
"ApplicationAuthorizer"
-
end
-
end
-
-
-
1
def authorizer
-
self.class.authorizer.new(self) # instantiate on every check, in case model has changed
-
end
-
-
1
module Definitions
-
# Send all calls like `editable_by?` to an authorizer instance
-
# Not using Forwardable because it makes it harder for users to track an ArgumentError
-
# back to their authorizer
-
1
Authority.adjectives.each do |adjective|
-
4
define_method("#{adjective}_by?") { |*args| authorizer.send("#{adjective}_by?", *args) }
-
end
-
end
-
1
include Definitions
-
-
1
module ClassMethods
-
1
include Definitions
-
-
1
def authorizer=(authorizer_class)
-
@authorizer = authorizer_class
-
self.authorizer_name = @authorizer.name
-
end
-
-
# @return [Class] of the designated authorizer
-
1
def authorizer
-
@authorizer ||= authorizer_name.constantize # Get an actual reference to the authorizer class
-
rescue NameError
-
raise Authority::NoAuthorizerError.new(
-
"#{authorizer_name} is set as the authorizer for #{self}, but the constant is missing"
-
)
-
end
-
-
end
-
-
end
-
end
-
1
module Authority
-
1
class Authorizer
-
# The base Authorizer class, from which all the authorizers in an app will
-
# descend. Provides the authorizer with both class and instance methods
-
# like `updatable_by?(user)`.
-
# Exactly which methods get defined is determined from `config.abilities`;
-
# the class is evaluated after any user-supplied config block is run
-
# in order to make that possible.
-
-
1
attr_reader :resource
-
-
1
def initialize(resource)
-
@resource = resource
-
end
-
-
# Whitelisting approach: anything not specified will be forbidden
-
1
def self.default(adjective, user, options = {})
-
false
-
end
-
-
# the instance default method calls the class default method
-
1
def default(adjective, user, options = {})
-
user_and_maybe_options = self.class.send(:user_and_maybe_options, user, options)
-
self.class.send(:"#{adjective}_by?", *user_and_maybe_options)
-
end
-
-
# Each method simply calls the `default` method (instance or class)
-
1
Authority.adjectives.each do |adjective|
-
4
class_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def self.#{adjective}_by?(user, options = {})
-
default(:#{adjective}, *user_and_maybe_options(user, options))
-
end
-
-
def #{adjective}_by?(user, options = {})
-
user_and_maybe_options = self.class.send(:user_and_maybe_options, user, options)
-
default(:#{adjective}, *user_and_maybe_options)
-
end
-
RUBY
-
end
-
-
1
def self.user_and_maybe_options(user, options = {})
-
[user, options].tap {|args| args.pop if args.last == {}}
-
end
-
1
private_class_method :user_and_maybe_options
-
end
-
-
1
class NoAuthorizerError < StandardError ; end
-
end
-
1
module Authority
-
1
module UserAbilities
-
-
# Should be included into whatever class represents users in an app.
-
# Provides methods like `can_update?(resource)`
-
# Exactly which methods get defined is determined from `config.abilities`;
-
# the module is evaluated after any user-supplied config block is run
-
# in order to make that possible.
-
# All delegate to corresponding methods on the resource.
-
-
1
Authority.verbs.each do |verb|
-
4
class_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def can_#{verb}?(resource, options = {})
-
self_and_maybe_options = [self, options].tap {|args| args.pop if args.last == {}}
-
resource.#{Authority.abilities[verb]}_by?(*self_and_maybe_options)
-
end
-
RUBY
-
end
-
-
1
def can?(action, options = {})
-
self_and_maybe_options = [self, options].tap {|args| args.pop if args.last == {}}
-
begin
-
ApplicationAuthorizer.send("authorizes_to_#{action}?", *self_and_maybe_options)
-
rescue NoMethodError => original_exception
-
begin
-
# For backwards compatibility
-
response = ApplicationAuthorizer.send("can_#{action}?", *self_and_maybe_options)
-
Authority.logger.warn(
-
"DEPRECATION WARNING: Please rename `ApplicationAuthorizer.can_#{action}?` to `authorizes_to_#{action}?`"
-
)
-
response
-
rescue NoMethodError => new_exception
-
raise original_exception
-
end
-
end
-
end
-
-
end
-
end
-
1
require 'pathname'
-
-
1
module AutoprefixerRails
-
# Register autoprefixer postprocessor in Sprockets and fix common issues
-
1
class Sprockets
-
1
def initialize(processor)
-
1
@processor = processor
-
end
-
-
# Add prefixes for `css`
-
1
def process(context, css, opts)
-
input = context.pathname.to_s
-
output = input.chomp(File.extname(input)) + '.css'
-
result = @processor.process(css, opts.merge(from: input, to: output))
-
-
result.warnings.each do |warning|
-
$stderr.puts "autoprefixer: #{ warning }"
-
end
-
-
result.css
-
end
-
-
# Register postprocessor in Sprockets depend on issues with other gems
-
1
def install(assets, opts = {})
-
1
assets.register_postprocessor('text/css', :autoprefixer) do |context, css|
-
process(context, css, opts)
-
end
-
end
-
end
-
end
-
1
module Bullet
-
1
class Rack
-
1
include Dependency
-
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
return @app.call(env) unless Bullet.enable?
-
Bullet.start_request
-
status, headers, response = @app.call(env)
-
-
response_body = nil
-
if Bullet.notification?
-
if !file?(headers) && !sse?(headers) && !empty?(response) &&
-
status == 200 && !response_body(response).frozen? && html_request?(headers, response)
-
response_body = response_body(response)
-
append_to_html_body(response_body, footer_note) if Bullet.add_footer
-
append_to_html_body(response_body, Bullet.gather_inline_notifications)
-
headers['Content-Length'] = response_body.bytesize.to_s
-
end
-
Bullet.perform_out_of_channel_notifications(env)
-
end
-
[status, headers, response_body ? [response_body] : response]
-
ensure
-
23
Bullet.end_request
-
end
-
-
# fix issue if response's body is a Proc
-
1
def empty?(response)
-
# response may be ["Not Found"], ["Move Permanently"], etc.
-
if rails?
-
(response.is_a?(Array) && response.size <= 1) ||
-
!response.respond_to?(:body) ||
-
!response_body(response).respond_to?(:empty?) ||
-
response_body(response).empty?
-
else
-
body = response_body(response)
-
body.nil? || body.empty?
-
end
-
end
-
-
1
def append_to_html_body(response_body, content)
-
if response_body.include?('</body>')
-
position = response_body.rindex('</body>')
-
response_body.insert(position, content)
-
else
-
response_body << content
-
end
-
end
-
-
1
def footer_note
-
"<div #{footer_div_attributes}>" + Bullet.footer_info.uniq.join("<br>") + "</div>"
-
end
-
-
1
def file?(headers)
-
headers["Content-Transfer-Encoding"] == "binary"
-
end
-
-
1
def sse?(headers)
-
headers["Content-Type"] == "text/event-stream"
-
end
-
-
1
def html_request?(headers, response)
-
headers['Content-Type'] && headers['Content-Type'].include?('text/html') && response_body(response).include?("<html")
-
end
-
-
1
def response_body(response)
-
if rails?
-
Array === response.body ? response.body.first : response.body
-
else
-
response.first
-
end
-
end
-
-
1
private
-
1
def footer_div_attributes
-
<<EOF
-
data-is-bullet-footer ondblclick="this.parentNode.removeChild(this);" style="position: fixed; bottom: 0pt; left: 0pt; cursor: pointer; border-style: solid; border-color: rgb(153, 153, 153);
-
-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none;
-
-moz-border-left-colors: none; -moz-border-image: none; border-width: 2pt 2pt 0px 0px;
-
padding: 5px; border-radius: 0pt 10pt 0pt 0px; background: none repeat scroll 0% 0% rgba(200, 200, 200, 0.8);
-
color: rgb(119, 119, 119); font-size: 18px; font-family: 'Arial', sans-serif; z-index:9999;"
-
EOF
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'timeout'
-
1
require 'nokogiri'
-
1
require 'xpath'
-
-
1
module Capybara
-
1
class CapybaraError < StandardError; end
-
1
class DriverNotFoundError < CapybaraError; end
-
1
class FrozenInTime < CapybaraError; end
-
1
class ElementNotFound < CapybaraError; end
-
1
class ModalNotFound < CapybaraError; end
-
1
class Ambiguous < ElementNotFound; end
-
1
class ExpectationNotMet < ElementNotFound; end
-
1
class FileNotFound < CapybaraError; end
-
1
class UnselectNotAllowed < CapybaraError; end
-
1
class NotSupportedByDriverError < CapybaraError; end
-
1
class InfiniteRedirectError < CapybaraError; end
-
1
class ScopeError < CapybaraError; end
-
1
class WindowError < CapybaraError; end
-
1
class ReadOnlyElementError < CapybaraError; end
-
-
1
class << self
-
1
attr_accessor :asset_host, :app_host, :run_server, :default_host, :always_include_port
-
1
attr_accessor :server_port, :exact, :match, :exact_options, :visible_text_only
-
1
attr_accessor :default_selector, :default_max_wait_time, :ignore_hidden_elements
-
1
attr_accessor :save_path, :wait_on_first_by_default, :automatic_reload
-
1
attr_accessor :reuse_server, :raise_server_errors, :server_errors
-
1
attr_writer :default_driver, :current_driver, :javascript_driver, :session_name, :server_host
-
1
attr_reader :save_and_open_page_path
-
1
attr_accessor :app
-
-
##
-
#
-
# Configure Capybara to suit your needs.
-
#
-
# Capybara.configure do |config|
-
# config.run_server = false
-
# config.app_host = 'http://www.google.com'
-
# end
-
#
-
# === Configurable options
-
#
-
# [app_host = String] The default host to use when giving a relative URL to visit
-
# [always_include_port = Boolean] Whether the Rack server's port should automatically be inserted into every visited URL (Default: false)
-
# [asset_host = String] Where dynamic assets are hosted - will be prepended to relative asset locations if present (Default: nil)
-
# [run_server = Boolean] Whether to start a Rack server for the given Rack app (Default: true)
-
# [raise_server_errors = Boolean] Should errors raised in the server be raised in the tests? (Default: true)
-
# [server_errors = Array\<Class\>] Error classes that should be raised in the tests if they are raised in the server and Capybara.raise_server_errors is true (Default: [StandardError])
-
# [default_selector = :css/:xpath] Methods which take a selector use the given type by default (Default: :css)
-
# [default_max_wait_time = Numeric] The maximum number of seconds to wait for asynchronous processes to finish (Default: 2)
-
# [ignore_hidden_elements = Boolean] Whether to ignore hidden elements on the page (Default: true)
-
# [automatic_reload = Boolean] Whether to automatically reload elements as Capybara is waiting (Default: true)
-
# [save_path = String] Where to put pages saved through save_(page|screenshot), save_and_open_(page|screenshot) (Default: Dir.pwd)
-
# [wait_on_first_by_default = Boolean] Whether Node#first defaults to Capybara waiting behavior for at least 1 element to match (Default: false)
-
# [reuse_server = Boolean] Reuse the server thread between multiple sessions using the same app object (Default: true)
-
# === DSL Options
-
#
-
# when using capybara/dsl, the following options are also available:
-
#
-
# [default_driver = Symbol] The name of the driver to use by default. (Default: :rack_test)
-
# [javascript_driver = Symbol] The name of a driver to use for JavaScript enabled tests. (Default: :selenium)
-
#
-
1
def configure
-
1
yield self
-
end
-
-
##
-
#
-
# Register a new driver for Capybara.
-
#
-
# Capybara.register_driver :rack_test do |app|
-
# Capybara::RackTest::Driver.new(app)
-
# end
-
#
-
# @param [Symbol] name The name of the new driver
-
# @yield [app] This block takes a rack app and returns a Capybara driver
-
# @yieldparam [<Rack>] app The rack application that this driver runs against. May be nil.
-
# @yieldreturn [Capybara::Driver::Base] A Capybara driver instance
-
#
-
1
def register_driver(name, &block)
-
3
drivers[name] = block
-
end
-
-
##
-
#
-
# Register a new server for Capybara.
-
#
-
# Capybara.register_server :webrick do |app, port, host|
-
# require 'rack/handler/webrick'
-
# Rack::Handler::WEBrick.run(app, ...)
-
# end
-
#
-
# @param [Symbol] name The name of the new driver
-
# @yield [app, port, host] This block takes a rack app and a port and returns a rack server listening on that port
-
# @yieldparam [<Rack>] app The rack application that this server will contain.
-
# @yieldparam port The port number the server should listen on
-
# @yieldparam host The host/ip to bind to
-
# @yieldreturn [Capybara::Driver::Base] A Capybara driver instance
-
#
-
1
def register_server(name, &block)
-
3
servers[name.to_sym] = block
-
end
-
-
##
-
#
-
# Add a new selector to Capybara. Selectors can be used by various methods in Capybara
-
# to find certain elements on the page in a more convenient way. For example adding a
-
# selector to find certain table rows might look like this:
-
#
-
# Capybara.add_selector(:row) do
-
# xpath { |num| ".//tbody/tr[#{num}]" }
-
# end
-
#
-
# This makes it possible to use this selector in a variety of ways:
-
#
-
# find(:row, 3)
-
# page.find('table#myTable').find(:row, 3).text
-
# page.find('table#myTable').has_selector?(:row, 3)
-
# within(:row, 3) { expect(page).to have_content('$100.000') }
-
#
-
# Here is another example:
-
#
-
# Capybara.add_selector(:id) do
-
# xpath { |id| XPath.descendant[XPath.attr(:id) == id.to_s] }
-
# end
-
#
-
# Note that this particular selector already ships with Capybara.
-
#
-
# @param [Symbol] name The name of the selector to add
-
# @yield A block executed in the context of the new {Capybara::Selector}
-
#
-
1
def add_selector(name, &block)
-
16
Capybara::Selector.add(name, &block)
-
end
-
-
##
-
#
-
# Modify a selector previously created by {Capybara.add_selector}.
-
# For example modifying the :button selector to also find divs styled
-
# to look like buttons might look like this
-
#
-
# Capybara.modify_selector(:button) do
-
# xpath { |locator| XPath::HTML.button(locator).or(XPath::css('div.btn')[XPath::string.n.is(locator)]) }
-
# end
-
#
-
# @param [Symbol] name The name of the selector to modify
-
# @yield A block executed in the context of the existing {Capybara::Selector}
-
#
-
1
def modify_selector(name, &block)
-
Capybara::Selector.update(name, &block)
-
end
-
-
1
def drivers
-
5
@drivers ||= {}
-
end
-
-
1
def servers
-
4
@servers ||= {}
-
end
-
-
##
-
#
-
# Register a proc that Capybara will call to run the Rack application.
-
#
-
# Capybara.server do |app, port, host|
-
# require 'rack/handler/mongrel'
-
# Rack::Handler::Mongrel.run(app, :Port => port)
-
# end
-
#
-
# By default, Capybara will try to run webrick.
-
#
-
# @yield [app, port, host] This block receives a rack app, port, and host/ip and should run a Rack handler
-
#
-
1
def server(&block)
-
if block_given?
-
warn "DEPRECATED: Passing a block to Capybara::server is deprecated, please use Capybara::register_server instead"
-
@server = block
-
else
-
@server
-
end
-
end
-
-
##
-
#
-
# Set the server to use.
-
#
-
# Capybara.server = :webrick
-
#
-
# @param [Symbol] name Name of the server type to use
-
# @see register_server
-
#
-
1
def server=(name)
-
1
@server = if name.respond_to? :call
-
name
-
else
-
1
servers[name.to_sym]
-
end
-
end
-
-
##
-
#
-
# Wraps the given string, which should contain an HTML document or fragment
-
# in a {Capybara::Node::Simple} which exposes all {Capybara::Node::Matchers},
-
# {Capybara::Node::Finders} and {Capybara::Node::DocumentMatchers}. This allows you to query
-
# any string containing HTML in the exact same way you would query the current document in a Capybara
-
# session.
-
#
-
# Example: A single element
-
#
-
# node = Capybara.string('<a href="foo">bar</a>')
-
# anchor = node.first('a')
-
# anchor[:href] #=> 'foo'
-
# anchor.text #=> 'bar'
-
#
-
# Example: Multiple elements
-
#
-
# node = Capybara.string <<-HTML
-
# <ul>
-
# <li id="home">Home</li>
-
# <li id="projects">Projects</li>
-
# </ul>
-
# HTML
-
#
-
# node.find('#projects').text # => 'Projects'
-
# node.has_selector?('li#home', :text => 'Home')
-
# node.has_selector?('#projects')
-
# node.find('ul').find('li:first-child').text # => 'Home'
-
#
-
# @param [String] html An html fragment or document
-
# @return [Capybara::Node::Simple] A node which has Capybara's finders and matchers
-
#
-
1
def string(html)
-
Capybara::Node::Simple.new(html)
-
end
-
-
##
-
#
-
# Runs Capybara's default server for the given application and port
-
# under most circumstances you should not have to call this method
-
# manually.
-
#
-
# @param [Rack Application] app The rack application to run
-
# @param [Fixnum] port The port to run the application on
-
#
-
1
def run_default_server(app, port)
-
servers[:webrick].call(app, port, server_host)
-
end
-
-
##
-
#
-
# @return [Symbol] The name of the driver to use by default
-
#
-
1
def default_driver
-
49
@default_driver || :rack_test
-
end
-
-
##
-
#
-
# @return [Symbol] The name of the driver currently in use
-
#
-
1
def current_driver
-
49
@current_driver || default_driver
-
end
-
1
alias_method :mode, :current_driver
-
-
##
-
#
-
# @return [Symbol] The name of the driver used when JavaScript is needed
-
#
-
1
def javascript_driver
-
@javascript_driver || :selenium
-
end
-
-
##
-
#
-
# Use the default driver as the current driver
-
#
-
1
def use_default_driver
-
18
@current_driver = nil
-
end
-
-
##
-
#
-
# Yield a block using a specific driver
-
#
-
1
def using_driver(driver)
-
previous_driver = Capybara.current_driver
-
Capybara.current_driver = driver
-
yield
-
ensure
-
@current_driver = previous_driver
-
end
-
-
##
-
#
-
# @return [String] The IP address bound by default server
-
#
-
1
def server_host
-
@server_host || '127.0.0.1'
-
end
-
-
##
-
#
-
# Yield a block using a specific wait time
-
#
-
1
def using_wait_time(seconds)
-
previous_wait_time = Capybara.default_max_wait_time
-
Capybara.default_max_wait_time = seconds
-
yield
-
ensure
-
Capybara.default_max_wait_time = previous_wait_time
-
end
-
-
##
-
#
-
# The current Capybara::Session based on what is set as Capybara.app and Capybara.current_driver
-
#
-
# @return [Capybara::Session] The currently used session
-
#
-
1
def current_session
-
48
session_pool["#{current_driver}:#{session_name}:#{app.object_id}"] ||= Capybara::Session.new(current_driver, app)
-
end
-
-
##
-
#
-
# Reset sessions, cleaning out the pool of sessions. This will remove any session information such
-
# as cookies.
-
#
-
1
def reset_sessions!
-
#reset in reverse so sessions that started servers are reset last
-
35
session_pool.reverse_each { |mode, session| session.reset! }
-
end
-
1
alias_method :reset!, :reset_sessions!
-
-
##
-
#
-
# The current session name.
-
#
-
# @return [Symbol] The name of the currently used session.
-
#
-
1
def session_name
-
48
@session_name ||= :default
-
end
-
-
##
-
#
-
# Yield a block using a specific session name.
-
#
-
1
def using_session(name)
-
previous_session_name = self.session_name
-
self.session_name = name
-
yield
-
ensure
-
self.session_name = previous_session_name
-
end
-
-
##
-
#
-
# Parse raw html into a document using Nokogiri, and adjust textarea contents as defined by the spec.
-
#
-
# @param [String] html The raw html
-
# @return [Nokogiri::HTML::Document] HTML document
-
#
-
1
def HTML(html)
-
21
Nokogiri::HTML(html).tap do |document|
-
21
document.xpath('//textarea').each do |textarea|
-
textarea.content=textarea.content.sub(/\A\n/,'')
-
end
-
end
-
end
-
-
# @deprecated Use default_max_wait_time instead
-
1
def default_wait_time
-
deprecate('default_wait_time', 'default_max_wait_time', true)
-
default_max_wait_time
-
end
-
-
# @deprecated Use default_max_wait_time= instead
-
1
def default_wait_time=(t)
-
deprecate('default_wait_time=', 'default_max_wait_time=')
-
self.default_max_wait_time = t
-
end
-
-
1
def save_and_open_page_path=(path)
-
warn "DEPRECATED: #save_and_open_page_path is deprecated, please use #save_path instead. \n"\
-
"Note: Behavior is slightly different with relative paths - see documentation" unless path.nil?
-
@save_and_open_page_path = path
-
end
-
-
1
def included(base)
-
base.send(:include, Capybara::DSL)
-
warn "`include Capybara` is deprecated. Please use `include Capybara::DSL` instead."
-
end
-
-
1
def reuse_server=(bool)
-
1
warn "Capybara.reuse_server == false is a BETA feature and may change in a future version" unless bool
-
1
@reuse_server = bool
-
end
-
-
1
def deprecate(method, alternate_method, once=false)
-
@deprecation_notified ||= {}
-
warn "DEPRECATED: ##{method} is deprecated, please use ##{alternate_method} instead" unless once and @deprecation_notified[method]
-
@deprecation_notified[method]=true
-
end
-
-
1
private
-
-
1
def session_pool
-
66
@session_pool ||= {}
-
end
-
end
-
-
1
self.default_driver = nil
-
1
self.current_driver = nil
-
1
self.server_host = nil
-
-
1
module Driver; end
-
1
module RackTest; end
-
1
module Selenium; end
-
-
1
require 'capybara/helpers'
-
1
require 'capybara/session'
-
1
require 'capybara/window'
-
1
require 'capybara/server'
-
1
require 'capybara/selector'
-
1
require 'capybara/result'
-
1
require 'capybara/version'
-
-
1
require 'capybara/queries/base_query'
-
1
require 'capybara/queries/selector_query'
-
1
require 'capybara/queries/text_query'
-
1
require 'capybara/queries/title_query'
-
1
require 'capybara/queries/current_path_query'
-
1
require 'capybara/queries/match_query'
-
1
require 'capybara/query'
-
-
1
require 'capybara/node/finders'
-
1
require 'capybara/node/matchers'
-
1
require 'capybara/node/actions'
-
1
require 'capybara/node/document_matchers'
-
1
require 'capybara/node/simple'
-
1
require 'capybara/node/base'
-
1
require 'capybara/node/element'
-
1
require 'capybara/node/document'
-
-
1
require 'capybara/driver/base'
-
1
require 'capybara/driver/node'
-
-
1
require 'capybara/rack_test/driver'
-
1
require 'capybara/rack_test/node'
-
1
require 'capybara/rack_test/form'
-
1
require 'capybara/rack_test/browser'
-
1
require 'capybara/rack_test/css_handlers.rb'
-
-
1
require 'capybara/selenium/node'
-
1
require 'capybara/selenium/driver'
-
end
-
-
1
Capybara.register_server :default do |app, port, host|
-
Capybara.run_default_server(app, port)
-
end
-
-
1
Capybara.register_server :webrick do |app, port, host|
-
require 'rack/handler/webrick'
-
Rack::Handler::WEBrick.run(app, :Host => host, :Port => port, :AccessLog => [], :Logger => WEBrick::Log::new(nil, 0))
-
end
-
-
1
Capybara.register_server :puma do |app, port, host|
-
require 'puma'
-
Puma::Server.new(app).tap do |s|
-
s.add_tcp_listener host, port
-
end.run.join
-
end
-
-
1
Capybara.configure do |config|
-
1
config.always_include_port = false
-
1
config.run_server = true
-
1
config.server = :default
-
1
config.default_selector = :css
-
1
config.default_max_wait_time = 2
-
1
config.ignore_hidden_elements = true
-
1
config.default_host = "http://www.example.com"
-
1
config.automatic_reload = true
-
1
config.match = :smart
-
1
config.exact = false
-
1
config.raise_server_errors = true
-
1
config.server_errors = [StandardError]
-
1
config.visible_text_only = false
-
1
config.wait_on_first_by_default = false
-
1
config.reuse_server = true
-
end
-
-
1
Capybara.register_driver :rack_test do |app|
-
Capybara::RackTest::Driver.new(app)
-
end
-
-
1
Capybara.register_driver :selenium do |app|
-
Capybara::Selenium::Driver.new(app)
-
end
-
-
# frozen_string_literal: true
-
1
class Capybara::Driver::Base
-
1
def current_url
-
raise NotImplementedError
-
end
-
-
1
def visit(path)
-
raise NotImplementedError
-
end
-
-
1
def find_xpath(query)
-
raise NotImplementedError
-
end
-
-
1
def find_css(query)
-
raise NotImplementedError
-
end
-
-
1
def html
-
raise NotImplementedError
-
end
-
-
1
def go_back
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_back'
-
end
-
-
1
def go_forward
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_forward'
-
end
-
-
1
def execute_script(script)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script'
-
end
-
-
1
def evaluate_script(script)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script'
-
end
-
-
1
def save_screenshot(path, options={})
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot'
-
end
-
-
1
def response_headers
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers'
-
end
-
-
1
def status_code
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code'
-
end
-
-
1
def within_frame(frame_handle)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_frame'
-
end
-
-
1
def current_window_handle
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#current_window_handle'
-
end
-
-
1
def window_size(handle)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_size'
-
end
-
-
1
def resize_window_to(handle, width, height)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#resize_window_to'
-
end
-
-
1
def maximize_window(handle)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#maximize_current_window'
-
end
-
-
1
def close_window(handle)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#close_window'
-
end
-
-
1
def window_handles
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_handles'
-
end
-
-
1
def open_new_window
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#open_new_window'
-
end
-
-
1
def switch_to_window(handle)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_window'
-
end
-
-
1
def within_window(locator)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_window'
-
end
-
-
1
def no_such_window_error
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#no_such_window_error'
-
end
-
-
-
##
-
#
-
# Execute the block, and then accept the modal opened.
-
# @param type [:alert, :confirm, :prompt]
-
# @option options [Numeric] :wait How long to wait for the modal to appear after executing the block.
-
# @option options [String, Regexp] :text Text to verify is in the message shown in the modal
-
# @option options [String] :with Text to fill in in the case of a prompt
-
# @return [String] the message shown in the modal
-
# @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
-
#
-
1
def accept_modal(type, options={}, &blk)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#accept_modal'
-
end
-
-
##
-
#
-
# Execute the block, and then dismiss the modal opened.
-
# @param type [:alert, :confirm, :prompt]
-
# @option options [Numeric] :wait How long to wait for the modal to appear after executing the block.
-
# @option options [String, Regexp] :text Text to verify is in the message shown in the modal
-
# @return [String] the message shown in the modal
-
# @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
-
#
-
1
def dismiss_modal(type, options={}, &blk)
-
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal'
-
end
-
-
1
def invalid_element_errors
-
[]
-
end
-
-
1
def wait?
-
23
false
-
end
-
-
1
def reset!
-
end
-
-
1
def needs_server?
-
1
false
-
end
-
-
# @deprecated This method is being removed
-
1
def browser_initialized?
-
warn "DEPRECATED: #browser_initialized? is deprecated and will be removed in the next version of Capybara"
-
true
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Driver
-
1
class Node
-
1
attr_reader :driver, :native
-
-
1
def initialize(driver, native)
-
1071
@driver = driver
-
1071
@native = native
-
end
-
-
1
def all_text
-
raise NotImplementedError
-
end
-
-
1
def visible_text
-
raise NotImplementedError
-
end
-
-
1
def [](name)
-
raise NotImplementedError
-
end
-
-
1
def value
-
raise NotImplementedError
-
end
-
-
# @param value String or Array. Array is only allowed if node has 'multiple' attribute
-
# @param options [Hash{}] Driver specific options for how to set a value on a node
-
1
def set(value, options={})
-
raise NotImplementedError
-
end
-
-
1
def select_option
-
raise NotImplementedError
-
end
-
-
1
def unselect_option
-
raise NotImplementedError
-
end
-
-
1
def click
-
raise NotImplementedError
-
end
-
-
1
def right_click
-
raise NotImplementedError
-
end
-
-
1
def double_click
-
raise NotImplementedError
-
end
-
-
1
def send_keys(*args)
-
raise NotImplementedError
-
end
-
-
1
def hover
-
raise NotImplementedError
-
end
-
-
1
def drag_to(element)
-
raise NotImplementedError
-
end
-
-
1
def tag_name
-
raise NotImplementedError
-
end
-
-
1
def visible?
-
raise NotImplementedError
-
end
-
-
1
def checked?
-
raise NotImplementedError
-
end
-
-
1
def selected?
-
raise NotImplementedError
-
end
-
-
1
def disabled?
-
raise NotImplementedError
-
end
-
-
1
def path
-
raise NotSupportedByDriverError, 'Capybara::Driver::Node#path'
-
end
-
-
1
def trigger(event)
-
raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger'
-
end
-
-
1
def inspect
-
%(#<#{self.class} tag="#{tag_name}" path="#{path}">)
-
rescue NotSupportedByDriverError
-
%(#<#{self.class} tag="#{tag_name}">)
-
end
-
-
1
def ==(other)
-
raise NotSupportedByDriverError, 'Capybara::Driver::Node#=='
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'capybara'
-
-
1
module Capybara
-
1
module DSL
-
1
def self.included(base)
-
2
warn "including Capybara::DSL in the global scope is not recommended!" if base == Object
-
2
super
-
end
-
-
1
def self.extended(base)
-
1
warn "extending the main object with Capybara::DSL is not recommended!" if base == TOPLEVEL_BINDING.eval("self")
-
1
super
-
end
-
-
##
-
#
-
# Shortcut to working in a different session.
-
#
-
1
def using_session(name, &block)
-
Capybara.using_session(name, &block)
-
end
-
-
##
-
#
-
# Shortcut to using a different wait time.
-
#
-
1
def using_wait_time(seconds, &block)
-
Capybara.using_wait_time(seconds, &block)
-
end
-
-
##
-
#
-
# Shortcut to accessing the current session.
-
#
-
# class MyClass
-
# include Capybara::DSL
-
#
-
# def has_header?
-
# page.has_css?('h1')
-
# end
-
# end
-
#
-
# @return [Capybara::Session] The current session object
-
#
-
1
def page
-
48
Capybara.current_session
-
end
-
-
1
Session::DSL_METHODS.each do |method|
-
95
define_method method do |*args, &block|
-
45
page.send method, *args, &block
-
end
-
end
-
end
-
-
1
extend(Capybara::DSL)
-
end
-
# encoding: UTF-8
-
# frozen_string_literal: true
-
-
1
module Capybara
-
-
# @api private
-
1
module Helpers
-
1
extend self
-
-
##
-
#
-
# Normalizes whitespace space by stripping leading and trailing
-
# whitespace and replacing sequences of whitespace characters
-
# with a single space.
-
#
-
# @param [String] text Text to normalize
-
# @return [String] Normalized text
-
#
-
1
def normalize_whitespace(text)
-
10
text.to_s.gsub(/[[:space:]]+/, ' ').strip
-
end
-
-
##
-
#
-
# Escapes any characters that would have special meaning in a regexp
-
# if text is not a regexp
-
#
-
# @param [String] text Text to escape
-
# @return [String] Escaped text
-
#
-
1
def to_regexp(text)
-
3
text.is_a?(Regexp) ? text : Regexp.new(Regexp.escape(normalize_whitespace(text)))
-
end
-
-
##
-
#
-
# Injects a `<base>` tag into the given HTML code, pointing to
-
# `Capybara.asset_host`.
-
#
-
# @param [String] html HTML code to inject into
-
# @return [String] The modified HTML code
-
#
-
1
def inject_asset_host(html)
-
if Capybara.asset_host && Nokogiri::HTML(html).css("base").empty?
-
match = html.match(/<head[^<]*?>/)
-
if match
-
return html.clone.insert match.end(0), "<base href='#{Capybara.asset_host}' />"
-
end
-
end
-
-
html
-
end
-
-
##
-
#
-
# Checks if the given count matches the given count options.
-
# Defaults to true if no options are specified. If multiple
-
# options are provided, it tests that all conditions are met;
-
# however, if :count is supplied, all other options are ignored.
-
#
-
# @param [Integer] count The actual number. Should be coercible via Integer()
-
# @option [Range] between Count must be within the given range
-
# @option [Integer] count Count must be exactly this
-
# @option [Integer] maximum Count must be smaller than or equal to this value
-
# @option [Integer] minimum Count must be larger than or equal to this value
-
#
-
1
def matches_count?(count, options={})
-
3
return (Integer(options[:count]) == count) if options[:count]
-
3
return false if options[:maximum] && (Integer(options[:maximum]) < count)
-
3
return false if options[:minimum] && (Integer(options[:minimum]) > count)
-
3
return false if options[:between] && !(options[:between] === count)
-
3
return true
-
end
-
-
##
-
#
-
# Checks if a count of 0 is valid for the given options hash.
-
# Returns false if options hash does not specify any count options.
-
#
-
1
def expects_none?(options={})
-
if [:count, :maximum, :minimum, :between].any? { |k| options.has_key? k }
-
matches_count?(0,options)
-
else
-
false
-
end
-
end
-
-
##
-
#
-
# Generates a failure message given a description of the query and count
-
# options.
-
#
-
# @param [String] description Description of a query
-
# @option [Range] between Count should have been within the given range
-
# @option [Integer] count Count should have been exactly this
-
# @option [Integer] maximum Count should have been smaller than or equal to this value
-
# @option [Integer] minimum Count should have been larger than or equal to this value
-
#
-
1
def failure_message(description, options={})
-
message = String.new("expected to find #{description}")
-
if options[:count]
-
message << " #{options[:count]} #{declension('time', 'times', options[:count])}"
-
elsif options[:between]
-
message << " between #{options[:between].first} and #{options[:between].last} times"
-
elsif options[:maximum]
-
message << " at most #{options[:maximum]} #{declension('time', 'times', options[:maximum])}"
-
elsif options[:minimum]
-
message << " at least #{options[:minimum]} #{declension('time', 'times', options[:minimum])}"
-
end
-
message
-
end
-
-
##
-
#
-
# A poor man's `pluralize`. Given two declensions, one singular and one
-
# plural, as well as a count, this will pick the correct declension. This
-
# way we can generate grammatically correct error message.
-
#
-
# @param [String] singular The singular form of the word
-
# @param [String] plural The plural form of the word
-
# @param [Integer] count The number of items
-
#
-
1
def declension(singular, plural, count)
-
if count == 1
-
singular
-
else
-
plural
-
end
-
end
-
-
1
if defined?(Process::CLOCK_MONOTONIC)
-
1
def monotonic_time
-
84
Process.clock_gettime Process::CLOCK_MONOTONIC
-
end
-
else
-
def monotonic_time
-
Time.now.to_f
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
1
module Actions
-
-
##
-
#
-
# Finds a button or link by id, text or value and clicks it. Also looks at image
-
# alt text inside the link.
-
#
-
# @param [String] locator Text, id or value of link or button
-
#
-
1
def click_link_or_button(locator, options={})
-
find(:link_or_button, locator, options).click
-
end
-
1
alias_method :click_on, :click_link_or_button
-
-
##
-
#
-
# Finds a link by id, text or title and clicks it. Also looks at image
-
# alt text inside the link.
-
#
-
# @param [String] locator text, id, title or nested image's alt attribute
-
# @param options See {Capybara::Node::Finders#find_link}
-
#
-
1
def click_link(locator, options={})
-
5
find(:link, locator, options).click
-
end
-
-
##
-
#
-
# Finds a button on the page and clicks it.
-
# This can be any \<input> element of type submit, reset, image, button or it can be a
-
# \<button> element. All buttons can be found by their id, value, or title. \<button> elements can also be found
-
# by their text content, and image \<input> elements by their alt attribute
-
#
-
# @param [String] locator Which button to find
-
# @param options See {Capybara::Node::Finders#find_button}
-
1
def click_button(locator, options={})
-
find(:button, locator, options).click
-
end
-
-
##
-
#
-
# Locate a text field or text area and fill it in with the given text
-
# The field can be found via its name, id or label text.
-
#
-
# page.fill_in 'Name', :with => 'Bob'
-
#
-
# @param [String] locator Which field to fill in
-
# @param [Hash] options
-
# @option options [String] :with The value to fill in - required
-
# @option options [Hash] :fill_options Driver specific options regarding how to fill fields
-
#
-
1
def fill_in(locator, options={})
-
18
raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with)
-
18
with = options.delete(:with)
-
18
fill_options = options.delete(:fill_options)
-
18
find(:fillable_field, locator, options).set(with, fill_options)
-
end
-
-
##
-
#
-
# Find a radio button and mark it as checked. The radio button can be found
-
# via name, id or label text.
-
#
-
# page.choose('Male')
-
#
-
# @param [String] locator Which radio button to choose
-
#
-
1
def choose(locator, options={})
-
find(:radio_button, locator, options).set(true)
-
end
-
-
##
-
#
-
# Find a check box and mark it as checked. The check box can be found
-
# via name, id or label text.
-
#
-
# page.check('German')
-
#
-
# @param [String] locator Which check box to check
-
#
-
1
def check(locator, options={})
-
find(:checkbox, locator, options).set(true)
-
end
-
-
##
-
#
-
# Find a check box and mark uncheck it. The check box can be found
-
# via name, id or label text.
-
#
-
# page.uncheck('German')
-
#
-
# @param [String] locator Which check box to uncheck
-
#
-
1
def uncheck(locator, options={})
-
find(:checkbox, locator, options).set(false)
-
end
-
-
##
-
#
-
# If `:from` option is present, `select` finds a select box on the page
-
# and selects a particular option from it.
-
# Otherwise it finds an option inside current scope and selects it.
-
# If the select box is a multiple select, +select+ can be called multiple times to select more than
-
# one option.
-
# The select box can be found via its name, id or label text. The option can be found by its text.
-
#
-
# page.select 'March', :from => 'Month'
-
#
-
# @param [String] value Which option to select
-
# @option options [String] :from The id, name or label of the select box
-
#
-
1
def select(value, options={})
-
if options.has_key?(:from)
-
from = options.delete(:from)
-
find(:select, from, options).find(:option, value, options).select_option
-
else
-
find(:option, value, options).select_option
-
end
-
end
-
-
##
-
#
-
# Find a select box on the page and unselect a particular option from it. If the select
-
# box is a multiple select, +unselect+ can be called multiple times to unselect more than
-
# one option. The select box can be found via its name, id or label text.
-
#
-
# page.unselect 'March', :from => 'Month'
-
#
-
# @param [String] value Which option to unselect
-
# @param [Hash{:from => String}] options The id, name or label of the select box
-
#
-
1
def unselect(value, options={})
-
if options.has_key?(:from)
-
from = options.delete(:from)
-
find(:select, from, options).find(:option, value, options).unselect_option
-
else
-
find(:option, value, options).unselect_option
-
end
-
end
-
-
##
-
#
-
# Find a file field on the page and attach a file given its path. The file field can
-
# be found via its name, id or label text.
-
#
-
# page.attach_file(locator, '/path/to/file.png')
-
#
-
# @param [String] locator Which field to attach the file to
-
# @param [String] path The path of the file that will be attached, or an array of paths
-
#
-
# @option options [Symbol] match (Capybara.match) The matching strategy to use (:one, :first, :prefer_exact, :smart).
-
# @option options [Boolean] exact (Capybara.exact) Match the exact label name/contents or accept a partial match.
-
# @option options [Fixnum] wait (Capybara.default_max_wait_time) If using a Javascript driver, maximum number of seconds during which the element will be searched for.
-
# @option options [Boolean] multiple Match field which allows multiple file selection
-
#
-
1
def attach_file(locator, path, options={})
-
Array(path).each do |p|
-
raise Capybara::FileNotFound, "cannot attach file, #{p} does not exist" unless File.exist?(p.to_s)
-
end
-
find(:file_field, locator, options).set(path)
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
-
##
-
#
-
# A {Capybara::Node::Base} represents either an element on a page through the subclass
-
# {Capybara::Node::Element} or a document through {Capybara::Node::Document}.
-
#
-
# Both types of Node share the same methods, used for interacting with the
-
# elements on the page. These methods are divided into three categories,
-
# finders, actions and matchers. These are found in the modules
-
# {Capybara::Node::Finders}, {Capybara::Node::Actions} and {Capybara::Node::Matchers}
-
# respectively.
-
#
-
# A {Capybara::Session} exposes all methods from {Capybara::Node::Document} directly:
-
#
-
# session = Capybara::Session.new(:rack_test, my_app)
-
# session.visit('/')
-
# session.fill_in('Foo', :with => 'Bar') # from Capybara::Node::Actions
-
# bar = session.find('#bar') # from Capybara::Node::Finders
-
# bar.select('Baz', :from => 'Quox') # from Capybara::Node::Actions
-
# session.has_css?('#foobar') # from Capybara::Node::Matchers
-
#
-
1
class Base
-
1
attr_reader :session, :base, :parent
-
-
1
include Capybara::Node::Finders
-
1
include Capybara::Node::Actions
-
1
include Capybara::Node::Matchers
-
-
1
def initialize(session, base)
-
4
@session = session
-
4
@base = base
-
end
-
-
# overridden in subclasses, e.g. Capybara::Node::Element
-
1
def reload
-
self
-
end
-
-
##
-
#
-
# This method is Capybara's primary defence against asynchronicity
-
# problems. It works by attempting to run a given block of code until it
-
# succeeds. The exact behaviour of this method depends on a number of
-
# factors. Basically there are certain exceptions which, when raised
-
# from the block, instead of bubbling up, are caught, and the block is
-
# re-run.
-
#
-
# Certain drivers, such as RackTest, have no support for asynchronous
-
# processes, these drivers run the block, and any error raised bubbles up
-
# immediately. This allows faster turn around in the case where an
-
# expectation fails.
-
#
-
# Only exceptions that are {Capybara::ElementNotFound} or any subclass
-
# thereof cause the block to be rerun. Drivers may specify additional
-
# exceptions which also cause reruns. This usually occurs when a node is
-
# manipulated which no longer exists on the page. For example, the
-
# Selenium driver specifies
-
# `Selenium::WebDriver::Error::ObsoleteElementError`.
-
#
-
# As long as any of these exceptions are thrown, the block is re-run,
-
# until a certain amount of time passes. The amount of time defaults to
-
# {Capybara.default_max_wait_time} and can be overridden through the `seconds`
-
# argument. This time is compared with the system time to see how much
-
# time has passed. On rubies/platforms which don't support access to a monotonic process clock
-
# if the return value of `Time.now` is stubbed out, Capybara will raise `Capybara::FrozenInTime`.
-
#
-
# @param [Integer] seconds Number of seconds to retry this block
-
# @param options [Hash]
-
# @option options [Array<Exception>] :errors (driver.invalid_element_errors +
-
# [Capybara::ElementNotFound]) exception types that cause the block to be rerun
-
# @return [Object] The result of the given block
-
# @raise [Capybara::FrozenInTime] If the return value of `Time.now` appears stuck
-
#
-
1
def synchronize(seconds=Capybara.default_max_wait_time, options = {})
-
84
start_time = Capybara::Helpers.monotonic_time
-
-
84
if session.synchronized
-
58
yield
-
else
-
26
session.synchronized = true
-
26
begin
-
26
yield
-
23
rescue => e
-
23
session.raise_server_error!
-
23
raise e unless driver.wait?
-
raise e unless catch_error?(e, options[:errors])
-
raise e if (Capybara::Helpers.monotonic_time - start_time) >= seconds
-
sleep(0.05)
-
raise Capybara::FrozenInTime, "time appears to be frozen, Capybara does not work with libraries which freeze time, consider using time travelling instead" if Capybara::Helpers.monotonic_time == start_time
-
reload if Capybara.automatic_reload
-
retry
-
ensure
-
26
session.synchronized = false
-
26
end
-
end
-
end
-
-
# @api private
-
1
def find_css(css)
-
base.find_css(css)
-
end
-
-
# @api private
-
1
def find_xpath(xpath)
-
49
base.find_xpath(xpath)
-
end
-
-
1
protected
-
-
1
def catch_error?(error, errors = nil)
-
errors ||= (driver.invalid_element_errors + [Capybara::ElementNotFound])
-
errors.any? do |type|
-
error.is_a?(type)
-
end
-
end
-
-
1
def driver
-
23
session.driver
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
-
##
-
#
-
# A {Capybara::Document} represents an HTML document. Any operation
-
# performed on it will be performed on the entire document.
-
#
-
# @see Capybara::Node
-
#
-
1
class Document < Base
-
1
include Capybara::Node::DocumentMatchers
-
-
1
def inspect
-
%(#<Capybara::Document>)
-
end
-
-
##
-
#
-
# @return [String] The text of the document
-
#
-
1
def text(type=nil)
-
3
find(:xpath, '/html').text(type)
-
end
-
-
1
def title
-
session.driver.title
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
1
module DocumentMatchers
-
##
-
# Asserts that the page has the given title.
-
#
-
# @!macro title_query_params
-
# @overload $0(string, options = {})
-
# @param string [String] The string that title should include
-
# @overload $0(regexp, options = {})
-
# @param regexp [Regexp] The regexp that title should match to
-
# @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum time that Capybara will wait for title to eq/match given string/regexp argument
-
# @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time
-
# @return [true]
-
#
-
1
def assert_title(title, options = {})
-
query = Capybara::Queries::TitleQuery.new(title, options)
-
synchronize(query.wait) do
-
unless query.resolves_for?(self)
-
raise Capybara::ExpectationNotMet, query.failure_message
-
end
-
end
-
return true
-
end
-
-
##
-
# Asserts that the page doesn't have the given title.
-
#
-
# @macro title_query_params
-
# @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time
-
# @return [true]
-
#
-
1
def assert_no_title(title, options = {})
-
query = Capybara::Queries::TitleQuery.new(title, options)
-
synchronize(query.wait) do
-
if query.resolves_for?(self)
-
raise Capybara::ExpectationNotMet, query.negative_failure_message
-
end
-
end
-
return true
-
end
-
-
##
-
# Checks if the page has the given title.
-
#
-
# @macro title_query_params
-
# @return [Boolean]
-
#
-
1
def has_title?(title, options = {})
-
assert_title(title, options)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
-
##
-
# Checks if the page doesn't have the given title.
-
#
-
# @macro title_query_params
-
# @return [Boolean]
-
#
-
1
def has_no_title?(title, options = {})
-
assert_no_title(title, options)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
-
##
-
#
-
# A {Capybara::Node::Element} represents a single element on the page. It is possible
-
# to interact with the contents of this element the same as with a document:
-
#
-
# session = Capybara::Session.new(:rack_test, my_app)
-
#
-
# bar = session.find('#bar') # from Capybara::Node::Finders
-
# bar.select('Baz', :from => 'Quox') # from Capybara::Node::Actions
-
#
-
# {Capybara::Node::Element} also has access to HTML attributes and other properties of the
-
# element:
-
#
-
# bar.value
-
# bar.text
-
# bar[:title]
-
#
-
# @see Capybara::Node
-
#
-
1
class Element < Base
-
-
1
def initialize(session, base, parent, query)
-
3
super(session, base)
-
3
@parent = parent
-
3
@query = query
-
end
-
-
1
def allow_reload!
-
3
@allow_reload = true
-
end
-
-
##
-
#
-
# @return [Object] The native element from the driver, this allows access to driver specific methods
-
#
-
1
def native
-
synchronize { base.native }
-
end
-
-
##
-
#
-
# Retrieve the text of the element. If `Capybara.ignore_hidden_elements`
-
# is `true`, which it is by default, then this will return only text
-
# which is visible. The exact semantics of this may differ between
-
# drivers, but generally any text within elements with `display:none` is
-
# ignored. This behaviour can be overridden by passing `:all` to this
-
# method.
-
#
-
# @param [:all, :visible] type Whether to return only visible or all text
-
# @return [String] The text of the element
-
#
-
1
def text(type=nil)
-
3
type ||= :all unless Capybara.ignore_hidden_elements or Capybara.visible_text_only
-
3
synchronize do
-
3
if type == :all
-
base.all_text
-
else
-
3
base.visible_text
-
end
-
end
-
end
-
-
##
-
#
-
# Retrieve the given attribute
-
#
-
# element[:title] # => HTML title attribute
-
#
-
# @param [Symbol] attribute The attribute to retrieve
-
# @return [String] The value of the attribute
-
#
-
1
def [](attribute)
-
synchronize { base[attribute] }
-
end
-
-
##
-
#
-
# @return [String] The value of the form element
-
#
-
1
def value
-
synchronize { base.value }
-
end
-
-
##
-
#
-
# Set the value of the form element to the given value.
-
#
-
# @param [String] value The new value
-
# @param [Hash{}] options Driver specific options for how to set the value
-
#
-
1
def set(value, options={})
-
options ||= {}
-
-
driver_supports_options = (base.method(:set).arity != 1)
-
-
unless options.empty? || driver_supports_options
-
warn "Options passed to Capybara::Node#set but the driver doesn't support them"
-
end
-
-
synchronize do
-
if driver_supports_options
-
base.set(value, options)
-
else
-
base.set(value)
-
end
-
end
-
end
-
-
##
-
#
-
# Select this node if is an option element inside a select tag
-
#
-
1
def select_option
-
warn "Attempt to select disabled option: #{value || text}" if disabled?
-
synchronize { base.select_option }
-
end
-
-
##
-
#
-
# Unselect this node if is an option element inside a multiple select tag
-
#
-
1
def unselect_option
-
synchronize { base.unselect_option }
-
end
-
-
##
-
#
-
# Click the Element
-
#
-
1
def click
-
synchronize { base.click }
-
end
-
-
##
-
#
-
# Right Click the Element
-
#
-
1
def right_click
-
synchronize { base.right_click }
-
end
-
-
##
-
#
-
# Double Click the Element
-
#
-
1
def double_click
-
synchronize { base.double_click }
-
end
-
-
##
-
#
-
# Send Keystrokes to the Element
-
#
-
# @overload send_keys(keys, ...)
-
# @param [String, Symbol, Array<String,Symbol>] keys
-
#
-
# Examples:
-
#
-
# element.send_keys "foo" #=> value: 'foo'
-
# element.send_keys "tet", :left, "s" #=> value: 'test'
-
# element.send_keys [:control, 'a'], :space #=> value: ' ' - assuming ctrl-a selects all contents
-
#
-
# Symbols supported for keys
-
# :cancel
-
# :help
-
# :backspace
-
# :tab
-
# :clear
-
# :return
-
# :enter
-
# :shift
-
# :control
-
# :alt
-
# :pause
-
# :escape
-
# :space
-
# :page_up
-
# :page_down
-
# :end
-
# :home
-
# :left
-
# :up
-
# :right
-
# :down
-
# :insert
-
# :delete
-
# :semicolon
-
# :equals
-
# :numpad0
-
# :numpad1
-
# :numpad2
-
# :numpad3
-
# :numpad4
-
# :numpad5
-
# :numpad6
-
# :numpad7
-
# :numpad8
-
# :numpad9
-
# :multiply - numeric keypad *
-
# :add - numeric keypad +
-
# :separator - numeric keypad 'separator' key ??
-
# :subtract - numeric keypad -
-
# :decimal - numeric keypad .
-
# :divide - numeric keypad /
-
# :f1
-
# :f2
-
# :f3
-
# :f4
-
# :f5
-
# :f6
-
# :f7
-
# :f8
-
# :f9
-
# :f10
-
# :f11
-
# :f12
-
# :meta
-
# :command - alias of :meta
-
#
-
1
def send_keys(*args)
-
synchronize { base.send_keys(*args) }
-
end
-
-
##
-
#
-
# Hover on the Element
-
#
-
1
def hover
-
synchronize { base.hover }
-
end
-
-
##
-
#
-
# @return [String] The tag name of the element
-
#
-
1
def tag_name
-
synchronize { base.tag_name }
-
end
-
-
##
-
#
-
# Whether or not the element is visible. Not all drivers support CSS, so
-
# the result may be inaccurate.
-
#
-
# @return [Boolean] Whether the element is visible
-
#
-
1
def visible?
-
6
synchronize { base.visible? }
-
end
-
-
##
-
#
-
# Whether or not the element is checked.
-
#
-
# @return [Boolean] Whether the element is checked
-
#
-
1
def checked?
-
synchronize { base.checked? }
-
end
-
-
##
-
#
-
# Whether or not the element is selected.
-
#
-
# @return [Boolean] Whether the element is selected
-
#
-
1
def selected?
-
synchronize { base.selected? }
-
end
-
-
##
-
#
-
# Whether or not the element is disabled.
-
#
-
# @return [Boolean] Whether the element is disabled
-
#
-
1
def disabled?
-
synchronize { base.disabled? }
-
end
-
-
##
-
#
-
# An XPath expression describing where on the page the element can be found
-
#
-
# @return [String] An XPath expression
-
#
-
1
def path
-
synchronize { base.path }
-
end
-
-
##
-
#
-
# Trigger any event on the current element, for example mouseover or focus
-
# events. Does not work in Selenium.
-
#
-
# @param [String] event The name of the event to trigger
-
#
-
1
def trigger(event)
-
synchronize { base.trigger(event) }
-
end
-
-
##
-
#
-
# Drag the element to the given other element.
-
#
-
# source = page.find('#foo')
-
# target = page.find('#bar')
-
# source.drag_to(target)
-
#
-
# @param [Capybara::Node::Element] node The element to drag to
-
#
-
1
def drag_to(node)
-
synchronize { base.drag_to(node.base) }
-
end
-
-
1
def reload
-
if @allow_reload
-
begin
-
reloaded = parent.reload.first(@query.name, @query.locator, @query.options)
-
@base = reloaded.base if reloaded
-
rescue => e
-
raise e unless catch_error?(e)
-
end
-
end
-
self
-
end
-
-
1
def inspect
-
%(#<Capybara::Node::Element tag="#{tag_name}" path="#{path}">)
-
rescue NotSupportedByDriverError
-
%(#<Capybara::Node::Element tag="#{tag_name}">)
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
1
module Finders
-
-
##
-
#
-
# Find an {Capybara::Node::Element} based on the given arguments. +find+ will raise an error if the element
-
# is not found.
-
#
-
# @!macro waiting_behavior
-
# If the driver is capable of executing JavaScript, +$0+ will wait for a set amount of time
-
# and continuously retry finding the element until either the element is found or the time
-
# expires. The length of time +find+ will wait is controlled through {Capybara.default_max_wait_time}
-
# and defaults to 2 seconds.
-
# @option options [false, Numeric] wait (Capybara.default_max_wait_time) Maximum time to wait for matching element to appear.
-
#
-
# +find+ takes the same options as +all+.
-
#
-
# page.find('#foo').find('.bar')
-
# page.find(:xpath, '//div[contains(., "bar")]')
-
# page.find('li', :text => 'Quox').click_link('Delete')
-
#
-
# @param (see Capybara::Node::Finders#all)
-
#
-
# @option options [Boolean] match The matching strategy to use.
-
#
-
# @return [Capybara::Node::Element] The found element
-
# @raise [Capybara::ElementNotFound] If the element can't be found before time expires
-
#
-
1
def find(*args)
-
26
query = Capybara::Queries::SelectorQuery.new(*args)
-
synchronize(query.wait) do
-
26
if query.match == :smart or query.match == :prefer_exact
-
26
result = query.resolve_for(self, true)
-
26
result = query.resolve_for(self, false) if result.size == 0 && !query.exact?
-
else
-
result = query.resolve_for(self)
-
end
-
26
if query.match == :one or query.match == :smart and result.size > 1
-
raise Capybara::Ambiguous.new("Ambiguous match, found #{result.size} elements matching #{query.description}")
-
end
-
26
if result.size == 0
-
23
raise Capybara::ElementNotFound.new("Unable to find #{query.description}")
-
end
-
3
result.first
-
26
end.tap(&:allow_reload!)
-
end
-
-
##
-
#
-
# Find a form field on the page. The field can be found by its name, id or label text.
-
#
-
# @macro waiting_behavior
-
#
-
# @param [String] locator Which field to find
-
#
-
# @option options [Boolean] checked Match checked field?
-
# @option options [Boolean] unchecked Match unchecked field?
-
# @option options [Boolean, Symbol] disabled (false) Match disabled field?
-
# * true - only finds a disabled field
-
# * false - only finds an enabled field
-
# * :all - finds either an enabled or disabled field
-
# @option options [Boolean] readonly Match readonly field?
-
# @option options [String] with Value of field to match on
-
# @option options [String] type Type of field to match on
-
# @return [Capybara::Node::Element] The found element
-
#
-
1
def find_field(locator, options={})
-
find(:field, locator, options)
-
end
-
1
alias_method :field_labeled, :find_field
-
-
##
-
#
-
# Find a link on the page. The link can be found by its id or text.
-
#
-
# @macro waiting_behavior
-
#
-
# @param [String] locator Which link to find
-
# @option options [String,Regexp] href Value to match against the links href
-
# @return [Capybara::Node::Element] The found element
-
#
-
1
def find_link(locator, options={})
-
find(:link, locator, options)
-
end
-
-
##
-
#
-
# Find a button on the page.
-
# This can be any \<input> element of type submit, reset, image, button or it can be a
-
# \<button> element. All buttons can be found by their id, value, or title. \<button> elements can also be found
-
# by their text content, and image \<input> elements by their alt attribute
-
-
# @macro waiting_behavior
-
#
-
# @param [String] locator Which button to find
-
# @option options [Boolean, Symbol] disabled (false) Match disabled button?
-
# * true - only finds a disabled button
-
# * false - only finds an enabled button
-
# * :all - finds either an enabled or disabled button
-
# @return [Capybara::Node::Element] The found element
-
#
-
1
def find_button(locator, options={})
-
find(:button, locator, options)
-
end
-
-
##
-
#
-
# Find a element on the page, given its id.
-
#
-
# @macro waiting_behavior
-
#
-
# @param [String] id Which element to find
-
#
-
# @return [Capybara::Node::Element] The found element
-
#
-
1
def find_by_id(id, options={})
-
find(:id, id, options)
-
end
-
-
##
-
#
-
# Find all elements on the page matching the given selector
-
# and options.
-
#
-
# Both XPath and CSS expressions are supported, but Capybara
-
# does not try to automatically distinguish between them. The
-
# following statements are equivalent:
-
#
-
# page.all(:css, 'a#person_123')
-
# page.all(:xpath, '//a[@id="person_123"]')
-
#
-
#
-
# If the type of selector is left out, Capybara uses
-
# {Capybara.default_selector}. It's set to :css by default.
-
#
-
# page.all("a#person_123")
-
#
-
# Capybara.default_selector = :xpath
-
# page.all('//a[@id="person_123"]')
-
#
-
# The set of found elements can further be restricted by specifying
-
# options. It's possible to select elements by their text or visibility:
-
#
-
# page.all('a', :text => 'Home')
-
# page.all('#menu li', :visible => true)
-
#
-
# By default if no elements are found, an empty array is returned;
-
# however, expectations can be set on the number of elements to be found which
-
# will trigger Capybara's waiting behavior for the expectations to match.The
-
# expectations can be set using
-
#
-
# page.assert_selector('p#foo', :count => 4)
-
# page.assert_selector('p#foo', :maximum => 10)
-
# page.assert_selector('p#foo', :minimum => 1)
-
# page.assert_selector('p#foo', :between => 1..10)
-
#
-
# See {Capybara::Helpers#matches_count?} for additional information about
-
# count matching.
-
#
-
# @overload all([kind], locator, options)
-
# @param [:css, :xpath] kind The type of selector
-
# @param [String] locator The selector
-
# @option options [String, Regexp] text Only find elements which contain this text or match this regexp
-
# @option options [Boolean, Symbol] visible Only find elements with the specified visibility:
-
# * true - only finds visible elements.
-
# * false - finds invisible _and_ visible elements.
-
# * :all - same as false; finds visible and invisible elements.
-
# * :hidden - only finds invisible elements.
-
# * :visible - same as true; only finds visible elements.
-
# @option options [Integer] count Exact number of matches that are expected to be found
-
# @option options [Integer] maximum Maximum number of matches that are expected to be found
-
# @option options [Integer] minimum Minimum number of matches that are expected to be found
-
# @option options [Range] between Number of matches found must be within the given range
-
# @option options [Boolean] exact Control whether `is` expressions in the given XPath match exactly or partially
-
# @option options [Integer] wait (Capybara.default_max_wait_time) The time to wait for element count expectations to become true
-
# @return [Capybara::Result] A collection of found elements
-
#
-
1
def all(*args)
-
query = Capybara::Queries::SelectorQuery.new(*args)
-
synchronize(query.wait) do
-
result = query.resolve_for(self)
-
raise Capybara::ExpectationNotMet, result.failure_message unless result.matches_count?
-
result
-
end
-
end
-
1
alias_method :find_all, :all
-
-
##
-
#
-
# Find the first element on the page matching the given selector
-
# and options, or nil if no element matches. By default no waiting
-
# behavior occurs, however if {Capybara.wait_on_first_by_default} is set to true
-
# it will trigger Capybara's waiting behavior for a minimum of 1 matching element to be found and
-
# return the first. Waiting behavior can also be triggered by passing in any of the count
-
# expectation options.
-
#
-
# @overload first([kind], locator, options)
-
# @param [:css, :xpath] kind The type of selector
-
# @param [String] locator The selector
-
# @param [Hash] options Additional options; see {#all}
-
# @return [Capybara::Node::Element] The found element or nil
-
#
-
1
def first(*args)
-
if Capybara.wait_on_first_by_default
-
options = if args.last.is_a?(Hash) then args.pop.dup else {} end
-
args.push({minimum: 1}.merge(options))
-
end
-
all(*args).first
-
rescue Capybara::ExpectationNotMet
-
nil
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
1
module Matchers
-
-
##
-
#
-
# Checks if a given selector is on the page or current node.
-
#
-
# page.has_selector?('p#foo')
-
# page.has_selector?(:xpath, './/p[@id="foo"]')
-
# page.has_selector?(:foo)
-
#
-
# By default it will check if the expression occurs at least once,
-
# but a different number can be specified.
-
#
-
# page.has_selector?('p.foo', :count => 4)
-
#
-
# This will check if the expression occurs exactly 4 times.
-
#
-
# It also accepts all options that {Capybara::Node::Finders#all} accepts,
-
# such as :text and :visible.
-
#
-
# page.has_selector?('li', :text => 'Horse', :visible => true)
-
#
-
# has_selector? can also accept XPath expressions generated by the
-
# XPath gem:
-
#
-
# page.has_selector?(:xpath, XPath.descendant(:p))
-
#
-
# @param (see Capybara::Node::Finders#all)
-
# @param args
-
# @option args [Integer] :count (nil) Number of times the text should occur
-
# @option args [Integer] :minimum (nil) Minimum number of times the text should occur
-
# @option args [Integer] :maximum (nil) Maximum number of times the text should occur
-
# @option args [Range] :between (nil) Range of times that should contain number of times text occurs
-
# @return [Boolean] If the expression exists
-
#
-
1
def has_selector?(*args)
-
assert_selector(*args)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
-
##
-
#
-
# Checks if a given selector is not on the page or current node.
-
# Usage is identical to Capybara::Node::Matchers#has_selector?
-
#
-
# @param (see Capybara::Node::Finders#has_selector?)
-
# @return [Boolean]
-
#
-
1
def has_no_selector?(*args)
-
assert_no_selector(*args)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
-
##
-
#
-
# Checks if the current node matches given selector
-
# Usage is identical to Capybara::Node::Matchers#has_selector?
-
#
-
# @param (see Capybara::Node::Finders#has_selector?)
-
# @return [Boolean]
-
#
-
1
def matches_selector?(*args)
-
assert_matches_selector(*args)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
-
-
##
-
#
-
# Checks if the current node does not match given selector
-
# Usage is identical to Capybara::Node::Matchers#has_selector?
-
#
-
# @param (see Capybara::Node::Finders#has_selector?)
-
# @return [Boolean]
-
#
-
1
def not_matches_selector?(*args)
-
assert_not_matches_selector(*args)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
-
-
##
-
#
-
# Asserts that a given selector is on the page or current node.
-
#
-
# page.assert_selector('p#foo')
-
# page.assert_selector(:xpath, './/p[@id="foo"]')
-
# page.assert_selector(:foo)
-
#
-
# By default it will check if the expression occurs at least once,
-
# but a different number can be specified.
-
#
-
# page.assert_selector('p#foo', :count => 4)
-
#
-
# This will check if the expression occurs exactly 4 times. See
-
# {Capybara::Node::Finders#all} for other available result size options.
-
#
-
# If a :count of 0 is specified, it will behave like {#assert_no_selector};
-
# however, use of that method is preferred over this one.
-
#
-
# It also accepts all options that {Capybara::Node::Finders#all} accepts,
-
# such as :text and :visible.
-
#
-
# page.assert_selector('li', :text => 'Horse', :visible => true)
-
#
-
# `assert_selector` can also accept XPath expressions generated by the
-
# XPath gem:
-
#
-
# page.assert_selector(:xpath, XPath.descendant(:p))
-
#
-
# @param (see Capybara::Node::Finders#all)
-
# @option options [Integer] :count (nil) Number of times the expression should occur
-
# @raise [Capybara::ExpectationNotMet] If the selector does not exist
-
#
-
1
def assert_selector(*args)
-
query = Capybara::Queries::SelectorQuery.new(*args)
-
synchronize(query.wait) do
-
result = query.resolve_for(self)
-
matches_count = Capybara::Helpers.matches_count?(result.size, query.options)
-
unless matches_count && ((result.size > 0) || Capybara::Helpers.expects_none?(query.options))
-
raise Capybara::ExpectationNotMet, result.failure_message
-
end
-
end
-
return true
-
end
-
-
##
-
#
-
# Asserts that a given selector is not on the page or current node.
-
# Usage is identical to Capybara::Node::Matchers#assert_selector
-
#
-
# Query options such as :count, :minimum, :maximum, and :between are
-
# considered to be an integral part of the selector. This will return
-
# true, for example, if a page contains 4 anchors but the query expects 5:
-
#
-
# page.assert_no_selector('a', :minimum => 1) # Found, raises Capybara::ExpectationNotMet
-
# page.assert_no_selector('a', :count => 4) # Found, raises Capybara::ExpectationNotMet
-
# page.assert_no_selector('a', :count => 5) # Not Found, returns true
-
#
-
# @param (see Capybara::Node::Finders#assert_selector)
-
# @raise [Capybara::ExpectationNotMet] If the selector exists
-
#
-
1
def assert_no_selector(*args)
-
query = Capybara::Queries::SelectorQuery.new(*args)
-
synchronize(query.wait) do
-
result = query.resolve_for(self)
-
matches_count = Capybara::Helpers.matches_count?(result.size, query.options)
-
if matches_count && ((result.size > 0) || Capybara::Helpers.expects_none?(query.options))
-
raise Capybara::ExpectationNotMet, result.negative_failure_message
-
end
-
end
-
return true
-
end
-
1
alias_method :refute_selector, :assert_no_selector
-
-
##
-
#
-
# Asserts that the current_node matches a given selector
-
#
-
# node.assert_matches_selector('p#foo')
-
# node.assert_matches_selector(:xpath, '//p[@id="foo"]')
-
# node.assert_matches_selector(:foo)
-
#
-
# It also accepts all options that {Capybara::Node::Finders#all} accepts,
-
# such as :text and :visible.
-
#
-
# node.assert_matches_selector('li', :text => 'Horse', :visible => true)
-
#
-
# @param (see Capybara::Node::Finders#all)
-
# @raise [Capybara::ExpectationNotMet] If the selector does not match
-
#
-
1
def assert_matches_selector(*args)
-
query = Capybara::Queries::MatchQuery.new(*args)
-
synchronize(query.wait) do
-
result = query.resolve_for(self.parent)
-
unless result.include? self
-
raise Capybara::ExpectationNotMet, "Item does not match the provided selector"
-
end
-
end
-
return true
-
end
-
-
1
def assert_not_matches_selector(*args)
-
query = Capybara::Queries::MatchQuery.new(*args)
-
synchronize(query.wait) do
-
result = query.resolve_for(self.parent)
-
if result.include? self
-
raise Capybara::ExpectationNotMet, 'Item matched the provided selector'
-
end
-
end
-
return true
-
end
-
1
alias_method :refute_matches_selector, :assert_not_matches_selector
-
-
##
-
#
-
# Checks if a given XPath expression is on the page or current node.
-
#
-
# page.has_xpath?('.//p[@id="foo"]')
-
#
-
# By default it will check if the expression occurs at least once,
-
# but a different number can be specified.
-
#
-
# page.has_xpath?('.//p[@id="foo"]', :count => 4)
-
#
-
# This will check if the expression occurs exactly 4 times.
-
#
-
# It also accepts all options that {Capybara::Node::Finders#all} accepts,
-
# such as :text and :visible.
-
#
-
# page.has_xpath?('.//li', :text => 'Horse', :visible => true)
-
#
-
# has_xpath? can also accept XPath expressions generate by the
-
# XPath gem:
-
#
-
# xpath = XPath.generate { |x| x.descendant(:p) }
-
# page.has_xpath?(xpath)
-
#
-
# @param [String] path An XPath expression
-
# @param options (see Capybara::Node::Finders#all)
-
# @option options [Integer] :count (nil) Number of times the expression should occur
-
# @return [Boolean] If the expression exists
-
#
-
1
def has_xpath?(path, options={})
-
has_selector?(:xpath, path, options)
-
end
-
-
##
-
#
-
# Checks if a given XPath expression is not on the page or current node.
-
# Usage is identical to Capybara::Node::Matchers#has_xpath?
-
#
-
# @param (see Capybara::Node::Finders#has_xpath?)
-
# @return [Boolean]
-
#
-
1
def has_no_xpath?(path, options={})
-
has_no_selector?(:xpath, path, options)
-
end
-
-
##
-
#
-
# Checks if a given CSS selector is on the page or current node.
-
#
-
# page.has_css?('p#foo')
-
#
-
# By default it will check if the selector occurs at least once,
-
# but a different number can be specified.
-
#
-
# page.has_css?('p#foo', :count => 4)
-
#
-
# This will check if the selector occurs exactly 4 times.
-
#
-
# It also accepts all options that {Capybara::Node::Finders#all} accepts,
-
# such as :text and :visible.
-
#
-
# page.has_css?('li', :text => 'Horse', :visible => true)
-
#
-
# @param [String] path A CSS selector
-
# @param options (see Capybara::Node::Finders#all)
-
# @option options [Integer] :count (nil) Number of times the selector should occur
-
# @return [Boolean] If the selector exists
-
#
-
1
def has_css?(path, options={})
-
has_selector?(:css, path, options)
-
end
-
-
##
-
#
-
# Checks if a given CSS selector is not on the page or current node.
-
# Usage is identical to Capybara::Node::Matchers#has_css?
-
#
-
# @param (see Capybara::Node::Finders#has_css?)
-
# @return [Boolean]
-
#
-
1
def has_no_css?(path, options={})
-
has_no_selector?(:css, path, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has a link with the given
-
# text or id.
-
#
-
# @param [String] locator The text or id of a link to check for
-
# @param options
-
# @option options [String, Regexp] :href The value the href attribute must be
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_link?(locator, options={})
-
has_selector?(:link, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has no link with the given
-
# text or id.
-
#
-
# @param (see Capybara::Node::Finders#has_link?)
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_link?(locator, options={})
-
has_no_selector?(:link, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has a button with the given
-
# text, value or id.
-
#
-
# @param [String] locator The text, value or id of a button to check for
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_button?(locator, options={})
-
has_selector?(:button, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has no button with the given
-
# text, value or id.
-
#
-
# @param [String] locator The text, value or id of a button to check for
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_button?(locator, options={})
-
has_no_selector?(:button, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has a form field with the given
-
# label, name or id.
-
#
-
# For text fields and other textual fields, such as textareas and
-
# HTML5 email/url/etc. fields, it's possible to specify a :with
-
# option to specify the text the field should contain:
-
#
-
# page.has_field?('Name', :with => 'Jonas')
-
#
-
# It is also possible to filter by the field type attribute:
-
#
-
# page.has_field?('Email', :type => 'email')
-
#
-
# Note: 'textarea' and 'select' are valid type values, matching the associated tag names.
-
#
-
# @param [String] locator The label, name or id of a field to check for
-
# @option options [String] :with The text content of the field
-
# @option options [String] :type The type attribute of the field
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_field?(locator, options={})
-
has_selector?(:field, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has no form field with the given
-
# label, name or id. See {Capybara::Node::Matchers#has_field?}.
-
#
-
# @param [String] locator The label, name or id of a field to check for
-
# @option options [String] :with The text content of the field
-
# @option options [String] :type The type attribute of the field
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_field?(locator, options={})
-
has_no_selector?(:field, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has a radio button or
-
# checkbox with the given label, value or id, that is currently
-
# checked.
-
#
-
# @param [String] locator The label, name or id of a checked field
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_checked_field?(locator, options={})
-
has_selector?(:field, locator, options.merge(:checked => true))
-
end
-
-
##
-
#
-
# Checks if the page or current node has no radio button or
-
# checkbox with the given label, value or id, that is currently
-
# checked.
-
#
-
# @param [String] locator The label, name or id of a checked field
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_checked_field?(locator, options={})
-
has_no_selector?(:field, locator, options.merge(:checked => true))
-
end
-
-
##
-
#
-
# Checks if the page or current node has a radio button or
-
# checkbox with the given label, value or id, that is currently
-
# unchecked.
-
#
-
# @param [String] locator The label, name or id of an unchecked field
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_unchecked_field?(locator, options={})
-
has_selector?(:field, locator, options.merge(:unchecked => true))
-
end
-
-
##
-
#
-
# Checks if the page or current node has no radio button or
-
# checkbox with the given label, value or id, that is currently
-
# unchecked.
-
#
-
# @param [String] locator The label, name or id of an unchecked field
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_unchecked_field?(locator, options={})
-
has_no_selector?(:field, locator, options.merge(:unchecked => true))
-
end
-
-
##
-
#
-
# Checks if the page or current node has a select field with the
-
# given label, name or id.
-
#
-
# It can be specified which option should currently be selected:
-
#
-
# page.has_select?('Language', :selected => 'German')
-
#
-
# For multiple select boxes, several options may be specified:
-
#
-
# page.has_select?('Language', :selected => ['English', 'German'])
-
#
-
# It's also possible to check if the exact set of options exists for
-
# this select box:
-
#
-
# page.has_select?('Language', :options => ['English', 'German', 'Spanish'])
-
#
-
# You can also check for a partial set of options:
-
#
-
# page.has_select?('Language', :with_options => ['English', 'German'])
-
#
-
# @param [String] locator The label, name or id of a select box
-
# @option options [Array] :options Options which should be contained in this select box
-
# @option options [Array] :with_options Partial set of options which should be contained in this select box
-
# @option options [String, Array] :selected Options which should be selected
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_select?(locator, options={})
-
has_selector?(:select, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has no select field with the
-
# given label, name or id. See {Capybara::Node::Matchers#has_select?}.
-
#
-
# @param (see Capybara::Node::Matchers#has_select?)
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_select?(locator, options={})
-
has_no_selector?(:select, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has a table with the given id
-
# or caption:
-
#
-
# page.has_table?('People')
-
#
-
# @param [String] locator The id or caption of a table
-
# @return [Boolean] Whether it exist
-
#
-
1
def has_table?(locator, options={})
-
has_selector?(:table, locator, options)
-
end
-
-
##
-
#
-
# Checks if the page or current node has no table with the given id
-
# or caption. See {Capybara::Node::Matchers#has_table?}.
-
#
-
# @param (see Capybara::Node::Matchers#has_table?)
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_table?(locator, options={})
-
has_no_selector?(:table, locator, options)
-
end
-
-
##
-
# Asserts that the page or current node has the given text content,
-
# ignoring any HTML tags.
-
#
-
# @!macro text_query_params
-
# @overload $0(type, text, options = {})
-
# @param [:all, :visible] type Whether to check for only visible or all text
-
# @param [String, Regexp] text The string/regexp to check for. If it's a string, text is expected to include it. If it's a regexp, text is expected to match it.
-
# @option options [Integer] :count (nil) Number of times the text is expected to occur
-
# @option options [Integer] :minimum (nil) Minimum number of times the text is expected to occur
-
# @option options [Integer] :maximum (nil) Maximum number of times the text is expected to occur
-
# @option options [Range] :between (nil) Range of times that is expected to contain number of times text occurs
-
# @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum time that Capybara will wait for text to eq/match given string/regexp argument
-
# @overload $0(text, options = {})
-
# @param [String, Regexp] text The string/regexp to check for. If it's a string, text is expected to include it. If it's a regexp, text is expected to match it.
-
# @option options [Integer] :count (nil) Number of times the text is expected to occur
-
# @option options [Integer] :minimum (nil) Minimum number of times the text is expected to occur
-
# @option options [Integer] :maximum (nil) Maximum number of times the text is expected to occur
-
# @option options [Range] :between (nil) Range of times that is expected to contain number of times text occurs
-
# @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum time that Capybara will wait for text to eq/match given string/regexp argument
-
# @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time
-
# @return [true]
-
#
-
1
def assert_text(*args)
-
3
query = Capybara::Queries::TextQuery.new(*args)
-
3
synchronize(query.wait) do
-
3
count = query.resolve_for(self)
-
3
matches_count = Capybara::Helpers.matches_count?(count, query.options)
-
3
unless matches_count && ((count > 0) || Capybara::Helpers.expects_none?(query.options))
-
raise Capybara::ExpectationNotMet, query.failure_message
-
end
-
end
-
3
return true
-
end
-
-
##
-
# Asserts that the page or current node doesn't have the given text content,
-
# ignoring any HTML tags.
-
#
-
# @macro text_query_params
-
# @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time
-
# @return [true]
-
#
-
1
def assert_no_text(*args)
-
query = Capybara::Queries::TextQuery.new(*args)
-
synchronize(query.wait) do
-
count = query.resolve_for(self)
-
matches_count = Capybara::Helpers.matches_count?(count, query.options)
-
if matches_count && ((count > 0) || Capybara::Helpers.expects_none?(query.options))
-
raise Capybara::ExpectationNotMet, query.negative_failure_message
-
end
-
end
-
return true
-
end
-
-
##
-
# Checks if the page or current node has the given text content,
-
# ignoring any HTML tags.
-
#
-
# Whitespaces are normalized in both node's text and passed text parameter.
-
# Note that whitespace isn't normalized in passed regexp as normalizing whitespace
-
# in regexp isn't easy and doesn't seem to be worth it.
-
#
-
# By default it will check if the text occurs at least once,
-
# but a different number can be specified.
-
#
-
# page.has_text?('lorem ipsum', between: 2..4)
-
#
-
# This will check if the text occurs from 2 to 4 times.
-
#
-
# @macro text_query_params
-
# @return [Boolean] Whether it exists
-
#
-
1
def has_text?(*args)
-
3
assert_text(*args)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
1
alias_method :has_content?, :has_text?
-
-
##
-
# Checks if the page or current node does not have the given text
-
# content, ignoring any HTML tags and normalizing whitespace.
-
#
-
# @macro text_query_params
-
# @return [Boolean] Whether it doesn't exist
-
#
-
1
def has_no_text?(*args)
-
assert_no_text(*args)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
1
alias_method :has_no_content?, :has_no_text?
-
-
1
def ==(other)
-
self.eql?(other) || (other.respond_to?(:base) && base == other.base)
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Node
-
-
##
-
#
-
# A {Capybara::Node::Simple} is a simpler version of {Capybara::Node::Base} which
-
# includes only {Capybara::Node::Finders} and {Capybara::Node::Matchers} and does
-
# not include {Capybara::Node::Actions}. This type of node is returned when
-
# using {Capybara.string}.
-
#
-
# It is useful in that it does not require a session, an application or a driver,
-
# but can still use Capybara's finders and matchers on any string that contains HTML.
-
#
-
1
class Simple
-
1
include Capybara::Node::Finders
-
1
include Capybara::Node::Matchers
-
1
include Capybara::Node::DocumentMatchers
-
-
1
attr_reader :native
-
-
1
def initialize(native)
-
1071
native = Capybara::HTML(native) if native.is_a?(String)
-
1071
@native = native
-
end
-
-
##
-
#
-
# @return [String] The text of the element
-
#
-
1
def text(type=nil)
-
native.text
-
end
-
-
##
-
#
-
# Retrieve the given attribute
-
#
-
# element[:title] # => HTML title attribute
-
#
-
# @param [Symbol] name The attribute name to retrieve
-
# @return [String] The value of the attribute
-
#
-
1
def [](name)
-
attr_name = name.to_s
-
if attr_name == 'value'
-
value
-
elsif 'input' == tag_name and 'checkbox' == native[:type] and 'checked' == attr_name
-
native['checked'] == 'checked'
-
else
-
native[attr_name]
-
end
-
end
-
-
##
-
#
-
# @return [String] The tag name of the element
-
#
-
1
def tag_name
-
2140
native.node_name
-
end
-
-
##
-
#
-
# An XPath expression describing where on the page the element can be found
-
#
-
# @return [String] An XPath expression
-
#
-
1
def path
-
native.path
-
end
-
-
##
-
#
-
# @return [String] The value of the form element
-
#
-
1
def value
-
if tag_name == 'textarea'
-
native.content
-
elsif tag_name == 'select'
-
if native['multiple'] == 'multiple'
-
native.xpath(".//option[@selected='selected']").map { |option| option[:value] || option.content }
-
else
-
option = native.xpath(".//option[@selected='selected']").first || native.xpath(".//option").first
-
option[:value] || option.content if option
-
end
-
elsif tag_name == 'input' && %w(radio checkbox).include?(native[:type])
-
native[:value] || 'on'
-
else
-
native[:value]
-
end
-
end
-
-
##
-
#
-
# Whether or not the element is visible. Does not support CSS, so
-
# the result may be inaccurate.
-
#
-
# @param [Boolean] check_ancestors Whether to inherit visibility from ancestors
-
# @return [Boolean] Whether the element is visible
-
#
-
1
def visible?(check_ancestors = true)
-
1074
return false if (tag_name == 'input') && (native[:type]=="hidden")
-
-
1072
if check_ancestors
-
#check size because oldest supported nokogiri doesnt support xpath boolean() function
-
6
native.xpath("./ancestor-or-self::*[contains(@style, 'display:none') or contains(@style, 'display: none') or @hidden or name()='script' or name()='head']").size() == 0
-
else
-
#no need for an xpath if only checking the current element
-
1066
!(native.has_attribute?('hidden') || (native[:style] =~ /display:\s?none/) || %w(script head).include?(tag_name))
-
end
-
end
-
-
##
-
#
-
# Whether or not the element is checked.
-
#
-
# @return [Boolean] Whether the element is checked
-
#
-
1
def checked?
-
native.has_attribute?('checked')
-
end
-
-
##
-
#
-
# Whether or not the element is disabled.
-
#
-
# @return [Boolean] Whether the element is disabled
-
1
def disabled?
-
native.has_attribute?('disabled')
-
end
-
-
##
-
#
-
# Whether or not the element is selected.
-
#
-
# @return [Boolean] Whether the element is selected
-
#
-
1
def selected?
-
native.has_attribute?('selected')
-
end
-
-
1
def synchronize(seconds=nil)
-
yield # simple nodes don't need to wait
-
end
-
-
1
def allow_reload!
-
# no op
-
end
-
-
1
def title
-
if native.respond_to? :title
-
native.title
-
else
-
#old versions of nokogiri don't have #title - remove in 3.0
-
native.xpath('/html/head/title | /html/title').first.text
-
end
-
end
-
-
1
def inspect
-
%(#<Capybara::Node::Simple tag="#{tag_name}" path="#{path}">)
-
end
-
-
# @api private
-
1
def find_css(css)
-
native.css(css)
-
end
-
-
# @api private
-
1
def find_xpath(xpath)
-
native.xpath(xpath)
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
# @api private
-
1
module Queries
-
1
class BaseQuery
-
1
COUNT_KEYS = [:count, :minimum, :maximum, :between]
-
-
1
attr_reader :options
-
-
1
def wait
-
29
if @options.has_key?(:wait)
-
@options[:wait] || 0
-
else
-
29
Capybara.default_max_wait_time
-
end
-
end
-
-
1
private
-
-
1
def assert_valid_keys
-
29
invalid_keys = @options.keys - valid_keys
-
29
unless invalid_keys.empty?
-
invalid_names = invalid_keys.map(&:inspect).join(", ")
-
valid_names = valid_keys.map(&:inspect).join(", ")
-
raise ArgumentError, "invalid keys #{invalid_names}, should be one of #{valid_names}"
-
end
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'addressable/uri'
-
-
1
module Capybara
-
# @api private
-
1
module Queries
-
1
class CurrentPathQuery < BaseQuery
-
1
def initialize(expected_path, options = {})
-
@expected_path = expected_path
-
@options = {
-
url: false,
-
only_path: false }.merge(options)
-
assert_valid_keys
-
end
-
-
1
def resolves_for?(session)
-
@actual_path = if options[:url]
-
session.current_url
-
else
-
if options[:only_path]
-
::Addressable::URI.parse(session.current_url).path
-
else
-
::Addressable::URI.parse(session.current_url).request_uri
-
end
-
end
-
-
if @expected_path.is_a? Regexp
-
@actual_path.match(@expected_path)
-
else
-
::Addressable::URI.parse(@expected_path) == Addressable::URI.parse(@actual_path)
-
end
-
end
-
-
1
def failure_message
-
failure_message_helper
-
end
-
-
1
def negative_failure_message
-
failure_message_helper(' not')
-
end
-
-
1
private
-
-
1
def failure_message_helper(negated = '')
-
verb = (@expected_path.is_a?(Regexp))? 'match' : 'equal'
-
"expected #{@actual_path.inspect}#{negated} to #{verb} #{@expected_path.inspect}"
-
end
-
-
1
def valid_keys
-
[:wait, :url, :only_path]
-
end
-
-
1
def assert_valid_keys
-
super
-
if options[:url] && options[:only_path]
-
raise ArgumentError, "the :url and :only_path options cannot both be true"
-
end
-
end
-
end
-
end
-
end
-
1
module Capybara
-
1
module Queries
-
1
class MatchQuery < Capybara::Queries::SelectorQuery
-
1
VALID_KEYS = [:text, :visible, :exact, :wait]
-
-
1
def visible
-
if options.has_key?(:visible)
-
super
-
else
-
:all
-
end
-
end
-
-
1
private
-
-
1
def valid_keys
-
VALID_KEYS + @selector.custom_filters.keys
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module Queries
-
1
class SelectorQuery < Queries::BaseQuery
-
1
attr_accessor :selector, :locator, :options, :expression, :find, :negative
-
-
1
VALID_KEYS = [:text, :visible, :between, :count, :maximum, :minimum, :exact, :match, :wait]
-
1
VALID_MATCH = [:first, :smart, :prefer_exact, :one]
-
-
1
def initialize(*args)
-
26
@options = if args.last.is_a?(Hash) then args.pop.dup else {} end
-
-
26
if args[0].is_a?(Symbol)
-
26
@selector = Selector.all[args.shift]
-
26
@locator = args.shift
-
else
-
@selector = Selector.all.values.find { |s| s.match?(args[0]) }
-
@locator = args.shift
-
end
-
26
@selector ||= Selector.all[Capybara.default_selector]
-
-
26
warn "Unused parameters passed to #{self.class.name} : #{args.to_s}" unless args.empty?
-
-
# for compatibility with Capybara 2.0
-
26
if Capybara.exact_options and @selector == Selector.all[:option]
-
@options[:exact] = true
-
end
-
-
26
@expression = @selector.call(@locator)
-
26
assert_valid_keys
-
end
-
-
1
def name; selector.name; end
-
24
def label; selector.label or selector.name; end
-
-
1
def description
-
23
@description = String.new("#{label} #{locator.inspect}")
-
23
@description << " with text #{options[:text].inspect}" if options[:text]
-
23
@description << selector.description(options)
-
23
@description
-
end
-
-
1
def matches_filters?(node)
-
3
if options[:text]
-
regexp = options[:text].is_a?(Regexp) ? options[:text] : Regexp.escape(options[:text].to_s)
-
return false if not node.text(visible).match(regexp)
-
end
-
3
case visible
-
3
when :visible then return false unless node.visible?
-
when :hidden then return false if node.visible?
-
end
-
3
selector.custom_filters.each do |name, filter|
-
if options.has_key?(name)
-
return false unless filter.matches?(node, options[name])
-
elsif filter.default?
-
return false unless filter.matches?(node, filter.default)
-
end
-
end
-
end
-
-
1
def visible
-
3
if options.has_key?(:visible)
-
case @options[:visible]
-
when true then :visible
-
when false then :all
-
else @options[:visible]
-
end
-
else
-
3
if Capybara.ignore_hidden_elements
-
3
:visible
-
else
-
:all
-
end
-
end
-
end
-
-
1
def exact?
-
23
if options.has_key?(:exact)
-
@options[:exact]
-
else
-
23
Capybara.exact
-
end
-
end
-
-
1
def match
-
104
if options.has_key?(:match)
-
@options[:match]
-
else
-
104
Capybara.match
-
end
-
end
-
-
1
def xpath(exact=nil)
-
49
exact = self.exact? if exact == nil
-
49
if @expression.respond_to?(:to_xpath) and exact
-
23
@expression.to_xpath(:exact)
-
else
-
26
@expression.to_s
-
end
-
end
-
-
1
def css
-
@expression
-
end
-
-
# @api private
-
1
def resolve_for(node, exact = nil)
-
49
node.synchronize do
-
49
children = if selector.format == :css
-
node.find_css(self.css)
-
else
-
49
node.find_xpath(self.xpath(exact))
-
end.map do |child|
-
3
if node.is_a?(Capybara::Node::Base)
-
3
Capybara::Node::Element.new(node.session, child, node, self)
-
else
-
Capybara::Node::Simple.new(child)
-
end
-
end
-
49
Capybara::Result.new(children, self)
-
end
-
end
-
-
1
private
-
-
1
def valid_keys
-
26
COUNT_KEYS + [:text, :visible, :exact, :match, :wait] + @selector.custom_filters.keys
-
end
-
-
1
def assert_valid_keys
-
26
super
-
26
unless VALID_MATCH.include?(match)
-
raise ArgumentError, "invalid option #{match.inspect} for :match, should be one of #{VALID_MATCH.map(&:inspect).join(", ")}"
-
end
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
# @api private
-
1
module Queries
-
1
class TextQuery < BaseQuery
-
1
def initialize(*args)
-
3
@type = (args.first.is_a?(Symbol) || args.first.nil?) ? args.shift : nil
-
3
@expected_text, @options = args
-
3
unless @expected_text.is_a?(Regexp)
-
2
@expected_text = Capybara::Helpers.normalize_whitespace(@expected_text)
-
end
-
3
@search_regexp = Capybara::Helpers.to_regexp(@expected_text)
-
3
@options ||= {}
-
3
assert_valid_keys
-
end
-
-
1
def resolve_for(node)
-
3
@actual_text = Capybara::Helpers.normalize_whitespace(node.text(@type))
-
3
@count = @actual_text.scan(@search_regexp).size
-
end
-
-
1
def failure_message
-
description =
-
if @expected_text.is_a?(Regexp)
-
"text matching #{@expected_text.inspect}"
-
else
-
"text #{@expected_text.inspect}"
-
end
-
-
message = Capybara::Helpers.failure_message(description, @options)
-
unless (COUNT_KEYS & @options.keys).empty?
-
message << " but found #{@count} #{Capybara::Helpers.declension('time', 'times', @count)}"
-
end
-
message << " in #{@actual_text.inspect}"
-
end
-
-
1
def negative_failure_message
-
failure_message.sub(/(to find)/, 'not \1')
-
end
-
-
1
private
-
-
1
def valid_keys
-
3
COUNT_KEYS + [:wait]
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
# @api private
-
1
module Queries
-
1
class TitleQuery < BaseQuery
-
1
def initialize(expected_title, options = {})
-
@expected_title = expected_title
-
@options = options
-
unless @expected_title.is_a?(Regexp)
-
@expected_title = Capybara::Helpers.normalize_whitespace(@expected_title)
-
end
-
@search_regexp = Capybara::Helpers.to_regexp(@expected_title)
-
assert_valid_keys
-
end
-
-
1
def resolves_for?(node)
-
@actual_title = node.title
-
@actual_title.match(@search_regexp)
-
end
-
-
1
def failure_message
-
failure_message_helper
-
end
-
-
1
def negative_failure_message
-
failure_message_helper(' not')
-
end
-
-
1
private
-
-
1
def failure_message_helper(negated = '')
-
verb = (@expected_title.is_a?(Regexp))? 'match' : 'include'
-
"expected #{@actual_title.inspect}#{negated} to #{verb} #{@expected_title.inspect}"
-
end
-
-
1
def valid_keys
-
[:wait]
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'capybara/queries/selector_query'
-
1
module Capybara
-
# @deprecated This class and its methods are not supposed to be used by users of Capybara's public API.
-
# It may be removed in future versions of Capybara.
-
1
Query = Queries::SelectorQuery
-
end
-
# frozen_string_literal: true
-
1
class Capybara::RackTest::Browser
-
1
include ::Rack::Test::Methods
-
-
1
attr_reader :driver
-
1
attr_accessor :current_host
-
-
1
def initialize(driver)
-
16
@driver = driver
-
end
-
-
1
def app
-
16
driver.app
-
end
-
-
1
def options
-
23
driver.options
-
end
-
-
1
def visit(path, attributes = {})
-
22
reset_host!
-
22
process_and_follow_redirects(:get, path, attributes)
-
end
-
-
1
def submit(method, path, attributes)
-
path = request_path if not path or path.empty?
-
process_and_follow_redirects(method, path, attributes, {'HTTP_REFERER' => current_url})
-
end
-
-
1
def follow(method, path, attributes = {})
-
return if path.gsub(/^#{Regexp.escape(request_path)}/, '').start_with?('#') || path.downcase.start_with?('javascript:')
-
process_and_follow_redirects(method, path, attributes, {'HTTP_REFERER' => current_url})
-
end
-
-
1
def process_and_follow_redirects(method, path, attributes = {}, env = {})
-
22
process(method, path, attributes, env)
-
22
if driver.follow_redirects?
-
22
driver.redirect_limit.times do
-
110
process(:get, last_response["Location"], {}, env) if last_response.redirect?
-
end
-
22
raise Capybara::InfiniteRedirectError, "redirected more than #{driver.redirect_limit} times, check for infinite redirects." if last_response.redirect?
-
end
-
end
-
-
1
def process(method, path, attributes = {}, env = {})
-
23
new_uri = URI.parse(path)
-
23
method.downcase! unless method.is_a? Symbol
-
-
23
new_uri.path = request_path if path.start_with?("?")
-
23
new_uri.path = "/" if new_uri.path.empty?
-
23
new_uri.path = request_path.sub(%r(/[^/]*$), '/') + new_uri.path unless new_uri.path.start_with?('/')
-
23
new_uri.scheme ||= @current_scheme
-
23
new_uri.host ||= @current_host
-
23
new_uri.port ||= @current_port unless new_uri.default_port == @current_port
-
-
23
@current_scheme = new_uri.scheme
-
23
@current_host = new_uri.host
-
23
@current_port = new_uri.port
-
-
23
reset_cache!
-
23
send(method, new_uri.to_s, attributes, env.merge(options[:headers] || {}))
-
end
-
-
1
def current_url
-
last_request.url
-
rescue Rack::Test::Error
-
""
-
end
-
-
1
def reset_host!
-
22
uri = URI.parse(Capybara.app_host || Capybara.default_host)
-
22
@current_scheme = uri.scheme
-
22
@current_host = uri.host
-
22
@current_port = uri.port
-
end
-
-
1
def reset_cache!
-
23
@dom = nil
-
end
-
-
1
def dom
-
49
@dom ||= Capybara::HTML(html)
-
end
-
-
1
def find(format, selector)
-
if format==:css
-
dom.css(selector, Capybara::RackTest::CSSHandlers.new)
-
else
-
49
dom.xpath(selector)
-
52
end.map { |node| Capybara::RackTest::Node.new(self, node) }
-
end
-
-
1
def html
-
21
last_response.body
-
rescue Rack::Test::Error
-
""
-
end
-
-
1
def title
-
if dom.respond_to? :title
-
dom.title
-
else
-
#old versions of nokogiri don't have #title - remove in 3.0
-
dom.xpath('/html/head/title | /html/title').first.text
-
end
-
end
-
-
1
protected
-
-
1
def build_rack_mock_session
-
16
reset_host! unless current_host
-
16
Rack::MockSession.new(app, current_host)
-
end
-
-
1
def request_path
-
last_request.path
-
rescue Rack::Test::Error
-
"/"
-
end
-
end
-
# frozen_string_literal: true
-
1
class Capybara::RackTest::CSSHandlers < BasicObject
-
1
include ::Kernel
-
-
1
def disabled list
-
list.find_all { |node| node.has_attribute? 'disabled' }
-
end
-
1
def enabled list
-
list.find_all { |node| !node.has_attribute? 'disabled' }
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'rack/test'
-
1
require 'rack/utils'
-
1
require 'mime/types'
-
1
require 'nokogiri'
-
1
require 'cgi'
-
-
1
class Capybara::RackTest::Driver < Capybara::Driver::Base
-
1
DEFAULT_OPTIONS = {
-
:respect_data_method => false,
-
:follow_redirects => true,
-
:redirect_limit => 5
-
}
-
1
attr_reader :app, :options
-
-
1
def initialize(app, options={})
-
1
raise ArgumentError, "rack-test requires a rack application, but none was given" unless app
-
1
@app = app
-
1
@options = DEFAULT_OPTIONS.merge(options)
-
end
-
-
1
def browser
-
71
@browser ||= Capybara::RackTest::Browser.new(self)
-
end
-
-
1
def follow_redirects?
-
22
@options[:follow_redirects]
-
end
-
-
1
def redirect_limit
-
22
@options[:redirect_limit]
-
end
-
-
1
def response
-
browser.last_response
-
end
-
-
1
def request
-
browser.last_request
-
end
-
-
1
def visit(path, attributes = {})
-
22
browser.visit(path, attributes)
-
end
-
-
1
def submit(method, path, attributes)
-
browser.submit(method, path, attributes)
-
end
-
-
1
def follow(method, path, attributes = {})
-
browser.follow(method, path, attributes)
-
end
-
-
1
def current_url
-
browser.current_url
-
end
-
-
1
def response_headers
-
response.headers
-
end
-
-
1
def status_code
-
response.status
-
end
-
-
1
def find_xpath(selector)
-
49
browser.find(:xpath, selector)
-
end
-
-
1
def find_css(selector)
-
browser.find(:css,selector)
-
end
-
-
1
def html
-
browser.html
-
end
-
-
1
def dom
-
browser.dom
-
end
-
-
1
def title
-
browser.title
-
end
-
-
1
def reset!
-
16
@browser = nil
-
end
-
-
# @deprecated This method is being removed
-
1
def browser_initialized?
-
super && !@browser.nil?
-
end
-
-
1
def get(*args, &block); browser.get(*args, &block); end
-
1
def post(*args, &block); browser.post(*args, &block); end
-
1
def put(*args, &block); browser.put(*args, &block); end
-
1
def delete(*args, &block); browser.delete(*args, &block); end
-
1
def header(key, value); browser.header(key, value); end
-
end
-
# frozen_string_literal: true
-
1
class Capybara::RackTest::Form < Capybara::RackTest::Node
-
# This only needs to inherit from Rack::Test::UploadedFile because Rack::Test checks for
-
# the class specifically when determining whether to construct the request as multipart.
-
# That check should be based solely on the form element's 'enctype' attribute value,
-
# which should probably be provided to Rack::Test in its non-GET request methods.
-
1
class NilUploadedFile < Rack::Test::UploadedFile
-
1
def initialize
-
@empty_file = Tempfile.new("nil_uploaded_file")
-
@empty_file.close
-
end
-
-
1
def original_filename; ""; end
-
1
def content_type; "application/octet-stream"; end
-
1
def path; @empty_file.path; end
-
end
-
-
1
def params(button)
-
params = make_params
-
-
form_element_types=[:input, :select, :textarea]
-
form_elements_xpath=XPath.generate do |x|
-
xpath=x.descendant(*form_element_types).where(~x.attr(:form))
-
xpath=xpath.union(x.anywhere(*form_element_types).where(x.attr(:form) == native[:id])) if native[:id]
-
xpath.where(~x.attr(:disabled))
-
end.to_s
-
-
native.xpath(form_elements_xpath).map do |field|
-
case field.name
-
when 'input'
-
if %w(radio checkbox).include? field['type']
-
if field['checked']
-
node=Capybara::RackTest::Node.new(self.driver, field)
-
merge_param!(params, field['name'].to_s, node.value.to_s)
-
end
-
elsif %w(submit image).include? field['type']
-
# TO DO identify the click button here (in document order, rather
-
# than leaving until the end of the params)
-
elsif field['type'] =='file'
-
if multipart?
-
file = \
-
if (value = field['value']).to_s.empty?
-
NilUploadedFile.new
-
else
-
content_type = MIME::Types.type_for(value).first.to_s
-
Rack::Test::UploadedFile.new(value, content_type)
-
end
-
merge_param!(params, field['name'].to_s, file)
-
else
-
merge_param!(params, field['name'].to_s, File.basename(field['value'].to_s))
-
end
-
else
-
merge_param!(params, field['name'].to_s, field['value'].to_s)
-
end
-
when 'select'
-
if field['multiple'] == 'multiple'
-
options = field.xpath(".//option[@selected]")
-
options.each do |option|
-
merge_param!(params, field['name'].to_s, (option['value'] || option.text).to_s)
-
end
-
else
-
option = field.xpath(".//option[@selected]").first
-
option ||= field.xpath('.//option').first
-
merge_param!(params, field['name'].to_s, (option['value'] || option.text).to_s) if option
-
end
-
when 'textarea'
-
merge_param!(params, field['name'].to_s, field.text.to_s.gsub(/\n/, "\r\n"))
-
end
-
end
-
merge_param!(params, button[:name], button[:value] || "") if button[:name]
-
-
params.to_params_hash
-
end
-
-
1
def submit(button)
-
action = (button && button['formaction']) || native['action']
-
method = (button && button['formmethod']) || request_method
-
driver.submit(method, action.to_s, params(button))
-
end
-
-
1
def multipart?
-
self[:enctype] == "multipart/form-data"
-
end
-
-
1
private
-
-
1
class ParamsHash < Hash
-
1
def to_params_hash
-
self
-
end
-
end
-
-
1
def request_method
-
self[:method] =~ /post/i ? :post : :get
-
end
-
-
1
def merge_param!(params, key, value)
-
if Rack::Utils.respond_to?(:default_query_parser)
-
Rack::Utils.default_query_parser.normalize_params(params, key, value, Rack::Utils.param_depth_limit)
-
else
-
Rack::Utils.normalize_params(params, key, value)
-
end
-
end
-
-
1
def make_params
-
if Rack::Utils.respond_to?(:default_query_parser)
-
Rack::Utils.default_query_parser.make_params
-
else
-
ParamsHash.new
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
class Capybara::RackTest::Node < Capybara::Driver::Node
-
1
def all_text
-
Capybara::Helpers.normalize_whitespace(native.text)
-
end
-
-
1
def visible_text
-
3
Capybara::Helpers.normalize_whitespace(unnormalized_text)
-
end
-
-
1
def [](name)
-
string_node[name]
-
end
-
-
1
def value
-
string_node.value
-
end
-
-
1
def set(value)
-
if (Array === value) && !self[:multiple]
-
raise ArgumentError.new "Value cannot be an Array when 'multiple' attribute is not present. Not a #{value.class}"
-
end
-
-
if radio?
-
set_radio(value)
-
elsif checkbox?
-
set_checkbox(value)
-
elsif input_field?
-
set_input(value)
-
elsif textarea?
-
if self[:readonly]
-
warn "Attempt to set readonly element with value: #{value} \n * This will raise an exception in a future version of Capybara"
-
else
-
native.content = value.to_s
-
end
-
end
-
end
-
-
1
def select_option
-
return if disabled?
-
if select_node['multiple'] != 'multiple'
-
select_node.find_xpath(".//option[@selected]").each { |node| node.native.remove_attribute("selected") }
-
end
-
native["selected"] = 'selected'
-
end
-
-
1
def unselect_option
-
if select_node['multiple'] != 'multiple'
-
raise Capybara::UnselectNotAllowed, "Cannot unselect option from single select box."
-
end
-
native.remove_attribute('selected')
-
end
-
-
1
def click
-
if tag_name == 'a' && !self[:href].nil?
-
method = self["data-method"] if driver.options[:respect_data_method]
-
method ||= :get
-
driver.follow(method, self[:href].to_s)
-
elsif (tag_name == 'input' and %w(submit image).include?(type)) or
-
((tag_name == 'button') and type.nil? or type == "submit")
-
associated_form = form
-
Capybara::RackTest::Form.new(driver, associated_form).submit(self) if associated_form
-
end
-
end
-
-
1
def tag_name
-
native.node_name
-
end
-
-
1
def visible?
-
3
string_node.visible?
-
end
-
-
1
def checked?
-
string_node.checked?
-
end
-
-
1
def selected?
-
string_node.selected?
-
end
-
-
1
def disabled?
-
if %w(option optgroup).include? tag_name
-
string_node.disabled? || find_xpath("parent::*")[0].disabled?
-
else
-
string_node.disabled?
-
end
-
end
-
-
1
def path
-
native.path
-
end
-
-
1
def find_xpath(locator)
-
native.xpath(locator).map { |n| self.class.new(driver, n) }
-
end
-
-
1
def find_css(locator)
-
native.css(locator, Capybara::RackTest::CSSHandlers.new).map { |n| self.class.new(driver, n) }
-
end
-
-
1
def ==(other)
-
native == other.native
-
end
-
-
1
protected
-
-
1
def unnormalized_text(check_ancestor_visibility = true)
-
1071
if !string_node.visible?(check_ancestor_visibility)
-
9
''
-
1062
elsif native.text?
-
662
native.text
-
400
elsif native.element?
-
native.children.map do |child|
-
1068
Capybara::RackTest::Node.new(driver, child).unnormalized_text(false)
-
399
end.join
-
else
-
1
''
-
end
-
end
-
-
1
private
-
-
1
def string_node
-
1074
@string_node ||= Capybara::Node::Simple.new(native)
-
end
-
-
# a reference to the select node if this is an option node
-
1
def select_node
-
find_xpath('./ancestor::select').first
-
end
-
-
1
def type
-
native[:type]
-
end
-
-
1
def form
-
if native[:form]
-
native.xpath("//form[@id='#{native[:form]}']").first
-
else
-
native.ancestors('form').first
-
end
-
end
-
-
1
def set_radio(value)
-
other_radios_xpath = XPath.generate { |x| x.anywhere(:input)[x.attr(:name).equals(self[:name])] }.to_s
-
driver.dom.xpath(other_radios_xpath).each { |node| node.remove_attribute("checked") }
-
native['checked'] = 'checked'
-
end
-
-
1
def set_checkbox(value)
-
if value && !native['checked']
-
native['checked'] = 'checked'
-
elsif !value && native['checked']
-
native.remove_attribute('checked')
-
end
-
end
-
-
1
def set_input(value)
-
if text_or_password? && attribute_is_not_blank?(:maxlength)
-
# Browser behavior for maxlength="0" is inconsistent, so we stick with
-
# Firefox, allowing no input
-
value = value.to_s[0...self[:maxlength].to_i]
-
end
-
if Array === value #Assert multiple attribute is present
-
value.each do |v|
-
new_native = native.clone
-
new_native.remove_attribute('value')
-
native.add_next_sibling(new_native)
-
new_native['value'] = v.to_s
-
end
-
native.remove
-
else
-
if self[:readonly]
-
warn "Attempt to set readonly element with value: #{value} \n *This will raise an exception in a future version of Capybara"
-
else
-
native['value'] = value.to_s
-
end
-
end
-
end
-
-
1
def attribute_is_not_blank?(attribute)
-
self[attribute] && !self[attribute].empty?
-
end
-
-
1
def checkbox?
-
input_field? && type == 'checkbox'
-
end
-
-
1
def input_field?
-
tag_name == 'input'
-
end
-
-
1
def radio?
-
input_field? && type == 'radio'
-
end
-
-
1
def textarea?
-
tag_name == "textarea"
-
end
-
-
1
def text_or_password?
-
input_field? && (type == 'text' || type == 'password')
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'capybara/dsl'
-
-
1
Capybara.app = Rack::Builder.new do
-
1
map "/" do
-
1
if Gem::Version.new(Rails.version) >= Gem::Version.new("3.0")
-
1
run Rails.application
-
else # Rails 2
-
use Rails::Rack::Static
-
run ActionController::Dispatcher.new
-
end
-
end
-
end.to_app
-
-
1
Capybara.save_path = Rails.root.join('tmp/capybara')
-
-
# Override default rack_test driver to respect data-method attributes.
-
1
Capybara.register_driver :rack_test do |app|
-
1
Capybara::RackTest::Driver.new(app, :respect_data_method => true)
-
end
-
# frozen_string_literal: true
-
1
require 'forwardable'
-
-
1
module Capybara
-
-
##
-
# A {Capybara::Result} represents a collection of {Capybara::Node::Element} on the page. It is possible to interact with this
-
# collection similar to an Array because it implements Enumerable and offers the following Array methods through delegation:
-
#
-
# * []
-
# * each()
-
# * at()
-
# * size()
-
# * count()
-
# * length()
-
# * first()
-
# * last()
-
# * empty?()
-
#
-
# @see Capybara::Node::Element
-
#
-
1
class Result
-
1
include Enumerable
-
1
extend Forwardable
-
-
1
def initialize(elements, query)
-
49
@elements = elements
-
52
@result = elements.select { |node| query.matches_filters?(node) }
-
49
@rest = @elements - @result
-
49
@query = query
-
end
-
-
1
def_delegators :@result, :each, :[], :at, :size, :count, :length,
-
:first, :last, :values_at, :empty?, :inspect, :sample, :index
-
-
1
def matches_count?
-
Capybara::Helpers.matches_count?(@result.size, @query.options)
-
end
-
-
1
def failure_message
-
message = Capybara::Helpers.failure_message(@query.description, @query.options)
-
if count > 0
-
message << ", found #{count} #{Capybara::Helpers.declension("match", "matches", count)}: " << @result.map(&:text).map(&:inspect).join(", ")
-
else
-
message << " but there were no matches"
-
end
-
unless @rest.empty?
-
elements = @rest.map(&:text).map(&:inspect).join(", ")
-
message << ". Also found " << elements << ", which matched the selector but not all filters."
-
end
-
message
-
end
-
-
1
def negative_failure_message
-
failure_message.sub(/(to find)/, 'not \1')
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'capybara/selector/filter'
-
-
1
module Capybara
-
1
class Selector
-
-
1
attr_reader :name, :custom_filters, :format
-
-
1
class << self
-
1
def all
-
42
@selectors ||= {}
-
end
-
-
1
def add(name, &block)
-
16
all[name.to_sym] = Capybara::Selector.new(name.to_sym, &block)
-
end
-
-
1
def update(name, &block)
-
all[name.to_sym].instance_eval(&block)
-
end
-
-
1
def remove(name)
-
all.delete(name.to_sym)
-
end
-
end
-
-
1
def initialize(name, &block)
-
16
@name = name
-
16
@custom_filters = {}
-
16
@match = nil
-
16
@label = nil
-
16
@failure_message = nil
-
16
@description = nil
-
16
@format = nil
-
16
@expression = nil
-
16
instance_eval(&block)
-
end
-
-
1
def xpath(&block)
-
15
@format, @expression = :xpath, block if block
-
15
format == :xpath ? @expression : nil
-
end
-
-
1
def css(&block)
-
1
@format, @expression = :css, block if block
-
1
format == :css ? @expression : nil
-
end
-
-
1
def match(&block)
-
@match = block if block
-
@match
-
end
-
-
1
def label(label=nil)
-
29
@label = label if label
-
29
@label
-
end
-
-
1
def description(options={})
-
23
(@description && @description.call(options)).to_s
-
end
-
-
1
def call(locator)
-
26
if format
-
26
@expression.call(locator)
-
else
-
warn "Selector has no format"
-
end
-
end
-
-
1
def match?(locator)
-
@match and @match.call(locator)
-
end
-
-
1
def filter(name, options={}, &block)
-
30
@custom_filters[name] = Filter.new(name, block, options)
-
end
-
-
1
def describe &block
-
10
@description = block
-
end
-
-
1
private
-
-
1
def locate_field(xpath, locator)
-
18
locate_field = xpath[XPath.attr(:id).equals(locator) |
-
XPath.attr(:name).equals(locator) |
-
XPath.attr(:placeholder).equals(locator) |
-
XPath.attr(:id).equals(XPath.anywhere(:label)[XPath.string.n.is(locator)].attr(:for))]
-
18
locate_field += XPath.descendant(:label)[XPath.string.n.is(locator)].descendant(xpath)
-
18
locate_field
-
end
-
end
-
end
-
-
1
Capybara.add_selector(:xpath) do
-
4
xpath { |xpath| xpath }
-
end
-
-
1
Capybara.add_selector(:css) do
-
1
css { |css| css }
-
end
-
-
1
Capybara.add_selector(:id) do
-
1
xpath { |id| XPath.descendant[XPath.attr(:id) == id.to_s] }
-
end
-
-
1
Capybara.add_selector(:field) do
-
1
xpath do |locator|
-
xpath = XPath.descendant(:input, :textarea, :select)[~XPath.attr(:type).one_of('submit', 'image', 'hidden')]
-
xpath = locate_field(xpath, locator.to_s) unless locator.nil?
-
xpath
-
end
-
1
filter(:checked, boolean: true) { |node, value| not(value ^ node.checked?) }
-
1
filter(:unchecked, boolean: true) { |node, value| (value ^ node.checked?) }
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
1
filter(:readonly, boolean: true) { |node, value| not(value ^ node[:readonly]) }
-
1
filter(:with) { |node, with| node.value == with.to_s }
-
1
filter(:type) do |node, type|
-
if ['textarea', 'select'].include?(type)
-
node.tag_name == type
-
else
-
node[:type] == type
-
end
-
end
-
1
filter(:multiple, boolean: true) { |node, value| !(value ^ node[:multiple]) }
-
1
describe do |options|
-
desc, states = String.new, []
-
desc << " of type #{options[:type].inspect}" if options[:type]
-
desc << " with value #{options[:with].to_s.inspect}" if options.has_key?(:with)
-
states << 'checked' if options[:checked] || (options.has_key?(:unchecked) && !options[:unchecked])
-
states << 'not checked' if options[:unchecked] || (options.has_key?(:checked) && !options[:checked])
-
states << 'disabled' if options[:disabled] == true
-
desc << " that is #{states.join(' and ')}" unless states.empty?
-
desc << " with the multiple attribute" if options[:multiple] == true
-
desc << " without the multiple attribute" if options[:multiple] === false
-
desc
-
end
-
end
-
-
1
Capybara.add_selector(:fieldset) do
-
1
xpath do |locator|
-
xpath = XPath.descendant(:fieldset)
-
xpath = xpath[XPath.attr(:id).equals(locator.to_s) | XPath.child(:legend)[XPath.string.n.is(locator.to_s)]] unless locator.nil?
-
xpath
-
end
-
end
-
-
1
Capybara.add_selector(:link) do
-
1
xpath do |locator|
-
5
xpath = XPath.descendant(:a)[XPath.attr(:href)]
-
5
unless locator.nil?
-
5
locator = locator.to_s
-
5
xpath = xpath[XPath.attr(:id).equals(locator) |
-
XPath.string.n.is(locator) |
-
XPath.attr(:title).is(locator) |
-
XPath.descendant(:img)[XPath.attr(:alt).is(locator)]]
-
end
-
5
xpath
-
end
-
-
1
filter(:href) do |node, href|
-
if href.is_a? Regexp
-
node[:href].match href
-
else
-
node.first(:xpath, XPath.axis(:self)[XPath.attr(:href).equals(href.to_s)], minimum: 0)
-
end
-
end
-
-
6
describe { |options| " with href #{options[:href].inspect}" if options[:href] }
-
end
-
-
1
Capybara.add_selector(:button) do
-
1
xpath do |locator|
-
input_btn_xpath = XPath.descendant(:input)[XPath.attr(:type).one_of('submit', 'reset', 'image', 'button')]
-
btn_xpath = XPath.descendant(:button)
-
image_btn_xpath = XPath.descendant(:input)[XPath.attr(:type).equals('image')]
-
-
unless locator.nil?
-
locator = locator.to_s
-
input_btn_xpath = input_btn_xpath[XPath.attr(:id).equals(locator) | XPath.attr(:value).is(locator) | XPath.attr(:title).is(locator)]
-
btn_xpath = btn_xpath[XPath.attr(:id).equals(locator) | XPath.attr(:value).is(locator) | XPath.string.n.is(locator) | XPath.attr(:title).is(locator)]
-
image_btn_xpath = image_btn_xpath[XPath.attr(:alt).is(locator)]
-
end
-
-
input_btn_xpath + btn_xpath + image_btn_xpath
-
end
-
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
-
1
describe { |options| " that is disabled" if options[:disabled] == true }
-
end
-
-
1
Capybara.add_selector(:link_or_button) do
-
1
label "link or button"
-
1
xpath do |locator|
-
self.class.all.values_at(:link, :button).map {|selector| selector.xpath.call(locator)}.reduce(:+)
-
end
-
-
1
filter(:disabled, default: false, boolean: true) { |node, value| node.tag_name == "a" or not(value ^ node.disabled?) }
-
-
1
describe { |options| " that is disabled" if options[:disabled] }
-
end
-
-
1
Capybara.add_selector(:fillable_field) do
-
1
label "field"
-
1
xpath do |locator|
-
18
xpath = XPath.descendant(:input, :textarea)[~XPath.attr(:type).one_of('submit', 'image', 'radio', 'checkbox', 'hidden', 'file')]
-
18
xpath = locate_field(xpath, locator.to_s) unless locator.nil?
-
18
xpath
-
end
-
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
1
filter(:multiple, boolean: true) { |node, value| !(value ^ node[:multiple]) }
-
-
1
describe do |options|
-
18
desc = String.new
-
18
desc << " that is disabled" if options[:disabled] == true
-
18
desc << " with the multiple attribute" if options[:multiple] == true
-
18
desc << " without the multiple attribute" if options[:multiple] === false
-
18
desc
-
end
-
end
-
-
1
Capybara.add_selector(:radio_button) do
-
1
label "radio button"
-
1
xpath do |locator|
-
xpath = XPath.descendant(:input)[XPath.attr(:type).equals('radio')]
-
xpath = locate_field(xpath, locator.to_s) unless locator.nil?
-
xpath
-
end
-
-
1
filter(:checked, boolean: true) { |node, value| not(value ^ node.checked?) }
-
1
filter(:unchecked, boolean: true) { |node, value| (value ^ node.checked?) }
-
1
filter(:option) { |node, value| node.value == value.to_s }
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
-
1
describe do |options|
-
desc, states = String.new, []
-
desc << " with value #{options[:option].inspect}" if options[:option]
-
states << 'checked' if options[:checked] || (options.has_key?(:unchecked) && !options[:unchecked])
-
states << 'not checked' if options[:unchecked] || (options.has_key?(:checked) && !options[:checked])
-
states << 'disabled' if options[:disabled] == true
-
desc << " that is #{states.join(' and ')}" unless states.empty?
-
desc
-
end
-
end
-
-
1
Capybara.add_selector(:checkbox) do
-
1
xpath do |locator|
-
xpath = XPath.descendant(:input)[XPath.attr(:type).equals('checkbox')]
-
xpath = locate_field(xpath, locator.to_s) unless locator.nil?
-
xpath
-
end
-
-
1
filter(:checked, boolean: true) { |node, value| not(value ^ node.checked?) }
-
1
filter(:unchecked, boolean: true) { |node, value| (value ^ node.checked?) }
-
1
filter(:option) { |node, value| node.value == value.to_s }
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
-
1
describe do |options|
-
desc, states = String.new, []
-
desc << " with value #{options[:option].inspect}" if options[:option]
-
states << 'checked' if options[:checked] || (options.has_key?(:unchecked) && !options[:unchecked])
-
states << 'not checked' if options[:unchecked] || (options.has_key?(:checked) && !options[:checked])
-
states << 'disabled' if options[:disabled] == true
-
desc << " that is #{states.join(' and ')}" unless states.empty?
-
desc
-
end
-
end
-
-
1
Capybara.add_selector(:select) do
-
1
label "select box"
-
1
xpath do |locator|
-
xpath = XPath.descendant(:select)
-
xpath = locate_field(xpath, locator.to_s) unless locator.nil?
-
xpath
-
end
-
-
1
filter(:options) do |node, options|
-
if node.visible?
-
actual = node.all(:xpath, './/option').map { |option| option.text }
-
else
-
actual = node.all(:xpath, './/option', visible: false).map { |option| option.text(:all) }
-
end
-
options.sort == actual.sort
-
end
-
1
filter(:with_options) do |node, options|
-
finder_settings = { minimum: 0 }
-
if !node.visible?
-
finder_settings[:visible] = false
-
end
-
options.all? { |option| node.first(:option, option, finder_settings) }
-
end
-
1
filter(:selected) do |node, selected|
-
actual = node.all(:xpath, './/option', visible: false).select { |option| option.selected? }.map { |option| option.text(:all) }
-
[selected].flatten.sort == actual.sort
-
end
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
1
filter(:multiple, boolean: true) { |node, value| !(value ^ node[:multiple]) }
-
-
1
describe do |options|
-
desc = String.new
-
desc << " with options #{options[:options].inspect}" if options[:options]
-
desc << " with at least options #{options[:with_options].inspect}" if options[:with_options]
-
desc << " with #{options[:selected].inspect} selected" if options[:selected]
-
desc << " that is disabled" if options[:disabled] == true
-
desc << " that allows multiple selection" if options[:multiple] == true
-
desc << " that only allows single selection" if options[:multiple] === false
-
desc
-
end
-
end
-
-
1
Capybara.add_selector(:option) do
-
1
xpath do |locator|
-
xpath = XPath.descendant(:option)
-
xpath = xpath[XPath.string.n.is(locator.to_s)] unless locator.nil?
-
xpath
-
end
-
-
1
filter(:disabled, boolean: true) { |node, value| not(value ^ node.disabled?) }
-
1
filter(:selected, boolean: true) { |node, value| not(value ^ node.selected?) }
-
-
1
describe do |options|
-
desc = String.new
-
desc << " that is#{' not' unless options[:disabled]} disabled" if options.has_key?(:disabled)
-
desc << " that is#{' not' unless options[:selected]} selected" if options.has_key?(:selected)
-
desc
-
end
-
end
-
-
1
Capybara.add_selector(:file_field) do
-
1
label "file field"
-
1
xpath do |locator|
-
xpath = XPath.descendant(:input)[XPath.attr(:type).equals('file')]
-
xpath = locate_field(xpath, locator.to_s) unless locator.nil?
-
xpath
-
end
-
-
1
filter(:disabled, default: false, boolean: true, skip_if: :all) { |node, value| not(value ^ node.disabled?) }
-
1
filter(:multiple, boolean: true) { |node, value| !(value ^ node[:multiple]) }
-
-
1
describe do |options|
-
desc = String.new
-
desc << " that is disabled" if options[:disabled] == true
-
desc << " that allows multiple files" if options[:multiple] == true
-
desc << " that only allows a single file" if options[:multiple] === false
-
desc
-
end
-
end
-
-
1
Capybara.add_selector(:label) do
-
1
label "label"
-
1
xpath do |locator|
-
xpath = XPath.descendant(:label)
-
xpath = xpath[XPath.string.n.is(locator.to_s) | XPath.attr(:id).equals(locator.to_s)] unless locator.nil?
-
xpath
-
end
-
-
1
filter(:for) do |node, field_or_value|
-
if field_or_value.is_a? Capybara::Node::Element
-
if field_or_value[:id] && (field_or_value[:id] == node[:for])
-
true
-
else
-
field_or_value.find_xpath('./ancestor::label[1]').include? node.base
-
end
-
else
-
node[:for] == field_or_value.to_s
-
end
-
end
-
end
-
-
1
Capybara.add_selector(:table) do
-
1
xpath do |locator|
-
xpath = XPath.descendant(:table)
-
xpath = xpath[XPath.attr(:id).equals(locator.to_s) | XPath.descendant(:caption).is(locator.to_s)] unless locator.nil?
-
xpath
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
class Selector
-
1
class Filter
-
1
def initialize(name, block, options={})
-
30
@name = name
-
30
@block = block
-
30
@options = options
-
30
@options[:valid_values] = [true,false] if options[:boolean]
-
end
-
-
1
def default?
-
@options.has_key?(:default)
-
end
-
-
1
def default
-
@options[:default]
-
end
-
-
1
def matches?(node, value)
-
return true if skip?(value)
-
-
if !valid_value?(value)
-
msg = "Invalid value #{value.inspect} passed to filter #{@name} - "
-
if default?
-
warn msg + "defaulting to #{default}"
-
value = default
-
else
-
warn msg + "skipping"
-
return true
-
end
-
end
-
-
@block.call(node, value)
-
end
-
-
1
def skip?(value)
-
@options.has_key?(:skip_if) && value == @options[:skip_if]
-
end
-
-
1
private
-
-
1
def valid_value?(value)
-
!@options.has_key?(:valid_values) || Array(@options[:valid_values]).include?(value)
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
require "uri"
-
-
1
class Capybara::Selenium::Driver < Capybara::Driver::Base
-
1
DEFAULT_OPTIONS = {
-
:browser => :firefox
-
}
-
1
SPECIAL_OPTIONS = [:browser]
-
-
1
attr_reader :app, :options
-
-
1
def browser
-
unless @browser
-
@browser = Selenium::WebDriver.for(options[:browser], options.reject { |key,val| SPECIAL_OPTIONS.include?(key) })
-
-
main = Process.pid
-
at_exit do
-
# Store the exit status of the test run since it goes away after calling the at_exit proc...
-
@exit_status = $!.status if $!.is_a?(SystemExit)
-
quit if Process.pid == main
-
exit @exit_status if @exit_status # Force exit with stored status
-
end
-
end
-
@browser
-
end
-
-
1
def initialize(app, options={})
-
begin
-
require 'selenium-webdriver'
-
rescue LoadError => e
-
if e.message =~ /selenium-webdriver/
-
raise LoadError, "Capybara's selenium driver is unable to load `selenium-webdriver`, please install the gem and add `gem 'selenium-webdriver'` to your Gemfile if you are using bundler."
-
else
-
raise e
-
end
-
end
-
-
@app = app
-
@browser = nil
-
@exit_status = nil
-
@frame_handles = {}
-
@options = DEFAULT_OPTIONS.merge(options)
-
end
-
-
1
def visit(path)
-
browser.navigate.to(path)
-
end
-
-
1
def go_back
-
browser.navigate.back
-
end
-
-
1
def go_forward
-
browser.navigate.forward
-
end
-
-
1
def html
-
browser.page_source
-
end
-
-
1
def title
-
browser.title
-
end
-
-
1
def current_url
-
browser.current_url
-
end
-
-
1
def find_xpath(selector)
-
browser.find_elements(:xpath, selector).map { |node| Capybara::Selenium::Node.new(self, node) }
-
end
-
-
1
def find_css(selector)
-
browser.find_elements(:css, selector).map { |node| Capybara::Selenium::Node.new(self, node) }
-
end
-
-
1
def wait?; true; end
-
1
def needs_server?; true; end
-
-
1
def execute_script(script)
-
browser.execute_script script
-
end
-
-
1
def evaluate_script(script)
-
browser.execute_script "return #{script}"
-
end
-
-
1
def save_screenshot(path, options={})
-
browser.save_screenshot(path)
-
end
-
-
1
def reset!
-
# Use instance variable directly so we avoid starting the browser just to reset the session
-
if @browser
-
navigated = false
-
start_time = Capybara::Helpers.monotonic_time
-
begin
-
if !navigated
-
# Only trigger a navigation if we haven't done it already, otherwise it
-
# can trigger an endless series of unload modals
-
begin
-
@browser.manage.delete_all_cookies
-
rescue Selenium::WebDriver::Error::UnhandledError
-
# delete_all_cookies fails when we've previously gone
-
# to about:blank, so we rescue this error and do nothing
-
# instead.
-
end
-
@browser.navigate.to("about:blank")
-
end
-
navigated = true
-
-
#Ensure the page is empty and trigger an UnhandledAlertError for any modals that appear during unload
-
until find_xpath("/html/body/*").empty? do
-
raise Capybara::ExpectationNotMet.new('Timed out waiting for Selenium session reset') if (Capybara::Helpers.monotonic_time - start_time) >= 10
-
sleep 0.05
-
end
-
rescue Selenium::WebDriver::Error::UnhandledAlertError
-
# This error is thrown if an unhandled alert is on the page
-
# Firefox appears to automatically dismiss this alert, chrome does not
-
# We'll try to accept it
-
begin
-
@browser.switch_to.alert.accept
-
sleep 0.25 # allow time for the modal to be handled
-
rescue Selenium::WebDriver::Error::NoAlertPresentError
-
# The alert is now gone - nothing to do
-
end
-
# try cleaning up the browser again
-
retry
-
end
-
end
-
end
-
-
##
-
#
-
# Webdriver supports frame name, id, index(zero-based) or {Capybara::Node::Element} to find iframe
-
#
-
# @overload within_frame(index)
-
# @param [Integer] index index of a frame
-
# @overload within_frame(name_or_id)
-
# @param [String] name_or_id name or id of a frame
-
# @overload within_frame(element)
-
# @param [Capybara::Node::Base] a_node frame element
-
#
-
1
def within_frame(frame_handle)
-
frame_handle = frame_handle.native if frame_handle.is_a?(Capybara::Node::Base)
-
@frame_handles[browser.window_handle] ||= []
-
@frame_handles[browser.window_handle] << frame_handle
-
browser.switch_to.frame(frame_handle)
-
yield
-
ensure
-
# would love to use browser.switch_to.parent_frame here
-
# but it has an issue if the current frame is removed from within it
-
@frame_handles[browser.window_handle].pop
-
browser.switch_to.default_content
-
@frame_handles[browser.window_handle].each { |fh| browser.switch_to.frame(fh) }
-
end
-
-
1
def current_window_handle
-
browser.window_handle
-
end
-
-
1
def window_size(handle)
-
within_given_window(handle) do
-
size = browser.manage.window.size
-
[size.width, size.height]
-
end
-
end
-
-
1
def resize_window_to(handle, width, height)
-
within_given_window(handle) do
-
browser.manage.window.resize_to(width, height)
-
end
-
end
-
-
1
def maximize_window(handle)
-
within_given_window(handle) do
-
browser.manage.window.maximize
-
end
-
sleep 0.1 # work around for https://code.google.com/p/selenium/issues/detail?id=7405
-
end
-
-
1
def close_window(handle)
-
within_given_window(handle) do
-
browser.close
-
end
-
end
-
-
1
def window_handles
-
browser.window_handles
-
end
-
-
1
def open_new_window
-
browser.execute_script('window.open();')
-
end
-
-
1
def switch_to_window(handle)
-
browser.switch_to.window handle
-
end
-
-
# @api private
-
1
def find_window(locator)
-
handles = browser.window_handles
-
return locator if handles.include? locator
-
-
original_handle = browser.window_handle
-
handles.each do |handle|
-
switch_to_window(handle)
-
if (locator == browser.execute_script("return window.name") ||
-
browser.title.include?(locator) ||
-
browser.current_url.include?(locator))
-
switch_to_window(original_handle)
-
return handle
-
end
-
end
-
raise Capybara::ElementNotFound, "Could not find a window identified by #{locator}"
-
end
-
-
1
def within_window(locator)
-
handle = find_window(locator)
-
browser.switch_to.window(handle) { yield }
-
end
-
-
1
def accept_modal(type, options={}, &blk)
-
yield if block_given?
-
modal = find_modal(options)
-
modal.send_keys options[:with] if options[:with]
-
message = modal.text
-
modal.accept
-
message
-
end
-
-
1
def dismiss_modal(type, options={}, &blk)
-
yield if block_given?
-
modal = find_modal(options)
-
message = modal.text
-
modal.dismiss
-
message
-
end
-
-
1
def quit
-
@browser.quit if @browser
-
rescue Errno::ECONNREFUSED
-
# Browser must have already gone
-
ensure
-
@browser = nil
-
end
-
-
1
def invalid_element_errors
-
[Selenium::WebDriver::Error::StaleElementReferenceError,
-
Selenium::WebDriver::Error::UnhandledError,
-
Selenium::WebDriver::Error::ElementNotVisibleError,
-
Selenium::WebDriver::Error::InvalidSelectorError] # Work around a race condition that can occur with chromedriver and #go_back/#go_forward
-
end
-
-
1
def no_such_window_error
-
Selenium::WebDriver::Error::NoSuchWindowError
-
end
-
-
# @deprecated This method is being removed
-
1
def browser_initialized?
-
super && !@browser.nil?
-
end
-
-
1
private
-
-
1
def within_given_window(handle)
-
original_handle = self.current_window_handle
-
if handle == original_handle
-
yield
-
else
-
switch_to_window(handle)
-
result = yield
-
switch_to_window(original_handle)
-
result
-
end
-
end
-
-
1
def find_modal(options={})
-
# Selenium has its own built in wait (2 seconds)for a modal to show up, so this wait is really the minimum time
-
# Actual wait time may be longer than specified
-
wait = Selenium::WebDriver::Wait.new(
-
timeout: (options[:wait] || Capybara.default_max_wait_time),
-
ignore: Selenium::WebDriver::Error::NoAlertPresentError)
-
begin
-
wait.until do
-
alert = @browser.switch_to.alert
-
regexp = options[:text].is_a?(Regexp) ? options[:text] : Regexp.escape(options[:text].to_s)
-
alert.text.match(regexp) ? alert : nil
-
end
-
rescue Selenium::WebDriver::Error::TimeOutError
-
raise Capybara::ModalNotFound.new("Unable to find modal dialog#{" with #{options[:text]}" if options[:text]}")
-
end
-
end
-
-
end
-
# frozen_string_literal: true
-
1
class Capybara::Selenium::Node < Capybara::Driver::Node
-
1
def visible_text
-
# Selenium doesn't normalize Unicode whitespace.
-
Capybara::Helpers.normalize_whitespace(native.text)
-
end
-
-
1
def all_text
-
text = driver.browser.execute_script("return arguments[0].textContent", native)
-
Capybara::Helpers.normalize_whitespace(text)
-
end
-
-
1
def [](name)
-
native.attribute(name.to_s)
-
rescue Selenium::WebDriver::Error::WebDriverError
-
nil
-
end
-
-
1
def value
-
if tag_name == "select" and self[:multiple] and not self[:multiple] == "false"
-
native.find_elements(:xpath, ".//option").select { |n| n.selected? }.map { |n| n[:value] || n.text }
-
else
-
native[:value]
-
end
-
end
-
-
##
-
#
-
# Set the value of the form element to the given value.
-
#
-
# @param [String] value The new value
-
# @param [Hash{}] options Driver specific options for how to set the value
-
# @option options [Symbol,Array] :clear (nil) The method used to clear the previous value <br/>
-
# nil => clear via javascript <br/>
-
# :none => append the new value to the existing value <br/>
-
# :backspace => send backspace keystrokes to clear the field <br/>
-
# Array => an array of keys to send before the value being set, e.g. [[:command, 'a'], :backspace]
-
1
def set(value, options={})
-
tag_name = self.tag_name
-
type = self[:type]
-
if (Array === value) && !self[:multiple]
-
raise ArgumentError.new "Value cannot be an Array when 'multiple' attribute is not present. Not a #{value.class}"
-
end
-
if tag_name == 'input' and type == 'radio'
-
click
-
elsif tag_name == 'input' and type == 'checkbox'
-
click if value ^ native.attribute('checked').to_s.eql?("true")
-
elsif tag_name == 'input' and type == 'file'
-
path_names = value.to_s.empty? ? [] : value
-
native.send_keys(*path_names)
-
elsif tag_name == 'textarea' or tag_name == 'input'
-
if self[:readonly]
-
warn "Attempt to set readonly element with value: #{value} \n *This will raise an exception in a future version of Capybara"
-
elsif value.to_s.empty?
-
native.clear
-
else
-
if options[:clear] == :backspace
-
# Clear field by sending the correct number of backspace keys.
-
backspaces = [:backspace] * self.value.to_s.length
-
native.send_keys(*(backspaces + [value.to_s]))
-
elsif options[:clear] == :none
-
native.send_keys(value.to_s)
-
elsif options[:clear].is_a? Array
-
native.send_keys(*options[:clear], value.to_s)
-
else
-
# Clear field by JavaScript assignment of the value property.
-
# Script can change a readonly element which user input cannot, so
-
# don't execute if readonly.
-
driver.browser.execute_script "arguments[0].value = ''", native
-
native.send_keys(value.to_s)
-
end
-
end
-
elsif native.attribute('isContentEditable')
-
#ensure we are focused on the element
-
script = <<-JS
-
var range = document.createRange();
-
arguments[0].focus();
-
range.selectNodeContents(arguments[0]);
-
window.getSelection().addRange(range);
-
JS
-
driver.browser.execute_script script, native
-
native.send_keys(value.to_s)
-
end
-
end
-
-
1
def select_option
-
native.click unless selected?
-
end
-
-
1
def unselect_option
-
if select_node['multiple'] != 'multiple' and select_node['multiple'] != 'true'
-
raise Capybara::UnselectNotAllowed, "Cannot unselect option from single select box."
-
end
-
native.click if selected?
-
end
-
-
1
def click
-
native.click
-
end
-
-
1
def right_click
-
driver.browser.action.context_click(native).perform
-
end
-
-
1
def double_click
-
driver.browser.action.double_click(native).perform
-
end
-
-
1
def send_keys(*args)
-
native.send_keys(*args)
-
end
-
-
1
def hover
-
driver.browser.action.move_to(native).perform
-
end
-
-
1
def drag_to(element)
-
driver.browser.action.drag_and_drop(native, element.native).perform
-
end
-
-
1
def tag_name
-
native.tag_name.downcase
-
end
-
-
1
def visible?
-
displayed = native.displayed?
-
displayed and displayed != "false"
-
end
-
-
1
def selected?
-
selected = native.selected?
-
selected and selected != "false"
-
end
-
-
1
def disabled?
-
!native.enabled?
-
end
-
-
1
alias :checked? :selected?
-
-
1
def find_xpath(locator)
-
native.find_elements(:xpath, locator).map { |n| self.class.new(driver, n) }
-
end
-
-
1
def find_css(locator)
-
native.find_elements(:css, locator).map { |n| self.class.new(driver, n) }
-
end
-
-
1
def ==(other)
-
native == other.native
-
end
-
-
1
def path
-
path = find_xpath('ancestor::*').reverse
-
path.unshift self
-
-
result = []
-
while node = path.shift
-
parent = path.first
-
-
if parent
-
siblings = parent.find_xpath(node.tag_name)
-
if siblings.size == 1
-
result.unshift node.tag_name
-
else
-
index = siblings.index(node)
-
result.unshift "#{node.tag_name}[#{index+1}]"
-
end
-
else
-
result.unshift node.tag_name
-
end
-
end
-
-
'/' + result.join('/')
-
end
-
-
1
private
-
-
# a reference to the select node if this is an option node
-
1
def select_node
-
find_xpath('./ancestor::select').first
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'uri'
-
1
require 'net/http'
-
1
require 'rack'
-
-
1
module Capybara
-
1
class Server
-
1
class Middleware
-
1
class Counter
-
1
attr_reader :value
-
-
1
def initialize
-
@value = 0
-
@mutex = Mutex.new
-
end
-
-
1
def increment
-
@mutex.synchronize { @value += 1 }
-
end
-
-
1
def decrement
-
@mutex.synchronize { @value -= 1 }
-
end
-
end
-
-
1
attr_accessor :error
-
-
1
def initialize(app)
-
@app = app
-
@counter = Counter.new
-
end
-
-
1
def pending_requests?
-
@counter.value > 0
-
end
-
-
1
def call(env)
-
if env["PATH_INFO"] == "/__identify__"
-
[200, {}, [@app.object_id.to_s]]
-
else
-
@counter.increment
-
begin
-
@app.call(env)
-
rescue *Capybara.server_errors => e
-
@error = e unless @error
-
raise e
-
ensure
-
@counter.decrement
-
end
-
end
-
end
-
end
-
-
1
class << self
-
1
def ports
-
@ports ||= {}
-
end
-
end
-
-
1
attr_reader :app, :port, :host
-
-
1
def initialize(app, port=Capybara.server_port, host=Capybara.server_host)
-
@app = app
-
@middleware = Middleware.new(@app)
-
@server_thread = nil # suppress warnings
-
@host, @port = host, port
-
@port ||= Capybara::Server.ports[Capybara.reuse_server ? @app.object_id : @middleware.object_id]
-
@port ||= find_available_port(host)
-
end
-
-
1
def reset_error!
-
@middleware.error = nil
-
end
-
-
1
def error
-
@middleware.error
-
end
-
-
1
def responsive?
-
return false if @server_thread && @server_thread.join(0)
-
-
res = Net::HTTP.start(host, @port) { |http| http.get('/__identify__') }
-
-
if res.is_a?(Net::HTTPSuccess) or res.is_a?(Net::HTTPRedirection)
-
return res.body == @app.object_id.to_s
-
end
-
rescue SystemCallError
-
return false
-
end
-
-
1
def wait_for_pending_requests
-
Timeout.timeout(60) { sleep(0.01) while @middleware.pending_requests? }
-
rescue Timeout::Error
-
raise "Requests did not finish in 60 seconds"
-
end
-
-
1
def boot
-
unless responsive?
-
Capybara::Server.ports[Capybara.reuse_server ? @app.object_id : @middleware.object_id] = @port
-
-
@server_thread = Thread.new do
-
Capybara.server.call(@middleware, @port, @host)
-
end
-
-
Timeout.timeout(60) { @server_thread.join(0.1) until responsive? }
-
end
-
rescue Timeout::Error
-
raise "Rack application timed out during boot"
-
else
-
self
-
end
-
-
1
private
-
-
1
def find_available_port(host)
-
server = TCPServer.new(host, 0)
-
server.addr[1]
-
ensure
-
server.close if server
-
end
-
-
end
-
end
-
# frozen_string_literal: true
-
1
require 'capybara/session/matchers'
-
-
1
module Capybara
-
-
##
-
#
-
# The Session class represents a single user's interaction with the system. The Session can use
-
# any of the underlying drivers. A session can be initialized manually like this:
-
#
-
# session = Capybara::Session.new(:culerity, MyRackApp)
-
#
-
# The application given as the second argument is optional. When running Capybara against an external
-
# page, you might want to leave it out:
-
#
-
# session = Capybara::Session.new(:culerity)
-
# session.visit('http://www.google.com')
-
#
-
# Session provides a number of methods for controlling the navigation of the page, such as +visit+,
-
# +current_path, and so on. It also delegate a number of methods to a Capybara::Document, representing
-
# the current HTML document. This allows interaction:
-
#
-
# session.fill_in('q', :with => 'Capybara')
-
# session.click_button('Search')
-
# expect(session).to have_content('Capybara')
-
#
-
# When using capybara/dsl, the Session is initialized automatically for you.
-
#
-
1
class Session
-
1
include Capybara::SessionMatchers
-
-
1
NODE_METHODS = [
-
:all, :first, :attach_file, :text, :check, :choose,
-
:click_link_or_button, :click_button, :click_link, :field_labeled,
-
:fill_in, :find, :find_all, :find_button, :find_by_id, :find_field, :find_link,
-
:has_content?, :has_text?, :has_css?, :has_no_content?, :has_no_text?,
-
:has_no_css?, :has_no_xpath?, :resolve, :has_xpath?, :select, :uncheck,
-
:has_link?, :has_no_link?, :has_button?, :has_no_button?, :has_field?,
-
:has_no_field?, :has_checked_field?, :has_unchecked_field?,
-
:has_no_table?, :has_table?, :unselect, :has_select?, :has_no_select?,
-
:has_selector?, :has_no_selector?, :click_on, :has_no_checked_field?,
-
:has_no_unchecked_field?, :query, :assert_selector, :assert_no_selector,
-
:refute_selector, :assert_text, :assert_no_text
-
]
-
# @api private
-
1
DOCUMENT_METHODS = [
-
:title, :assert_title, :assert_no_title, :has_title?, :has_no_title?
-
]
-
1
SESSION_METHODS = [
-
:body, :html, :source, :current_url, :current_host, :current_path,
-
:execute_script, :evaluate_script, :visit, :go_back, :go_forward,
-
:within, :within_fieldset, :within_table, :within_frame, :current_window,
-
:windows, :open_new_window, :switch_to_window, :within_window, :window_opened_by,
-
:save_page, :save_and_open_page, :save_screenshot,
-
:save_and_open_screenshot, :reset_session!, :response_headers,
-
:status_code, :current_scope,
-
:assert_current_path, :assert_no_current_path, :has_current_path?, :has_no_current_path?
-
] + DOCUMENT_METHODS
-
1
MODAL_METHODS = [
-
:accept_alert, :accept_confirm, :dismiss_confirm, :accept_prompt,
-
:dismiss_prompt
-
]
-
1
DSL_METHODS = NODE_METHODS + SESSION_METHODS + MODAL_METHODS
-
-
1
attr_reader :mode, :app, :server
-
1
attr_accessor :synchronized
-
-
1
def initialize(mode, app=nil)
-
1
@mode = mode
-
1
@app = app
-
1
if Capybara.run_server and @app and driver.needs_server?
-
@server = Capybara::Server.new(@app).boot
-
else
-
1
@server = nil
-
end
-
1
@touched = false
-
end
-
-
1
def driver
-
@driver ||= begin
-
1
unless Capybara.drivers.has_key?(mode)
-
other_drivers = Capybara.drivers.keys.map { |key| key.inspect }
-
raise Capybara::DriverNotFoundError, "no driver called #{mode.inspect} was found, available drivers: #{other_drivers.join(', ')}"
-
end
-
1
Capybara.drivers[mode].call(app)
-
63
end
-
end
-
-
##
-
#
-
# Reset the session (i.e. remove cookies and navigate to blank page)
-
#
-
# This method does not:
-
#
-
# * accept modal dialogs if they are present (Selenium driver now does, others may not)
-
# * clear browser cache/HTML 5 local storage/IndexedDB/Web SQL database/etc.
-
# * modify state of the driver/underlying browser in any other way
-
#
-
# as doing so will result in performance downsides and it's not needed to do everything from the list above for most apps.
-
#
-
# If you want to do anything from the list above on a general basis you can:
-
#
-
# * write RSpec/Cucumber/etc. after hook
-
# * monkeypatch this method
-
# * use Ruby's `prepend` method
-
#
-
1
def reset!
-
17
if @touched
-
16
driver.reset!
-
16
@touched = false
-
end
-
17
@server.wait_for_pending_requests if @server
-
17
raise_server_error!
-
end
-
1
alias_method :cleanup!, :reset!
-
1
alias_method :reset_session!, :reset!
-
-
##
-
#
-
# Raise errors encountered in the server
-
#
-
1
def raise_server_error!
-
62
raise @server.error if Capybara.raise_server_errors and @server and @server.error
-
ensure
-
62
@server.reset_error! if @server
-
end
-
-
##
-
#
-
# Returns a hash of response headers. Not supported by all drivers (e.g. Selenium)
-
#
-
# @return [Hash{String => String}] A hash of response headers.
-
#
-
1
def response_headers
-
driver.response_headers
-
end
-
-
##
-
#
-
# Returns the current HTTP status code as an Integer. Not supported by all drivers (e.g. Selenium)
-
#
-
# @return [Integer] Current HTTP status code
-
#
-
1
def status_code
-
driver.status_code
-
end
-
-
##
-
#
-
# @return [String] A snapshot of the DOM of the current document, as it looks right now (potentially modified by JavaScript).
-
#
-
1
def html
-
driver.html
-
end
-
1
alias_method :body, :html
-
1
alias_method :source, :html
-
-
##
-
#
-
# @return [String] Path of the current page, without any domain information
-
#
-
1
def current_path
-
path = URI.parse(current_url).path
-
path if path and not path.empty?
-
end
-
-
##
-
#
-
# @return [String] Host of the current page
-
#
-
1
def current_host
-
uri = URI.parse(current_url)
-
"#{uri.scheme}://#{uri.host}" if uri.host
-
end
-
-
##
-
#
-
# @return [String] Fully qualified URL of the current page
-
#
-
1
def current_url
-
driver.current_url
-
end
-
-
##
-
#
-
# Navigate to the given URL. The URL can either be a relative URL or an absolute URL
-
# The behaviour of either depends on the driver.
-
#
-
# session.visit('/foo')
-
# session.visit('http://google.com')
-
#
-
# For drivers which can run against an external application, such as the selenium driver
-
# giving an absolute URL will navigate to that page. This allows testing applications
-
# running on remote servers. For these drivers, setting {Capybara.app_host} will make the
-
# remote server the default. For example:
-
#
-
# Capybara.app_host = 'http://google.com'
-
# session.visit('/') # visits the google homepage
-
#
-
# If {Capybara.always_include_port} is set to true and this session is running against
-
# a rack application, then the port that the rack application is running on will automatically
-
# be inserted into the URL. Supposing the app is running on port `4567`, doing something like:
-
#
-
# visit("http://google.com/test")
-
#
-
# Will actually navigate to `http://google.com:4567/test`.
-
#
-
# @param [#to_s] visit_uri The URL to navigate to. The parameter will be cast to a String.
-
#
-
1
def visit(visit_uri)
-
22
raise_server_error!
-
22
@touched = true
-
-
22
visit_uri = URI.parse(visit_uri.to_s)
-
-
22
uri_base = if @server
-
visit_uri.port = @server.port if Capybara.always_include_port && (visit_uri.port == visit_uri.default_port)
-
URI.parse(Capybara.app_host || "http://#{@server.host}:#{@server.port}")
-
else
-
22
Capybara.app_host && URI.parse(Capybara.app_host)
-
end
-
-
# TODO - this is only for compatability with previous 2.x behavior that concatenated
-
# Capybara.app_host and a "relative" path - Consider removing in 3.0
-
# @abotalov brought up a good point about this behavior potentially being useful to people
-
# deploying to a subdirectory and/or single page apps where only the url fragment changes
-
22
if visit_uri.scheme.nil? && uri_base
-
visit_uri.path = uri_base.path + visit_uri.path
-
end
-
-
22
visit_uri = uri_base.merge(visit_uri) unless uri_base.nil?
-
-
22
driver.visit(visit_uri.to_s)
-
end
-
-
##
-
#
-
# Move back a single entry in the browser's history.
-
#
-
1
def go_back
-
driver.go_back
-
end
-
-
##
-
#
-
# Move forward a single entry in the browser's history.
-
#
-
1
def go_forward
-
driver.go_forward
-
end
-
-
##
-
#
-
# Executes the given block within the context of a node. `within` takes the
-
# same options as `find`, as well as a block. For the duration of the
-
# block, any command to Capybara will be handled as though it were scoped
-
# to the given element.
-
#
-
# within(:xpath, '//div[@id="delivery-address"]') do
-
# fill_in('Street', :with => '12 Main Street')
-
# end
-
#
-
# Just as with `find`, if multiple elements match the selector given to
-
# `within`, an error will be raised, and just as with `find`, this
-
# behaviour can be controlled through the `:match` and `:exact` options.
-
#
-
# It is possible to omit the first parameter, in that case, the selector is
-
# assumed to be of the type set in Capybara.default_selector.
-
#
-
# within('div#delivery-address') do
-
# fill_in('Street', :with => '12 Main Street')
-
# end
-
#
-
# Note that a lot of uses of `within` can be replaced more succinctly with
-
# chaining:
-
#
-
# find('div#delivery-address').fill_in('Street', :with => '12 Main Street')
-
#
-
# @overload within(*find_args)
-
# @param (see Capybara::Node::Finders#all)
-
#
-
# @overload within(a_node)
-
# @param [Capybara::Node::Base] a_node The node in whose scope the block should be evaluated
-
#
-
# @raise [Capybara::ElementNotFound] If the scope can't be found before time expires
-
#
-
1
def within(*args)
-
new_scope = if args.first.is_a?(Capybara::Node::Base) then args.first else find(*args) end
-
begin
-
scopes.push(new_scope)
-
yield
-
ensure
-
scopes.pop
-
end
-
end
-
-
##
-
#
-
# Execute the given block within the a specific fieldset given the id or legend of that fieldset.
-
#
-
# @param [String] locator Id or legend of the fieldset
-
#
-
1
def within_fieldset(locator)
-
within :fieldset, locator do
-
yield
-
end
-
end
-
-
##
-
#
-
# Execute the given block within the a specific table given the id or caption of that table.
-
#
-
# @param [String] locator Id or caption of the table
-
#
-
1
def within_table(locator)
-
within :table, locator do
-
yield
-
end
-
end
-
-
##
-
#
-
# Execute the given block within the given iframe using given frame name or index.
-
# May be supported by not all drivers. Drivers that support it, may provide additional options.
-
#
-
# @overload within_frame(index)
-
# @param [Integer] index index of a frame
-
# @overload within_frame(name)
-
# @param [String] name name of a frame
-
#
-
1
def within_frame(frame_handle)
-
scopes.push(nil)
-
driver.within_frame(frame_handle) do
-
yield
-
end
-
ensure
-
scopes.pop
-
end
-
-
##
-
# @return [Capybara::Window] current window
-
#
-
1
def current_window
-
Window.new(self, driver.current_window_handle)
-
end
-
-
##
-
# Get all opened windows.
-
# The order of windows in returned array is not defined.
-
# The driver may sort windows by their creation time but it's not required.
-
#
-
# @return [Array<Capybara::Window>] an array of all windows
-
#
-
1
def windows
-
driver.window_handles.map do |handle|
-
Window.new(self, handle)
-
end
-
end
-
-
##
-
# Open new window.
-
# Current window doesn't change as the result of this call.
-
# It should be switched to explicitly.
-
#
-
# @return [Capybara::Window] window that has been opened
-
#
-
1
def open_new_window
-
window_opened_by do
-
driver.open_new_window
-
end
-
end
-
-
##
-
# @overload switch_to_window(&block)
-
# Switches to the first window for which given block returns a value other than false or nil.
-
# If window that matches block can't be found, the window will be switched back and `WindowError` will be raised.
-
# @example
-
# window = switch_to_window { title == 'Page title' }
-
# @raise [Capybara::WindowError] if no window matches given block
-
# @overload switch_to_window(window)
-
# @param window [Capybara::Window] window that should be switched to
-
# @raise [Capybara::Driver::Base#no_such_window_error] if unexistent (e.g. closed) window was passed
-
#
-
# @return [Capybara::Window] window that has been switched to
-
# @raise [Capybara::ScopeError] if this method is invoked inside `within`,
-
# `within_frame` or `within_window` methods
-
# @raise [ArgumentError] if both or neither arguments were provided
-
#
-
1
def switch_to_window(window = nil, options= {})
-
options, window = window, nil if window.is_a? Hash
-
-
block_given = block_given?
-
if window && block_given
-
raise ArgumentError, "`switch_to_window` can take either a block or a window, not both"
-
elsif !window && !block_given
-
raise ArgumentError, "`switch_to_window`: either window or block should be provided"
-
elsif scopes.size > 1
-
raise Capybara::ScopeError, "`switch_to_window` is not supposed to be invoked from "\
-
"`within`'s, `within_frame`'s' or `within_window`'s' block."
-
end
-
-
if window
-
driver.switch_to_window(window.handle)
-
window
-
else
-
wait_time = Capybara::Queries::SelectorQuery.new(options).wait
-
document.synchronize(wait_time, errors: [Capybara::WindowError]) do
-
original_window_handle = driver.current_window_handle
-
begin
-
driver.window_handles.each do |handle|
-
driver.switch_to_window handle
-
if yield
-
return Window.new(self, handle)
-
end
-
end
-
rescue => e
-
driver.switch_to_window(original_window_handle)
-
raise e
-
else
-
driver.switch_to_window(original_window_handle)
-
raise Capybara::WindowError, "Could not find a window matching block/lambda"
-
end
-
end
-
end
-
end
-
-
##
-
# This method does the following:
-
#
-
# 1. Switches to the given window (it can be located by window instance/lambda/string).
-
# 2. Executes the given block (within window located at previous step).
-
# 3. Switches back (this step will be invoked even if exception will happen at second step)
-
#
-
# @overload within_window(window) { do_something }
-
# @param window [Capybara::Window] instance of `Capybara::Window` class
-
# that will be switched to
-
# @raise [driver#no_such_window_error] if unexistent (e.g. closed) window was passed
-
# @overload within_window(proc_or_lambda) { do_something }
-
# @param lambda [Proc] lambda. First window for which lambda
-
# returns a value other than false or nil will be switched to.
-
# @example
-
# within_window(->{ page.title == 'Page title' }) { click_button 'Submit' }
-
# @raise [Capybara::WindowError] if no window matching lambda was found
-
# @overload within_window(string) { do_something }
-
# @deprecated Pass window or lambda instead
-
# @param [String] handle, name, url or title of the window
-
#
-
# @raise [Capybara::ScopeError] if this method is invoked inside `within`,
-
# `within_frame` or `within_window` methods
-
# @return value returned by the block
-
#
-
1
def within_window(window_or_handle)
-
if window_or_handle.instance_of?(Capybara::Window)
-
original = current_window
-
switch_to_window(window_or_handle) unless original == window_or_handle
-
scopes << nil
-
begin
-
yield
-
ensure
-
@scopes.pop
-
switch_to_window(original) unless original == window_or_handle
-
end
-
elsif window_or_handle.is_a?(Proc)
-
original = current_window
-
switch_to_window { window_or_handle.call }
-
scopes << nil
-
begin
-
yield
-
ensure
-
@scopes.pop
-
switch_to_window(original)
-
end
-
else
-
offending_line = caller.first
-
file_line = offending_line.match(/^(.+?):(\d+)/)[0]
-
warn "DEPRECATION WARNING: Passing string argument to #within_window is deprecated. "\
-
"Pass window object or lambda. (called from #{file_line})"
-
begin
-
scopes << nil
-
driver.within_window(window_or_handle) { yield }
-
ensure
-
@scopes.pop
-
end
-
end
-
end
-
-
##
-
# Get the window that has been opened by the passed block.
-
# It will wait for it to be opened (in the same way as other Capybara methods wait).
-
# It's better to use this method than `windows.last`
-
# {https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#h_note_10 as order of windows isn't defined in some drivers}
-
#
-
# @param options [Hash]
-
# @option options [Numeric] :wait (Capybara.default_max_wait_time) maximum wait time
-
# @return [Capybara::Window] the window that has been opened within a block
-
# @raise [Capybara::WindowError] if block passed to window hasn't opened window
-
# or opened more than one window
-
#
-
1
def window_opened_by(options = {}, &block)
-
old_handles = driver.window_handles
-
block.call
-
-
wait_time = Capybara::Queries::SelectorQuery.new(options).wait
-
document.synchronize(wait_time, errors: [Capybara::WindowError]) do
-
opened_handles = (driver.window_handles - old_handles)
-
if opened_handles.size != 1
-
raise Capybara::WindowError, "block passed to #window_opened_by "\
-
"opened #{opened_handles.size} windows instead of 1"
-
end
-
Window.new(self, opened_handles.first)
-
end
-
end
-
-
##
-
#
-
# Execute the given script, not returning a result. This is useful for scripts that return
-
# complex objects, such as jQuery statements. +execute_script+ should be used over
-
# +evaluate_script+ whenever possible.
-
#
-
# @param [String] script A string of JavaScript to execute
-
#
-
1
def execute_script(script)
-
@touched = true
-
driver.execute_script(script)
-
end
-
-
##
-
#
-
# Evaluate the given JavaScript and return the result. Be careful when using this with
-
# scripts that return complex objects, such as jQuery statements. +execute_script+ might
-
# be a better alternative.
-
#
-
# @param [String] script A string of JavaScript to evaluate
-
# @return [Object] The result of the evaluated JavaScript (may be driver specific)
-
#
-
1
def evaluate_script(script)
-
@touched = true
-
driver.evaluate_script(script)
-
end
-
-
##
-
#
-
# Execute the block, accepting a alert.
-
#
-
# @!macro modal_params
-
# @overload $0(text, options = {}, &blk)
-
# @param text [String, Regexp] Text or regex to match against the text in the modal. If not provided any modal is matched
-
# @overload $0(options = {}, &blk)
-
# @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum time to wait for the modal to appear after executing the block.
-
# @return [String] the message shown in the modal
-
# @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
-
#
-
1
def accept_alert(text_or_options=nil, options={}, &blk)
-
text_or_options, options = nil, text_or_options if text_or_options.is_a?(Hash)
-
options[:text] ||= text_or_options unless text_or_options.nil?
-
options[:wait] ||= Capybara.default_max_wait_time
-
-
driver.accept_modal(:alert, options, &blk)
-
end
-
-
##
-
#
-
# Execute the block, accepting a confirm.
-
#
-
# @macro modal_params
-
#
-
1
def accept_confirm(text_or_options=nil, options={}, &blk)
-
text_or_options, options = nil, text_or_options if text_or_options.is_a?(Hash)
-
options[:text] ||= text_or_options unless text_or_options.nil?
-
options[:wait] ||= Capybara.default_max_wait_time
-
-
driver.accept_modal(:confirm, options, &blk)
-
end
-
-
##
-
#
-
# Execute the block, dismissing a confirm.
-
#
-
# @macro modal_params
-
#
-
1
def dismiss_confirm(text_or_options=nil, options={}, &blk)
-
text_or_options, options = nil, text_or_options if text_or_options.is_a?(Hash)
-
options[:text] ||= text_or_options unless text_or_options.nil?
-
options[:wait] ||= Capybara.default_max_wait_time
-
-
driver.dismiss_modal(:confirm, options, &blk)
-
end
-
-
##
-
#
-
# Execute the block, accepting a prompt, optionally responding to the prompt.
-
#
-
# @macro modal_params
-
# @option options [String] :with Response to provide to the prompt
-
#
-
1
def accept_prompt(text_or_options=nil, options={}, &blk)
-
text_or_options, options = nil, text_or_options if text_or_options.is_a?(Hash)
-
options[:text] ||= text_or_options unless text_or_options.nil?
-
options[:wait] ||= Capybara.default_max_wait_time
-
-
driver.accept_modal(:prompt, options, &blk)
-
end
-
-
##
-
#
-
# Execute the block, dismissing a prompt.
-
#
-
# @macro modal_params
-
#
-
1
def dismiss_prompt(text_or_options=nil, options={}, &blk)
-
text_or_options, options = nil, text_or_options if text_or_options.is_a?(Hash)
-
options[:text] ||= text_or_options unless text_or_options.nil?
-
options[:wait] ||= Capybara.default_max_wait_time
-
-
driver.dismiss_modal(:prompt, options, &blk)
-
end
-
-
##
-
#
-
# Save a snapshot of the page. If `Capybara.asset_host` is set it will inject `base` tag
-
# pointing to `asset_host`.
-
#
-
# If invoked without arguments it will save file to `Capybara.save_path`
-
# and file will be given randomly generated filename. If invoked with a relative path
-
# the path will be relative to `Capybara.save_path`, which is different from
-
# the previous behavior with `Capybara.save_and_open_page_path` where the relative path was
-
# relative to Dir.pwd
-
#
-
# @param [String] path the path to where it should be saved
-
# @return [String] the path to which the file was saved
-
#
-
1
def save_page(path = nil)
-
path = prepare_path(path, 'html')
-
File.write(path, Capybara::Helpers.inject_asset_host(body), mode: 'wb')
-
path
-
end
-
-
##
-
#
-
# Save a snapshot of the page and open it in a browser for inspection.
-
#
-
# If invoked without arguments it will save file to `Capybara.save_path`
-
# and file will be given randomly generated filename. If invoked with a relative path
-
# the path will be relative to `Capybara.save_path`, which is different from
-
# the previous behavior with `Capybara.save_and_open_page_path` where the relative path was
-
# relative to Dir.pwd
-
#
-
# @param [String] path the path to where it should be saved
-
#
-
1
def save_and_open_page(path = nil)
-
path = save_page(path)
-
open_file(path)
-
end
-
-
##
-
#
-
# Save a screenshot of page.
-
#
-
# If invoked without arguments it will save file to `Capybara.save_path`
-
# and file will be given randomly generated filename. If invoked with a relative path
-
# the path will be relative to `Capybara.save_path`, which is different from
-
# the previous behavior with `Capybara.save_and_open_page_path` where the relative path was
-
# relative to Dir.pwd
-
#
-
# @param [String] path the path to where it should be saved
-
# @param [Hash] options a customizable set of options
-
# @return [String] the path to which the file was saved
-
1
def save_screenshot(path = nil, options = {})
-
path = prepare_path(path, 'png')
-
driver.save_screenshot(path, options)
-
path
-
end
-
-
##
-
#
-
# Save a screenshot of the page and open it for inspection.
-
#
-
# If invoked without arguments it will save file to `Capybara.save_path`
-
# and file will be given randomly generated filename. If invoked with a relative path
-
# the path will be relative to `Capybara.save_path`, which is different from
-
# the previous behavior with `Capybara.save_and_open_page_path` where the relative path was
-
# relative to Dir.pwd
-
#
-
# @param [String] path the path to where it should be saved
-
# @param [Hash] options a customizable set of options
-
#
-
1
def save_and_open_screenshot(path = nil, options = {})
-
path = save_screenshot(path, options)
-
open_file(path)
-
end
-
-
1
def document
-
26
@document ||= Capybara::Node::Document.new(self, driver)
-
end
-
-
1
NODE_METHODS.each do |method|
-
52
define_method method do |*args, &block|
-
26
@touched = true
-
26
current_scope.send(method, *args, &block)
-
end
-
end
-
-
1
DOCUMENT_METHODS.each do |method|
-
5
define_method method do |*args, &block|
-
document.send(method, *args, &block)
-
end
-
end
-
-
1
def inspect
-
%(#<Capybara::Session>)
-
end
-
-
1
def current_scope
-
26
scopes.last || document
-
end
-
-
1
private
-
-
1
def open_file(path)
-
begin
-
require "launchy"
-
Launchy.open(path)
-
rescue LoadError
-
warn "File saved to #{path}."
-
warn "Please install the launchy gem to open the file automatically."
-
end
-
end
-
-
1
def prepare_path(path, extension)
-
if Capybara.save_path || Capybara.save_and_open_page_path.nil?
-
path = File.expand_path(path || default_fn(extension), Capybara.save_path)
-
else
-
path = File.expand_path(default_fn(extension), Capybara.save_and_open_page_path) if path.nil?
-
end
-
FileUtils.mkdir_p(File.dirname(path))
-
path
-
end
-
-
1
def default_fn(extension)
-
timestamp = Time.new.strftime("%Y%m%d%H%M%S")
-
path = "capybara-#{timestamp}#{rand(10**10)}.#{extension}"
-
end
-
-
1
def scopes
-
26
@scopes ||= [nil]
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
module SessionMatchers
-
##
-
# Asserts that the page has the given path.
-
# By default this will compare against the path+query portion of the full url
-
#
-
# @!macro current_path_query_params
-
# @overload $0(string, options = {})
-
# @param string [String] The string that the current 'path' should equal
-
# @overload $0(regexp, options = {})
-
# @param regexp [Regexp] The regexp that the current 'path' should match to
-
# @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum time that Capybara will wait for the current path to eq/match given string/regexp argument
-
# @option options [Boolean] :url (false) Whether the compare should be done against the full url
-
# @option options [Boolean] :only_path (false) Whether the compare should be done against just the path protion of the url
-
# @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time
-
# @return [true]
-
#
-
1
def assert_current_path(path, options={})
-
query = Capybara::Queries::CurrentPathQuery.new(path, options)
-
document.synchronize(query.wait) do
-
unless query.resolves_for?(self)
-
raise Capybara::ExpectationNotMet, query.failure_message
-
end
-
end
-
return true
-
end
-
-
##
-
# Asserts that the page doesn't have the given path.
-
#
-
# @macro current_path_query_params
-
# @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time
-
# @return [true]
-
#
-
1
def assert_no_current_path(path, options={})
-
query = Capybara::Queries::CurrentPathQuery.new(path, options)
-
document.synchronize(query.wait) do
-
if query.resolves_for?(self)
-
raise Capybara::ExpectationNotMet, query.negative_failure_message
-
end
-
end
-
return true
-
end
-
-
##
-
# Checks if the page has the given path.
-
#
-
# @macro current_path_query_params
-
# @return [Boolean]
-
#
-
1
def has_current_path?(path, options={})
-
assert_current_path(path, options)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
-
##
-
# Checks if the page doesn't have the given path.
-
#
-
# @macro current_path_query_params
-
# @return [Boolean]
-
#
-
1
def has_no_current_path?(path, options={})
-
assert_no_current_path(path, options)
-
rescue Capybara::ExpectationNotMet
-
return false
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
1
VERSION = '2.7.1'
-
end
-
# frozen_string_literal: true
-
1
module Capybara
-
##
-
# The Window class represents a browser window.
-
#
-
# You can get an instance of the class by calling either of:
-
#
-
# * {Capybara::Session#windows}
-
# * {Capybara::Session#current_window}
-
# * {Capybara::Session#window_opened_by}
-
# * {Capybara::Session#switch_to_window}
-
#
-
# Note that some drivers (e.g. Selenium) support getting size of/resizing/closing only
-
# current window. So if you invoke such method for:
-
#
-
# * window that is current, Capybara will make 2 Selenium method invocations
-
# (get handle of current window + get size/resize/close).
-
# * window that is not current, Capybara will make 4 Selenium method invocations
-
# (get handle of current window + switch to given handle + get size/resize/close + switch to original handle)
-
#
-
1
class Window
-
# @return [String] a string that uniquely identifies window within session
-
1
attr_reader :handle
-
-
# @return [Capybara::Session] session that this window belongs to
-
1
attr_reader :session
-
-
# @api private
-
1
def initialize(session, handle)
-
@session = session
-
@driver = session.driver
-
@handle = handle
-
end
-
-
##
-
# @return [Boolean] whether the window is not closed
-
1
def exists?
-
@driver.window_handles.include?(@handle)
-
end
-
-
##
-
# @return [Boolean] whether the window is closed
-
1
def closed?
-
!exists?
-
end
-
-
##
-
# @return [Boolean] whether this window is the window in which commands are being executed
-
1
def current?
-
@driver.current_window_handle == @handle
-
rescue @driver.no_such_window_error
-
false
-
end
-
-
##
-
# Close window.
-
#
-
# If this method was called for window that is current, then after calling this method
-
# future invocations of other Capybara methods should raise
-
# `session.driver.no_such_window_error` until another window will be switched to.
-
#
-
# @!macro about_current
-
# If this method was called for window that is not current, then after calling this method
-
# current window shouldn remain the same as it was before calling this method.
-
#
-
1
def close
-
@driver.close_window(handle)
-
end
-
-
##
-
# Get window size.
-
#
-
# @macro about_current
-
# @return [Array<(Fixnum, Fixnum)>] an array with width and height
-
#
-
1
def size
-
@driver.window_size(handle)
-
end
-
-
##
-
# Resize window.
-
#
-
# @macro about_current
-
# @param width [String] the new window width in pixels
-
# @param height [String] the new window height in pixels
-
#
-
1
def resize_to(width, height)
-
@driver.resize_window_to(handle, width, height)
-
end
-
-
##
-
# Maximize window.
-
#
-
# If a particular driver (e.g. headless driver) doesn't have concept of maximizing it
-
# may not support this method.
-
#
-
# @macro about_current
-
#
-
1
def maximize
-
@driver.maximize_window(handle)
-
end
-
-
1
def eql?(other)
-
other.kind_of?(self.class) && @session == other.session && @handle == other.handle
-
end
-
1
alias_method :==, :eql?
-
-
1
def hash
-
@session.hash ^ @handle.hash
-
end
-
-
1
def inspect
-
"#<Window @handle=#{@handle.inspect}>"
-
end
-
-
1
private
-
-
1
def raise_unless_current(what)
-
unless current?
-
raise Capybara::WindowError, "#{what} not current window is not possible."
-
end
-
end
-
end
-
end
-
1
class Devise::SessionsController < DeviseController
-
1
prepend_before_action :require_no_authentication, only: [:new, :create]
-
1
prepend_before_action :allow_params_authentication!, only: :create
-
1
prepend_before_action :verify_signed_out_user, only: :destroy
-
1
prepend_before_action only: [:create, :destroy] { request.env["devise.skip_timeout"] = true }
-
-
# GET /resource/sign_in
-
1
def new
-
19
self.resource = resource_class.new(sign_in_params)
-
19
clean_up_passwords(resource)
-
19
yield resource if block_given?
-
19
respond_with(resource, serialize_options(resource))
-
end
-
-
# POST /resource/sign_in
-
1
def create
-
self.resource = warden.authenticate!(auth_options)
-
set_flash_message!(:notice, :signed_in)
-
sign_in(resource_name, resource)
-
yield resource if block_given?
-
respond_with resource, location: after_sign_in_path_for(resource)
-
end
-
-
# DELETE /resource/sign_out
-
1
def destroy
-
signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
-
set_flash_message! :notice, :signed_out if signed_out
-
yield if block_given?
-
respond_to_on_destroy
-
end
-
-
1
protected
-
-
1
def sign_in_params
-
19
devise_parameter_sanitizer.sanitize(:sign_in)
-
end
-
-
1
def serialize_options(resource)
-
19
methods = resource_class.authentication_keys.dup
-
19
methods = methods.keys if methods.is_a?(Hash)
-
19
methods << :password if resource.respond_to?(:password)
-
19
{ methods: methods, only: [:password] }
-
end
-
-
1
def auth_options
-
{ scope: resource_name, recall: "#{controller_path}#new" }
-
end
-
-
1
def translation_scope
-
'devise.sessions'
-
end
-
-
1
private
-
-
# Check if there is no signed in user before doing the sign out.
-
#
-
# If there is no signed in user, it will set the flash message and redirect
-
# to the after_sign_out path.
-
1
def verify_signed_out_user
-
if all_signed_out?
-
set_flash_message! :notice, :already_signed_out
-
-
respond_to_on_destroy
-
end
-
end
-
-
1
def all_signed_out?
-
users = Devise.mappings.keys.map { |s| warden.user(scope: s, run_callbacks: false) }
-
-
users.all?(&:blank?)
-
end
-
-
1
def respond_to_on_destroy
-
# We actually need to hardcode this as Rails default responder doesn't
-
# support returning empty response on GET request
-
respond_to do |format|
-
format.all { head :no_content }
-
format.any(*navigational_formats) { redirect_to after_sign_out_path_for(resource_name) }
-
end
-
end
-
end
-
# All Devise controllers are inherited from here.
-
1
class DeviseController < Devise.parent_controller.constantize
-
1
include Devise::Controllers::ScopedViews
-
-
1
if respond_to?(:helper)
-
1
helper DeviseHelper
-
end
-
-
1
if respond_to?(:helper_method)
-
1
helpers = %w(resource scope_name resource_name signed_in_resource
-
resource_class resource_params devise_mapping)
-
1
helper_method(*helpers)
-
end
-
-
1
prepend_before_action :assert_is_devise_resource!
-
1
respond_to :html if mimes_for_respond_to.empty?
-
-
# Override prefixes to consider the scoped view.
-
# Notice we need to check for the request due to a bug in
-
# Action Controller tests that forces _prefixes to be
-
# loaded before even having a request object.
-
#
-
# This method should be public as it is is in ActionPack
-
# itself. Changing its visibility may break other gems.
-
1
def _prefixes #:nodoc:
-
@_prefixes ||= if self.class.scoped_views? && request && devise_mapping
-
["#{devise_mapping.scoped_path}/#{controller_name}"] + super
-
else
-
19
super
-
38
end
-
end
-
-
1
protected
-
-
# Gets the actual resource stored in the instance variable
-
1
def resource
-
76
instance_variable_get(:"@#{resource_name}")
-
end
-
-
# Proxy to devise map name
-
1
def resource_name
-
209
devise_mapping.name
-
end
-
1
alias :scope_name :resource_name
-
-
# Proxy to devise map class
-
1
def resource_class
-
57
devise_mapping.to
-
end
-
-
# Returns a signed in resource from session (if one exists)
-
1
def signed_in_resource
-
warden.authenticate(scope: resource_name)
-
end
-
-
# Attempt to find the mapped route for devise based on request path
-
1
def devise_mapping
-
437
@devise_mapping ||= request.env["devise.mapping"]
-
end
-
-
# Checks whether it's a devise mapped resource or not.
-
1
def assert_is_devise_resource! #:nodoc:
-
unknown_action! <<-MESSAGE unless devise_mapping
-
Could not find devise mapping for path #{request.fullpath.inspect}.
-
This may happen for two reasons:
-
-
1) You forgot to wrap your route inside the scope block. For example:
-
-
devise_scope :user do
-
get "/some/route" => "some_devise_controller"
-
end
-
-
2) You are testing a Devise controller bypassing the router.
-
If so, you can explicitly tell Devise which mapping to use:
-
-
@request.env["devise.mapping"] = Devise.mappings[:user]
-
-
38
MESSAGE
-
end
-
-
# Returns real navigational formats which are supported by Rails
-
1
def navigational_formats
-
@navigational_formats ||= Devise.navigational_formats.select { |format| Mime::EXTENSION_LOOKUP[format.to_s] }
-
end
-
-
1
def unknown_action!(msg)
-
logger.debug "[Devise] #{msg}" if logger
-
raise AbstractController::ActionNotFound, msg
-
end
-
-
# Sets the resource creating an instance variable
-
1
def resource=(new_resource)
-
19
instance_variable_set(:"@#{resource_name}", new_resource)
-
end
-
-
# Helper for use in before_actions where no authentication is required.
-
#
-
# Example:
-
# before_action :require_no_authentication, only: :new
-
1
def require_no_authentication
-
19
assert_is_devise_resource!
-
19
return unless is_navigational_format?
-
19
no_input = devise_mapping.no_input_strategies
-
-
19
authenticated = if no_input.present?
-
19
args = no_input.dup.push scope: resource_name
-
19
warden.authenticate?(*args)
-
else
-
warden.authenticated?(resource_name)
-
end
-
-
19
if authenticated && resource = warden.user(resource_name)
-
flash[:alert] = I18n.t("devise.failure.already_authenticated")
-
redirect_to after_sign_in_path_for(resource)
-
end
-
end
-
-
# Helper for use after calling send_*_instructions methods on a resource.
-
# If we are in paranoid mode, we always act as if the resource was valid
-
# and instructions were sent.
-
1
def successfully_sent?(resource)
-
notice = if Devise.paranoid
-
resource.errors.clear
-
:send_paranoid_instructions
-
elsif resource.errors.empty?
-
:send_instructions
-
end
-
-
if notice
-
set_flash_message! :notice, notice
-
true
-
end
-
end
-
-
# Sets the flash message with :key, using I18n. By default you are able
-
# to set up your messages using specific resource scope, and if no message is
-
# found we look to the default scope. Set the "now" options key to a true
-
# value to populate the flash.now hash in lieu of the default flash hash (so
-
# the flash message will be available to the current action instead of the
-
# next action).
-
# Example (i18n locale file):
-
#
-
# en:
-
# devise:
-
# passwords:
-
# #default_scope_messages - only if resource_scope is not found
-
# user:
-
# #resource_scope_messages
-
#
-
# Please refer to README or en.yml locale file to check what messages are
-
# available.
-
1
def set_flash_message(key, kind, options = {})
-
message = find_message(kind, options)
-
if options[:now]
-
flash.now[key] = message if message.present?
-
else
-
flash[key] = message if message.present?
-
end
-
end
-
-
# Sets flash message if is_flashing_format? equals true
-
1
def set_flash_message!(key, kind, options = {})
-
if is_flashing_format?
-
set_flash_message(key, kind, options)
-
end
-
end
-
-
# Sets minimum password length to show to user
-
1
def set_minimum_password_length
-
if devise_mapping.validatable?
-
@minimum_password_length = resource_class.password_length.min
-
end
-
end
-
-
1
def devise_i18n_options(options)
-
options
-
end
-
-
# Get message for given
-
1
def find_message(kind, options = {})
-
options[:scope] ||= translation_scope
-
options[:default] = Array(options[:default]).unshift(kind.to_sym)
-
options[:resource_name] = resource_name
-
options = devise_i18n_options(options)
-
I18n.t("#{options[:resource_name]}.#{kind}", options)
-
end
-
-
# Controllers inheriting DeviseController are advised to override this
-
# method so that other controllers inheriting from them would use
-
# existing translations.
-
1
def translation_scope
-
"devise.#{controller_name}"
-
end
-
-
1
def clean_up_passwords(object)
-
19
object.clean_up_passwords if object.respond_to?(:clean_up_passwords)
-
end
-
-
1
def respond_with_navigational(*args, &block)
-
respond_with(*args) do |format|
-
format.any(*navigational_formats, &block)
-
end
-
end
-
-
1
def resource_params
-
params.fetch(resource_name, {})
-
end
-
-
1
ActiveSupport.run_load_hooks(:devise_controller, self)
-
end
-
1
module DeviseHelper
-
# A simple way to show error messages for the current devise resource. If you need
-
# to customize this method, you can either overwrite it in your application helpers or
-
# copy the views to your application.
-
#
-
# This method is intended to stay simple and it is unlikely that we are going to change
-
# it to add more behavior or options.
-
1
def devise_error_messages!
-
return "" if resource.errors.empty?
-
-
messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
-
sentence = I18n.t("errors.messages.not_saved",
-
count: resource.errors.count,
-
resource: resource.class.model_name.human.downcase)
-
-
html = <<-HTML
-
<div id="error_explanation">
-
<h2>#{sentence}</h2>
-
<ul>#{messages}</ul>
-
</div>
-
HTML
-
-
html.html_safe
-
end
-
end
-
1
module Devise
-
1
module Controllers
-
1
module ScopedViews
-
1
extend ActiveSupport::Concern
-
-
1
module ClassMethods
-
1
def scoped_views?
-
19
defined?(@scoped_views) ? @scoped_views : Devise.scoped_views
-
end
-
-
1
def scoped_views=(value)
-
@scoped_views = value
-
end
-
end
-
end
-
end
-
end
-
1
module Devise
-
1
module Controllers
-
# Create url helpers to be used with resource/scope configuration. Acts as
-
# proxies to the generated routes created by devise.
-
# Resource param can be a string or symbol, a class, or an instance object.
-
# Example using a :user resource:
-
#
-
# new_session_path(:user) => new_user_session_path
-
# session_path(:user) => user_session_path
-
# destroy_session_path(:user) => destroy_user_session_path
-
#
-
# new_password_path(:user) => new_user_password_path
-
# password_path(:user) => user_password_path
-
# edit_password_path(:user) => edit_user_password_path
-
#
-
# new_confirmation_path(:user) => new_user_confirmation_path
-
# confirmation_path(:user) => user_confirmation_path
-
#
-
# Those helpers are included by default to ActionController::Base.
-
#
-
# In case you want to add such helpers to another class, you can do
-
# that as long as this new class includes both url_helpers and
-
# mounted_helpers. Example:
-
#
-
# include Rails.application.routes.url_helpers
-
# include Rails.application.routes.mounted_helpers
-
#
-
1
module UrlHelpers
-
1
def self.remove_helpers!
-
2
self.instance_methods.map(&:to_s).grep(/_(url|path)$/).each do |method|
-
48
remove_method method
-
end
-
end
-
-
1
def self.generate_helpers!(routes=nil)
-
routes ||= begin
-
2
mappings = Devise.mappings.values.map(&:used_helpers).flatten.uniq
-
2
Devise::URL_HELPERS.slice(*mappings)
-
3
end
-
-
3
routes.each do |module_name, actions|
-
12
[:path, :url].each do |path_or_url|
-
24
actions.each do |action|
-
68
action = action ? "#{action}_" : ""
-
68
method = :"#{action}#{module_name}_#{path_or_url}"
-
-
68
define_method method do |resource_or_scope, *args|
-
57
scope = Devise::Mapping.find_scope!(resource_or_scope)
-
57
router_name = Devise.mappings[scope].router_name
-
57
context = router_name ? send(router_name) : _devise_route_context
-
57
context.send("#{action}#{scope}_#{module_name}_#{path_or_url}", *args)
-
end
-
end
-
end
-
end
-
end
-
-
1
generate_helpers!(Devise::URL_HELPERS)
-
-
1
private
-
-
1
def _devise_route_context
-
57
@_devise_route_context ||= send(Devise.available_router_name)
-
end
-
end
-
end
-
end
-
1
module Devise
-
# Checks the scope in the given environment and returns the associated failure app.
-
1
class Delegator
-
1
def call(env)
-
1
failure_app(env).call(env)
-
end
-
-
1
def failure_app(env)
-
1
app = env["warden.options"] &&
-
1
(scope = env["warden.options"][:scope]) &&
-
Devise.mappings[scope.to_sym].failure_app
-
-
1
app || Devise::FailureApp
-
end
-
end
-
end
-
1
require 'bcrypt'
-
-
1
module Devise
-
1
module Encryptor
-
1
def self.digest(klass, password)
-
43
if klass.pepper.present?
-
password = "#{password}#{klass.pepper}"
-
end
-
43
::BCrypt::Password.create(password, cost: klass.stretches).to_s
-
end
-
-
1
def self.compare(klass, hashed_password, password)
-
return false if hashed_password.blank?
-
bcrypt = ::BCrypt::Password.new(hashed_password)
-
if klass.pepper.present?
-
password = "#{password}#{klass.pepper}"
-
end
-
password = ::BCrypt::Engine.hash_secret(password, bcrypt.salt)
-
Devise.secure_compare(password, hashed_password)
-
end
-
end
-
end
-
1
require "action_controller/metal"
-
-
1
module Devise
-
# Failure application that will be called every time :warden is thrown from
-
# any strategy or hook. Responsible for redirect the user to the sign in
-
# page based on current scope and mapping. If no scope is given, redirect
-
# to the default_url.
-
1
class FailureApp < ActionController::Metal
-
1
include ActionController::UrlFor
-
1
include ActionController::Redirecting
-
-
1
include Rails.application.routes.url_helpers
-
1
include Rails.application.routes.mounted_helpers
-
-
1
include Devise::Controllers::StoreLocation
-
-
1
delegate :flash, to: :request
-
-
1
def self.call(env)
-
1
@respond ||= action(:respond)
-
1
@respond.call(env)
-
end
-
-
# Try retrieving the URL options from the parent controller (usually
-
# ApplicationController). Instance methods are not supported at the moment,
-
# so only the class-level attribute is used.
-
1
def self.default_url_options(*args)
-
1
if defined?(Devise.parent_controller.constantize)
-
1
Devise.parent_controller.constantize.try(:default_url_options) || {}
-
else
-
{}
-
end
-
end
-
-
1
def respond
-
1
if http_auth?
-
http_auth
-
1
elsif warden_options[:recall]
-
recall
-
else
-
1
redirect
-
end
-
end
-
-
1
def http_auth
-
self.status = 401
-
self.headers["WWW-Authenticate"] = %(Basic realm=#{Devise.http_authentication_realm.inspect}) if http_auth_header?
-
self.content_type = request.format.to_s
-
self.response_body = http_auth_body
-
end
-
-
1
def recall
-
config = Rails.application.config
-
-
header_info = if config.try(:relative_url_root)
-
base_path = Pathname.new(config.relative_url_root)
-
full_path = Pathname.new(attempted_path)
-
-
{ "SCRIPT_NAME" => config.relative_url_root,
-
"PATH_INFO" => '/' + full_path.relative_path_from(base_path).to_s }
-
else
-
{ "PATH_INFO" => attempted_path }
-
end
-
-
header_info.each do | var, value|
-
if request.respond_to?(:set_header)
-
request.set_header(var, value)
-
else
-
env[var] = value
-
end
-
end
-
-
flash.now[:alert] = i18n_message(:invalid) if is_flashing_format?
-
# self.response = recall_app(warden_options[:recall]).call(env)
-
self.response = recall_app(warden_options[:recall]).call(request.env)
-
end
-
-
1
def redirect
-
1
store_location!
-
1
if is_flashing_format?
-
1
if flash[:timedout] && flash[:alert]
-
flash.keep(:timedout)
-
flash.keep(:alert)
-
else
-
1
flash[:alert] = i18n_message
-
end
-
end
-
1
redirect_to redirect_url
-
end
-
-
1
protected
-
-
1
def i18n_options(options)
-
1
options
-
end
-
-
1
def i18n_message(default = nil)
-
1
message = warden_message || default || :unauthenticated
-
-
1
if message.is_a?(Symbol)
-
1
options = {}
-
1
options[:resource_name] = scope
-
1
options[:scope] = "devise.failure"
-
1
options[:default] = [message]
-
1
auth_keys = scope_class.authentication_keys
-
2
keys = (auth_keys.respond_to?(:keys) ? auth_keys.keys : auth_keys).map { |key| scope_class.human_attribute_name(key) }
-
1
options[:authentication_keys] = keys.join(I18n.translate(:"support.array.words_connector"))
-
1
options = i18n_options(options)
-
-
1
I18n.t(:"#{scope}.#{message}", options)
-
else
-
message.to_s
-
end
-
end
-
-
1
def redirect_url
-
1
if warden_message == :timeout
-
flash[:timedout] = true if is_flashing_format?
-
-
path = if request.get?
-
attempted_path
-
else
-
request.referrer
-
end
-
-
path || scope_url
-
else
-
1
scope_url
-
end
-
end
-
-
1
def route(scope)
-
1
:"new_#{scope}_session_url"
-
end
-
-
1
def scope_url
-
1
opts = {}
-
1
route = route(scope)
-
1
opts[:format] = request_format unless skip_format?
-
-
1
config = Rails.application.config
-
-
1
if config.respond_to?(:relative_url_root)
-
# Rails 4.2 goes into an infinite loop if opts[:script_name] is unset
-
1
rails_4_2 = (Rails::VERSION::MAJOR >= 4) && (Rails::VERSION::MINOR >= 2)
-
1
if config.relative_url_root.present? || rails_4_2
-
1
opts[:script_name] = config.relative_url_root
-
end
-
end
-
-
1
router_name = Devise.mappings[scope].router_name || Devise.available_router_name
-
1
context = send(router_name)
-
-
1
if context.respond_to?(route)
-
1
context.send(route, opts)
-
elsif respond_to?(:root_url)
-
root_url(opts)
-
else
-
"/"
-
end
-
end
-
-
1
def skip_format?
-
1
%w(html */*).include? request_format.to_s
-
end
-
-
# Choose whether we should respond in a http authentication fashion,
-
# including 401 and optional headers.
-
#
-
# This method allows the user to explicitly disable http authentication
-
# on ajax requests in case they want to redirect on failures instead of
-
# handling the errors on their own. This is useful in case your ajax API
-
# is the same as your public API and uses a format like JSON (so you
-
# cannot mark JSON as a navigational format).
-
1
def http_auth?
-
2
if request.xhr?
-
Devise.http_authenticatable_on_xhr
-
else
-
2
!(request_format && is_navigational_format?)
-
end
-
end
-
-
# It does not make sense to send authenticate headers in ajax requests
-
# or if the user disabled them.
-
1
def http_auth_header?
-
scope_class.http_authenticatable && !request.xhr?
-
end
-
-
1
def http_auth_body
-
return i18n_message unless request_format
-
method = "to_#{request_format}"
-
if method == "to_xml"
-
{ error: i18n_message }.to_xml(root: "errors")
-
elsif {}.respond_to?(method)
-
{ error: i18n_message }.send(method)
-
else
-
i18n_message
-
end
-
end
-
-
1
def recall_app(app)
-
controller, action = app.split("#")
-
controller_name = ActiveSupport::Inflector.camelize(controller)
-
controller_klass = ActiveSupport::Inflector.constantize("#{controller_name}Controller")
-
controller_klass.action(action)
-
end
-
-
1
def warden
-
2
request.respond_to?(:get_header) ? request.get_header("warden") : env["warden"]
-
end
-
-
1
def warden_options
-
5
request.respond_to?(:get_header) ? request.get_header("warden.options") : env["warden.options"]
-
end
-
-
1
def warden_message
-
2
@message ||= warden.message || warden_options[:message]
-
end
-
-
1
def scope
-
6
@scope ||= warden_options[:scope] || Devise.default_scope
-
end
-
-
1
def scope_class
-
2
@scope_class ||= Devise.mappings[scope].to
-
end
-
-
1
def attempted_path
-
1
warden_options[:attempted_path]
-
end
-
-
# Stores requested uri to redirect the user after signing in. We cannot use
-
# scoped session provided by warden here, since the user is not authenticated
-
# yet, but we still need to store the uri based on scope, so different scopes
-
# would never use the same uri to redirect.
-
1
def store_location!
-
1
store_location_for(scope, attempted_path) if request.get? && !http_auth?
-
end
-
-
1
def is_navigational_format?
-
3
Devise.navigational_formats.include?(request_format)
-
end
-
-
# Check if flash messages should be emitted. Default is to do it on
-
# navigational formats
-
1
def is_flashing_format?
-
1
is_navigational_format?
-
end
-
-
1
def request_format
-
6
@request_format ||= request.format.try(:ref)
-
end
-
end
-
end
-
# Before logout hook to forget the user in the given scope, if it responds
-
# to forget_me! Also clear remember token to ensure the user won't be
-
# remembered again. Notice that we forget the user unless the record is not persisted.
-
# This avoids forgetting deleted users.
-
1
Warden::Manager.before_logout do |record, warden, options|
-
if record.respond_to?(:forget_me!)
-
Devise::Hooks::Proxy.new(warden).forget_me(record)
-
end
-
end
-
1
Warden::Manager.after_set_user except: :fetch do |record, warden, options|
-
scope = options[:scope]
-
if record.respond_to?(:remember_me) && options[:store] != false &&
-
record.remember_me && warden.authenticated?(scope)
-
Devise::Hooks::Proxy.new(warden).remember_me(record)
-
end
-
end
-
# After each sign in, update sign in time, sign in count and sign in IP.
-
# This is only triggered when the user is explicitly set (with set_user)
-
# and on authentication. Retrieving the user from session (:fetch) does
-
# not trigger it.
-
1
Warden::Manager.after_set_user except: :fetch do |record, warden, options|
-
if record.respond_to?(:update_tracked_fields!) && warden.authenticated?(options[:scope]) && !warden.request.env['devise.skip_trackable']
-
record.update_tracked_fields!(warden.request)
-
end
-
end
-
1
require 'devise/strategies/database_authenticatable'
-
-
1
module Devise
-
1
def self.bcrypt(klass, password)
-
ActiveSupport::Deprecation.warn "Devise.bcrypt is deprecated; use Devise::Encryptor.digest instead"
-
Devise::Encryptor.digest(klass, password)
-
end
-
-
1
module Models
-
# Authenticatable Module, responsible for hashing the password and
-
# validating the authenticity of a user while signing in.
-
#
-
# == Options
-
#
-
# DatabaseAuthenticatable adds the following options to devise_for:
-
#
-
# * +pepper+: a random string used to provide a more secure hash. Use
-
# `rake secret` to generate new keys.
-
#
-
# * +stretches+: the cost given to bcrypt.
-
#
-
# == Examples
-
#
-
# User.find(1).valid_password?('password123') # returns true/false
-
#
-
1
module DatabaseAuthenticatable
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
after_update :send_password_change_notification, if: :send_password_change_notification?
-
-
1
attr_reader :password, :current_password
-
1
attr_accessor :password_confirmation
-
end
-
-
1
def self.required_fields(klass)
-
[:encrypted_password] + klass.authentication_keys
-
end
-
-
# Generates a hashed password based on the given value.
-
# For legacy reasons, we use `encrypted_password` to store
-
# the hashed password.
-
1
def password=(new_password)
-
62
@password = new_password
-
62
self.encrypted_password = password_digest(@password) if @password.present?
-
end
-
-
# Verifies whether a password (ie from sign in) is the user password.
-
1
def valid_password?(password)
-
Devise::Encryptor.compare(self.class, encrypted_password, password)
-
end
-
-
# Set password and password confirmation to nil
-
1
def clean_up_passwords
-
19
self.password = self.password_confirmation = nil
-
end
-
-
# Update record attributes when :current_password matches, otherwise
-
# returns error on :current_password.
-
#
-
# This method also rejects the password field if it is blank (allowing
-
# users to change relevant information like the e-mail without changing
-
# their password). In case the password field is rejected, the confirmation
-
# is also rejected as long as it is also blank.
-
1
def update_with_password(params, *options)
-
current_password = params.delete(:current_password)
-
-
if params[:password].blank?
-
params.delete(:password)
-
params.delete(:password_confirmation) if params[:password_confirmation].blank?
-
end
-
-
result = if valid_password?(current_password)
-
update_attributes(params, *options)
-
else
-
self.assign_attributes(params, *options)
-
self.valid?
-
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
-
false
-
end
-
-
clean_up_passwords
-
result
-
end
-
-
# Updates record attributes without asking for the current password.
-
# Never allows a change to the current password. If you are using this
-
# method, you should probably override this method to protect other
-
# attributes you would not like to be updated without a password.
-
#
-
# Example:
-
#
-
# def update_without_password(params, *options)
-
# params.delete(:email)
-
# super(params)
-
# end
-
#
-
1
def update_without_password(params, *options)
-
params.delete(:password)
-
params.delete(:password_confirmation)
-
-
result = update_attributes(params, *options)
-
clean_up_passwords
-
result
-
end
-
-
# Destroy record when :current_password matches, otherwise returns
-
# error on :current_password. It also automatically rejects
-
# :current_password if it is blank.
-
1
def destroy_with_password(current_password)
-
result = if valid_password?(current_password)
-
destroy
-
else
-
self.valid?
-
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
-
false
-
end
-
-
result
-
end
-
-
# A callback initiated after successfully authenticating. This can be
-
# used to insert your own logic that is only run after the user successfully
-
# authenticates.
-
#
-
# Example:
-
#
-
# def after_database_authentication
-
# self.update_attribute(:invite_code, nil)
-
# end
-
#
-
1
def after_database_authentication
-
end
-
-
# A reliable way to expose the salt regardless of the implementation.
-
1
def authenticatable_salt
-
4
encrypted_password[0,29] if encrypted_password
-
end
-
-
1
def send_password_change_notification
-
send_devise_notification(:password_change)
-
end
-
-
1
protected
-
-
# Hashes the password using bcrypt. Custom hash functions should override
-
# this method to apply their own algorithm.
-
#
-
# See https://github.com/plataformatec/devise-encryptable for examples
-
# of other hashing engines.
-
1
def password_digest(password)
-
43
Devise::Encryptor.digest(self.class, password)
-
end
-
-
1
def send_password_change_notification?
-
16
self.class.send_password_change_notification && encrypted_password_changed?
-
end
-
-
1
module ClassMethods
-
1
Devise::Models.config(self, :pepper, :stretches, :send_password_change_notification)
-
-
# We assume this method already gets the sanitized values from the
-
# DatabaseAuthenticatable strategy. If you are using this method on
-
# your own, be sure to sanitize the conditions hash to only include
-
# the proper fields.
-
1
def find_for_database_authentication(conditions)
-
find_for_authentication(conditions)
-
end
-
end
-
end
-
end
-
end
-
1
module Devise
-
1
module Models
-
-
# Recoverable takes care of resetting the user password and send reset instructions.
-
#
-
# ==Options
-
#
-
# Recoverable adds the following options to devise_for:
-
#
-
# * +reset_password_keys+: the keys you want to use when recovering the password for an account
-
# * +reset_password_within+: the time period within which the password must be reset or the token expires.
-
# * +sign_in_after_reset_password+: whether or not to sign in the user automatically after a password reset.
-
#
-
# == Examples
-
#
-
# # resets the user password and save the record, true if valid passwords are given, otherwise false
-
# User.find(1).reset_password('password123', 'password123')
-
#
-
# # creates a new token and send it with instructions about how to reset the password
-
# User.find(1).send_reset_password_instructions
-
#
-
1
module Recoverable
-
1
extend ActiveSupport::Concern
-
-
1
def self.required_fields(klass)
-
[:reset_password_sent_at, :reset_password_token]
-
end
-
-
1
included do
-
1
before_update do
-
16
if (respond_to?(:email_changed?) && email_changed?) || encrypted_password_changed?
-
clear_reset_password_token
-
end
-
end
-
end
-
-
# Update password saving the record and clearing token. Returns true if
-
# the passwords are valid and the record was saved, false otherwise.
-
1
def reset_password(new_password, new_password_confirmation)
-
self.password = new_password
-
self.password_confirmation = new_password_confirmation
-
-
if respond_to?(:after_password_reset) && valid?
-
ActiveSupport::Deprecation.warn "after_password_reset is deprecated"
-
after_password_reset
-
end
-
-
save
-
end
-
-
1
def reset_password!(new_password, new_password_confirmation)
-
ActiveSupport::Deprecation.warn "reset_password! is deprecated in favor of reset_password"
-
reset_password(new_password, new_password_confirmation)
-
end
-
-
# Resets reset password token and send reset password instructions by email.
-
# Returns the token sent in the e-mail.
-
1
def send_reset_password_instructions
-
token = set_reset_password_token
-
send_reset_password_instructions_notification(token)
-
-
token
-
end
-
-
# Checks if the reset password token sent is within the limit time.
-
# We do this by calculating if the difference between today and the
-
# sending date does not exceed the confirm in time configured.
-
# Returns true if the resource is not responding to reset_password_sent_at at all.
-
# reset_password_within is a model configuration, must always be an integer value.
-
#
-
# Example:
-
#
-
# # reset_password_within = 1.day and reset_password_sent_at = today
-
# reset_password_period_valid? # returns true
-
#
-
# # reset_password_within = 5.days and reset_password_sent_at = 4.days.ago
-
# reset_password_period_valid? # returns true
-
#
-
# # reset_password_within = 5.days and reset_password_sent_at = 5.days.ago
-
# reset_password_period_valid? # returns false
-
#
-
# # reset_password_within = 0.days
-
# reset_password_period_valid? # will always return false
-
#
-
1
def reset_password_period_valid?
-
reset_password_sent_at && reset_password_sent_at.utc >= self.class.reset_password_within.ago.utc
-
end
-
-
1
protected
-
-
# Removes reset_password token
-
1
def clear_reset_password_token
-
self.reset_password_token = nil
-
self.reset_password_sent_at = nil
-
end
-
-
1
def set_reset_password_token
-
raw, enc = Devise.token_generator.generate(self.class, :reset_password_token)
-
-
self.reset_password_token = enc
-
self.reset_password_sent_at = Time.now.utc
-
save(validate: false)
-
raw
-
end
-
-
1
def send_reset_password_instructions_notification(token)
-
send_devise_notification(:reset_password_instructions, token, {})
-
end
-
-
1
module ClassMethods
-
# Attempt to find a user by password reset token. If a user is found, return it
-
# If a user is not found, return nil
-
1
def with_reset_password_token(token)
-
reset_password_token = Devise.token_generator.digest(self, :reset_password_token, token)
-
to_adapter.find_first(reset_password_token: reset_password_token)
-
end
-
-
# Attempt to find a user by its email. If a record is found, send new
-
# password instructions to it. If user is not found, returns a new user
-
# with an email not found error.
-
# Attributes must contain the user's email
-
1
def send_reset_password_instructions(attributes={})
-
recoverable = find_or_initialize_with_errors(reset_password_keys, attributes, :not_found)
-
recoverable.send_reset_password_instructions if recoverable.persisted?
-
recoverable
-
end
-
-
# Attempt to find a user by its reset_password_token to reset its
-
# password. If a user is found and token is still valid, reset its password and automatically
-
# try saving the record. If not user is found, returns a new user
-
# containing an error in reset_password_token attribute.
-
# Attributes must contain reset_password_token, password and confirmation
-
1
def reset_password_by_token(attributes={})
-
original_token = attributes[:reset_password_token]
-
reset_password_token = Devise.token_generator.digest(self, :reset_password_token, original_token)
-
-
recoverable = find_or_initialize_with_error_by(:reset_password_token, reset_password_token)
-
-
if recoverable.persisted?
-
if recoverable.reset_password_period_valid?
-
recoverable.reset_password(attributes[:password], attributes[:password_confirmation])
-
else
-
recoverable.errors.add(:reset_password_token, :expired)
-
end
-
end
-
-
recoverable.reset_password_token = original_token if recoverable.reset_password_token.present?
-
recoverable
-
end
-
-
1
Devise::Models.config(self, :reset_password_keys, :reset_password_within, :sign_in_after_reset_password)
-
end
-
end
-
end
-
end
-
1
module Devise
-
1
module Models
-
# Registerable is responsible for everything related to registering a new
-
# resource (ie user sign up).
-
1
module Registerable
-
1
extend ActiveSupport::Concern
-
-
1
def self.required_fields(klass)
-
[]
-
end
-
-
1
module ClassMethods
-
# A convenience method that receives both parameters and session to
-
# initialize a user. This can be used by OAuth, for example, to send
-
# in the user token and be stored on initialization.
-
#
-
# By default discards all information sent by the session by calling
-
# new with params.
-
1
def new_with_session(params, session)
-
new(params)
-
end
-
end
-
end
-
end
-
end
-
1
require 'devise/strategies/rememberable'
-
1
require 'devise/hooks/rememberable'
-
1
require 'devise/hooks/forgetable'
-
-
1
module Devise
-
1
module Models
-
# Rememberable manages generating and clearing token for remember the user
-
# from a saved cookie. Rememberable also has utility methods for dealing
-
# with serializing the user into the cookie and back from the cookie, trying
-
# to lookup the record based on the saved information.
-
# You probably wouldn't use rememberable methods directly, they are used
-
# mostly internally for handling the remember token.
-
#
-
# == Options
-
#
-
# Rememberable adds the following options in devise_for:
-
#
-
# * +remember_for+: the time you want the user will be remembered without
-
# asking for credentials. After this time the user will be blocked and
-
# will have to enter their credentials again. This configuration is also
-
# used to calculate the expires time for the cookie created to remember
-
# the user. By default remember_for is 2.weeks.
-
#
-
# * +extend_remember_period+: if true, extends the user's remember period
-
# when remembered via cookie. False by default.
-
#
-
# * +rememberable_options+: configuration options passed to the created cookie.
-
#
-
# == Examples
-
#
-
# User.find(1).remember_me! # regenerating the token
-
# User.find(1).forget_me! # clearing the token
-
#
-
# # generating info to put into cookies
-
# User.serialize_into_cookie(user)
-
#
-
# # lookup the user based on the incoming cookie information
-
# User.serialize_from_cookie(cookie_string)
-
1
module Rememberable
-
1
extend ActiveSupport::Concern
-
-
1
attr_accessor :remember_me
-
-
1
def self.required_fields(klass)
-
[:remember_created_at]
-
end
-
-
1
def remember_me!
-
self.remember_token = self.class.remember_token if respond_to?(:remember_token)
-
self.remember_created_at ||= Time.now.utc
-
save(validate: false) if self.changed?
-
end
-
-
# If the record is persisted, remove the remember token (but only if
-
# it exists), and save the record without validations.
-
1
def forget_me!
-
return unless persisted?
-
self.remember_token = nil if respond_to?(:remember_token)
-
self.remember_created_at = nil if self.class.expire_all_remember_me_on_sign_out
-
save(validate: false)
-
end
-
-
1
def remember_expires_at
-
self.class.remember_for.from_now
-
end
-
-
1
def extend_remember_period
-
self.class.extend_remember_period
-
end
-
-
1
def rememberable_value
-
if respond_to?(:remember_token)
-
remember_token
-
elsif respond_to?(:authenticatable_salt) && (salt = authenticatable_salt.presence)
-
salt
-
else
-
raise "authenticable_salt returned nil for the #{self.class.name} model. " \
-
"In order to use rememberable, you must ensure a password is always set " \
-
"or have a remember_token column in your model or implement your own " \
-
"rememberable_value in the model with custom logic."
-
end
-
end
-
-
1
def rememberable_options
-
self.class.rememberable_options
-
end
-
-
# A callback initiated after successfully being remembered. This can be
-
# used to insert your own logic that is only run after the user is
-
# remembered.
-
#
-
# Example:
-
#
-
# def after_remembered
-
# self.update_attribute(:invite_code, nil)
-
# end
-
#
-
1
def after_remembered
-
end
-
-
1
def remember_me?(token, generated_at)
-
# TODO: Normalize the JSON type coercion along with the Timeoutable hook
-
# in a single place https://github.com/plataformatec/devise/blob/ffe9d6d406e79108cf32a2c6a1d0b3828849c40b/lib/devise/hooks/timeoutable.rb#L14-L18
-
if generated_at.is_a?(String)
-
generated_at = time_from_json(generated_at)
-
end
-
-
# The token is only valid if:
-
# 1. we have a date
-
# 2. the current time does not pass the expiry period
-
# 3. the record has a remember_created_at date
-
# 4. the token date is bigger than the remember_created_at
-
# 5. the token matches
-
generated_at.is_a?(Time) &&
-
(self.class.remember_for.ago < generated_at) &&
-
(generated_at > (remember_created_at || Time.now).utc) &&
-
Devise.secure_compare(rememberable_value, token)
-
end
-
-
1
private
-
-
1
def time_from_json(value)
-
if value =~ /\A\d+\.\d+\Z/
-
Time.at(value.to_f)
-
else
-
Time.parse(value) rescue nil
-
end
-
end
-
-
1
module ClassMethods
-
# Create the cookie key using the record id and remember_token
-
1
def serialize_into_cookie(record)
-
[record.to_key, record.rememberable_value, Time.now.utc.to_f.to_s]
-
end
-
-
# Recreate the user based on the stored cookie
-
1
def serialize_from_cookie(*args)
-
id, token, generated_at = *args
-
-
record = to_adapter.get(id)
-
record if record && record.remember_me?(token, generated_at)
-
end
-
-
# Generate a token checking if one does not already exist in the database.
-
1
def remember_token #:nodoc:
-
loop do
-
token = Devise.friendly_token
-
break token unless to_adapter.find_first({ remember_token: token })
-
end
-
end
-
-
1
Devise::Models.config(self, :remember_for, :extend_remember_period, :rememberable_options, :expire_all_remember_me_on_sign_out)
-
end
-
end
-
end
-
end
-
1
require 'devise/hooks/trackable'
-
-
1
module Devise
-
1
module Models
-
# Track information about your user sign in. It tracks the following columns:
-
#
-
# * sign_in_count - Increased every time a sign in is made (by form, openid, oauth)
-
# * current_sign_in_at - A timestamp updated when the user signs in
-
# * last_sign_in_at - Holds the timestamp of the previous sign in
-
# * current_sign_in_ip - The remote ip updated when the user sign in
-
# * last_sign_in_ip - Holds the remote ip of the previous sign in
-
#
-
1
module Trackable
-
1
def self.required_fields(klass)
-
[:current_sign_in_at, :current_sign_in_ip, :last_sign_in_at, :last_sign_in_ip, :sign_in_count]
-
end
-
-
1
def update_tracked_fields(request)
-
old_current, new_current = self.current_sign_in_at, Time.now.utc
-
self.last_sign_in_at = old_current || new_current
-
self.current_sign_in_at = new_current
-
-
old_current, new_current = self.current_sign_in_ip, request.remote_ip
-
self.last_sign_in_ip = old_current || new_current
-
self.current_sign_in_ip = new_current
-
-
self.sign_in_count ||= 0
-
self.sign_in_count += 1
-
end
-
-
1
def update_tracked_fields!(request)
-
update_tracked_fields(request)
-
save(validate: false)
-
end
-
end
-
end
-
end
-
1
module Devise
-
1
module Models
-
# Validatable creates all needed validations for a user email and password.
-
# It's optional, given you may want to create the validations by yourself.
-
# Automatically validate if the email is present, unique and its format is
-
# valid. Also tests presence of password, confirmation and length.
-
#
-
# == Options
-
#
-
# Validatable adds the following options to devise_for:
-
#
-
# * +email_regexp+: the regular expression used to validate e-mails;
-
# * +password_length+: a range expressing password length. Defaults to 8..72.
-
#
-
1
module Validatable
-
# All validations used by this module.
-
1
VALIDATIONS = [:validates_presence_of, :validates_uniqueness_of, :validates_format_of,
-
:validates_confirmation_of, :validates_length_of].freeze
-
-
1
def self.required_fields(klass)
-
[]
-
end
-
-
1
def self.included(base)
-
1
base.extend ClassMethods
-
1
assert_validations_api!(base)
-
-
1
base.class_eval do
-
1
validates_presence_of :email, if: :email_required?
-
1
validates_uniqueness_of :email, allow_blank: true, if: :email_changed?
-
1
validates_format_of :email, with: email_regexp, allow_blank: true, if: :email_changed?
-
-
1
validates_presence_of :password, if: :password_required?
-
1
validates_confirmation_of :password, if: :password_required?
-
1
validates_length_of :password, within: password_length, allow_blank: true
-
end
-
end
-
-
1
def self.assert_validations_api!(base) #:nodoc:
-
6
unavailable_validations = VALIDATIONS.select { |v| !base.respond_to?(v) }
-
-
1
unless unavailable_validations.empty?
-
raise "Could not use :validatable module since #{base} does not respond " <<
-
"to the following methods: #{unavailable_validations.to_sentence}."
-
end
-
end
-
-
1
protected
-
-
# Checks whether a password is needed or not. For validations only.
-
# Passwords are always required if it's a new record, or if the password
-
# or confirmation are being set somewhere.
-
1
def password_required?
-
30
!persisted? || !password.nil? || !password_confirmation.nil?
-
end
-
-
1
def email_required?
-
15
true
-
end
-
-
1
module ClassMethods
-
1
Devise::Models.config(self, :email_regexp, :password_length)
-
end
-
end
-
end
-
end
-
1
require 'orm_adapter/adapters/active_record'
-
-
1
ActiveRecord::Base.extend Devise::Models
-
1
module Devise
-
# The +ParameterSanitizer+ deals with permitting specific parameters values
-
# for each +Devise+ scope in the application.
-
#
-
# The sanitizer knows about Devise default parameters (like +password+ and
-
# +password_confirmation+ for the `RegistrationsController`), and you can
-
# extend or change the permitted parameters list on your controllers.
-
#
-
# === Permitting new parameters
-
#
-
# You can add new parameters to the permitted list using the +permit+ method
-
# in a +before_action+ method, for instance.
-
#
-
# class ApplicationController < ActionController::Base
-
# before_action :configure_permitted_parameters, if: :devise_controller?
-
#
-
# protected
-
#
-
# def configure_permitted_parameters
-
# # Permit the `subscribe_newsletter` parameter along with the other
-
# # sign up parameters.
-
# devise_parameter_sanitizer.permit(:sign_up, keys: [:subscribe_newsletter])
-
# end
-
# end
-
#
-
# Using a block yields an +ActionController::Parameters+ object so you can
-
# permit nested parameters and have more control over how the parameters are
-
# permitted in your controller.
-
#
-
# def configure_permitted_parameters
-
# devise_parameter_sanitizer.permit(:sign_up) do |user|
-
# user.permit(newsletter_preferences: [])
-
# end
-
# end
-
1
class ParameterSanitizer
-
1
DEFAULT_PERMITTED_ATTRIBUTES = {
-
sign_in: [:password, :remember_me],
-
sign_up: [:password, :password_confirmation],
-
account_update: [:password, :password_confirmation, :current_password]
-
}
-
-
1
def initialize(resource_class, resource_name, params)
-
19
@auth_keys = extract_auth_keys(resource_class)
-
19
@params = params
-
19
@resource_name = resource_name
-
19
@permitted = {}
-
-
19
DEFAULT_PERMITTED_ATTRIBUTES.each_pair do |action, keys|
-
57
permit(action, keys: keys)
-
end
-
end
-
-
# Sanitize the parameters for a specific +action+.
-
#
-
# === Arguments
-
#
-
# * +action+ - A +Symbol+ with the action that the controller is
-
# performing, like +sign_up+, +sign_in+, etc.
-
#
-
# === Examples
-
#
-
# # Inside the `RegistrationsController#create` action.
-
# resource = build_resource(devise_parameter_sanitizer.sanitize(:sign_up))
-
# resource.save
-
#
-
# Returns an +ActiveSupport::HashWithIndifferentAccess+ with the permitted
-
# attributes.
-
1
def sanitize(action)
-
19
permissions = @permitted[action]
-
-
# DEPRECATED: Remove this branch on Devise 4.2.
-
19
if respond_to?(action, true)
-
deprecate_instance_method_sanitization(action)
-
return cast_to_hash send(action)
-
end
-
-
19
if permissions.respond_to?(:call)
-
cast_to_hash permissions.call(default_params)
-
19
elsif permissions.present?
-
19
cast_to_hash permit_keys(default_params, permissions)
-
else
-
unknown_action!(action)
-
end
-
end
-
-
# Add or remove new parameters to the permitted list of an +action+.
-
#
-
# === Arguments
-
#
-
# * +action+ - A +Symbol+ with the action that the controller is
-
# performing, like +sign_up+, +sign_in+, etc.
-
# * +keys:+ - An +Array+ of keys that also should be permitted.
-
# * +except:+ - An +Array+ of keys that shouldn't be permitted.
-
# * +block+ - A block that should be used to permit the action
-
# parameters instead of the +Array+ based approach. The block will be
-
# called with an +ActionController::Parameters+ instance.
-
#
-
# === Examples
-
#
-
# # Adding new parameters to be permitted in the `sign_up` action.
-
# devise_parameter_sanitizer.permit(:sign_up, keys: [:subscribe_newsletter])
-
#
-
# # Removing the `password` parameter from the `account_update` action.
-
# devise_parameter_sanitizer.permit(:account_update, except: [:password])
-
#
-
# # Using the block form to completely override how we permit the
-
# # parameters for the `sign_up` action.
-
# devise_parameter_sanitizer.permit(:sign_up) do |user|
-
# user.permit(:email, :password, :password_confirmation)
-
# end
-
#
-
#
-
# Returns nothing.
-
1
def permit(action, keys: nil, except: nil, &block)
-
57
if block_given?
-
@permitted[action] = block
-
end
-
-
57
if keys.present?
-
57
@permitted[action] ||= @auth_keys.dup
-
57
@permitted[action].concat(keys)
-
end
-
-
57
if except.present?
-
@permitted[action] ||= @auth_keys.dup
-
@permitted[action] = @permitted[action] - except
-
end
-
end
-
-
# DEPRECATED: Remove this method on Devise 4.2.
-
1
def for(action, &block) # :nodoc:
-
if block_given?
-
deprecate_for_with_block(action)
-
permit(action, &block)
-
else
-
deprecate_for_without_block(action)
-
@permitted[action] or unknown_action!(action)
-
end
-
end
-
-
1
private
-
-
# Cast a sanitized +ActionController::Parameters+ to a +HashWithIndifferentAccess+
-
# that can be used elsewhere.
-
#
-
# Returns an +ActiveSupport::HashWithIndifferentAccess+.
-
1
def cast_to_hash(params)
-
# TODO: Remove the `with_indifferent_access` method call when we only support Rails 5+.
-
19
params && params.to_h.with_indifferent_access
-
end
-
-
1
def default_params
-
19
@params.fetch(@resource_name, {})
-
end
-
-
1
def permit_keys(parameters, keys)
-
19
parameters.permit(*keys)
-
end
-
-
1
def extract_auth_keys(klass)
-
19
auth_keys = klass.authentication_keys
-
-
19
auth_keys.respond_to?(:keys) ? auth_keys.keys : auth_keys
-
end
-
-
1
def unknown_action!(action)
-
raise NotImplementedError, <<-MESSAGE.strip_heredoc
-
"Devise doesn't know how to sanitize parameters for '#{action}'".
-
If you want to define a new set of parameters to be sanitized use the
-
`permit` method first:
-
-
devise_parameter_sanitizer.permit(:#{action}, keys: [:param1, :param2, :param3])
-
MESSAGE
-
end
-
-
1
def deprecate_for_with_block(action)
-
ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc)
-
[Devise] Changing the sanitized parameters through "#{self.class.name}#for(#{action}) is deprecated and it will be removed from Devise 4.2.
-
Please use the `permit` method:
-
-
devise_parameter_sanitizer.permit(:#{action}) do |user|
-
# Your block here.
-
end
-
MESSAGE
-
end
-
-
1
def deprecate_for_without_block(action)
-
ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc)
-
[Devise] Changing the sanitized parameters through "#{self.class.name}#for(#{action}) is deprecated and it will be removed from Devise 4.2.
-
Please use the `permit` method to add or remove any key:
-
-
To add any new key, use the `keys` keyword argument:
-
devise_parameter_sanitizer.permit(:#{action}, keys: [:param1, :param2, :param3])
-
-
To remove any existing key, use the `except` keyword argument:
-
devise_parameter_sanitizer.permit(:#{action}, except: [:email])
-
MESSAGE
-
end
-
-
1
def deprecate_instance_method_sanitization(action)
-
ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc)
-
[Devise] Parameter sanitization through a "#{self.class.name}##{action}" method is deprecated and it will be removed from Devise 4.2.
-
Please use the `permit` method on your sanitizer `initialize` method.
-
-
class #{self.class.name} < Devise::ParameterSanitizer
-
def initialize(*)
-
super
-
permit(:#{action}, keys: [:param1, :param2, :param3])
-
end
-
end
-
MESSAGE
-
end
-
end
-
end
-
1
require 'devise/strategies/base'
-
-
1
module Devise
-
1
module Strategies
-
# This strategy should be used as basis for authentication strategies. It retrieves
-
# parameters both from params or from http authorization headers. See database_authenticatable
-
# for an example.
-
1
class Authenticatable < Base
-
1
attr_accessor :authentication_hash, :authentication_type, :password
-
-
1
def store?
-
super && !mapping.to.skip_session_storage.include?(authentication_type)
-
end
-
-
1
def valid?
-
67
valid_for_params_auth? || valid_for_http_auth?
-
end
-
-
# Override and set to false for things like OmniAuth that technically
-
# run through Authentication (user_set) very often, which would normally
-
# reset CSRF data in the session
-
1
def clean_up_csrf?
-
true
-
end
-
-
1
private
-
-
# Receives a resource and check if it is valid by calling valid_for_authentication?
-
# An optional block that will be triggered while validating can be optionally
-
# given as parameter. Check Devise::Models::Authenticatable.valid_for_authentication?
-
# for more information.
-
#
-
# In case the resource can't be validated, it will fail with the given
-
# unauthenticated_message.
-
1
def validate(resource, &block)
-
result = resource && resource.valid_for_authentication?(&block)
-
-
if result
-
true
-
else
-
if resource
-
fail!(resource.unauthenticated_message)
-
end
-
false
-
end
-
end
-
-
# Get values from params and set in the resource.
-
1
def remember_me(resource)
-
resource.remember_me = remember_me? if resource.respond_to?(:remember_me=)
-
end
-
-
# Should this resource be marked to be remembered?
-
1
def remember_me?
-
valid_params? && Devise::TRUE_VALUES.include?(params_auth_hash[:remember_me])
-
end
-
-
# Check if this is a valid strategy for http authentication by:
-
#
-
# * Validating if the model allows http authentication;
-
# * If any of the authorization headers were sent;
-
# * If all authentication keys are present;
-
#
-
1
def valid_for_http_auth?
-
67
http_authenticatable? && request.authorization && with_authentication_hash(:http_auth, http_auth_hash)
-
end
-
-
# Check if this is a valid strategy for params authentication by:
-
#
-
# * Validating if the model allows params authentication;
-
# * If the request hits the sessions controller through POST;
-
# * If the params[scope] returns a hash with credentials;
-
# * If all authentication keys are present;
-
#
-
1
def valid_for_params_auth?
-
67
params_authenticatable? && valid_params_request? &&
-
valid_params? && with_authentication_hash(:params_auth, params_auth_hash)
-
end
-
-
# Check if the model accepts this strategy as http authenticatable.
-
1
def http_authenticatable?
-
67
mapping.to.http_authenticatable?(authenticatable_name)
-
end
-
-
# Check if the model accepts this strategy as params authenticatable.
-
1
def params_authenticatable?
-
67
mapping.to.params_authenticatable?(authenticatable_name)
-
end
-
-
# Extract the appropriate subhash for authentication from params.
-
1
def params_auth_hash
-
params[scope]
-
end
-
-
# Extract a hash with attributes:values from the http params.
-
1
def http_auth_hash
-
keys = [http_authentication_key, :password]
-
Hash[*keys.zip(decode_credentials).flatten]
-
end
-
-
# By default, a request is valid if the controller set the proper env variable.
-
1
def valid_params_request?
-
67
!!env["devise.allow_params_authentication"]
-
end
-
-
# If the request is valid, finally check if params_auth_hash returns a hash.
-
1
def valid_params?
-
params_auth_hash.is_a?(Hash)
-
end
-
-
# Note: unlike `Model.valid_password?`, this method does not actually
-
# ensure that the password in the params matches the password stored in
-
# the database. It only checks if the password is *present*. Do not rely
-
# on this method for validating that a given password is correct.
-
1
def valid_password?
-
password.present?
-
end
-
-
# Helper to decode credentials from HTTP.
-
1
def decode_credentials
-
return [] unless request.authorization && request.authorization =~ /^Basic (.*)/mi
-
Base64.decode64($1).split(/:/, 2)
-
end
-
-
# Sets the authentication hash and the password from params_auth_hash or http_auth_hash.
-
1
def with_authentication_hash(auth_type, auth_values)
-
self.authentication_hash, self.authentication_type = {}, auth_type
-
self.password = auth_values[:password]
-
-
parse_authentication_key_values(auth_values, authentication_keys) &&
-
parse_authentication_key_values(request_values, request_keys)
-
end
-
-
1
def authentication_keys
-
@authentication_keys ||= mapping.to.authentication_keys
-
end
-
-
1
def http_authentication_key
-
@http_authentication_key ||= mapping.to.http_authentication_key || case authentication_keys
-
when Array then authentication_keys.first
-
when Hash then authentication_keys.keys.first
-
end
-
end
-
-
1
def request_keys
-
@request_keys ||= mapping.to.request_keys
-
end
-
-
1
def request_values
-
keys = request_keys.respond_to?(:keys) ? request_keys.keys : request_keys
-
values = keys.map { |k| self.request.send(k) }
-
Hash[keys.zip(values)]
-
end
-
-
1
def parse_authentication_key_values(hash, keys)
-
keys.each do |key, enforce|
-
value = hash[key].presence
-
if value
-
self.authentication_hash[key] = value
-
else
-
return false unless enforce == false
-
end
-
end
-
true
-
end
-
-
# Holds the authenticatable name for this class. Devise::Strategies::DatabaseAuthenticatable
-
# becomes simply :database.
-
1
def authenticatable_name
-
@authenticatable_name ||=
-
ActiveSupport::Inflector.underscore(self.class.name.split("::").last).
-
134
sub("_authenticatable", "").to_sym
-
end
-
end
-
end
-
end
-
1
module Devise
-
1
module Strategies
-
# Base strategy for Devise. Responsible for verifying correct scope and mapping.
-
1
class Base < ::Warden::Strategies::Base
-
# Whenever CSRF cannot be verified, we turn off any kind of storage
-
1
def store?
-
!env["devise.skip_storage"]
-
end
-
-
# Checks if a valid scope was given for devise and find mapping based on this scope.
-
1
def mapping
-
@mapping ||= begin
-
66
mapping = Devise.mappings[scope]
-
66
raise "Could not find mapping for #{scope}" unless mapping
-
66
mapping
-
220
end
-
end
-
end
-
end
-
end
-
1
require 'devise/strategies/authenticatable'
-
-
1
module Devise
-
1
module Strategies
-
# Default strategy for signing in a user, based on their email and password in the database.
-
1
class DatabaseAuthenticatable < Authenticatable
-
1
def authenticate!
-
resource = password.present? && mapping.to.find_for_database_authentication(authentication_hash)
-
hashed = false
-
-
if validate(resource){ hashed = true; resource.valid_password?(password) }
-
remember_me(resource)
-
resource.after_database_authentication
-
success!(resource)
-
end
-
-
mapping.to.new.password = password if !hashed && Devise.paranoid
-
fail(:not_found_in_database) unless resource
-
end
-
end
-
end
-
end
-
-
1
Warden::Strategies.add(:database_authenticatable, Devise::Strategies::DatabaseAuthenticatable)
-
1
require 'devise/strategies/authenticatable'
-
-
1
module Devise
-
1
module Strategies
-
# Remember the user through the remember token. This strategy is responsible
-
# to verify whether there is a cookie with the remember token, and to
-
# recreate the user from this cookie if it exists. Must be called *before*
-
# authenticatable.
-
1
class Rememberable < Authenticatable
-
# A valid strategy for rememberable needs a remember token in the cookies.
-
1
def valid?
-
86
@remember_cookie = nil
-
86
remember_cookie.present?
-
end
-
-
# To authenticate a user we deserialize the cookie and attempt finding
-
# the record in the database. If the attempt fails, we pass to another
-
# strategy handle the authentication.
-
1
def authenticate!
-
resource = mapping.to.serialize_from_cookie(*remember_cookie)
-
-
unless resource
-
cookies.delete(remember_key)
-
return pass
-
end
-
-
if validate(resource)
-
remember_me(resource) if extend_remember_me?(resource)
-
resource.after_remembered
-
success!(resource)
-
end
-
end
-
-
# No need to clean up the CSRF when using rememberable.
-
# In fact, cleaning it up here would be a bug because
-
# rememberable is triggered on GET requests which means
-
# we would render a page on first access with all csrf
-
# tokens expired.
-
1
def clean_up_csrf?
-
false
-
end
-
-
1
private
-
-
1
def extend_remember_me?(resource)
-
resource.respond_to?(:extend_remember_period) && resource.extend_remember_period
-
end
-
-
1
def remember_me?
-
true
-
end
-
-
1
def remember_key
-
86
mapping.to.rememberable_options.fetch(:key, "remember_#{scope}_token")
-
end
-
-
1
def remember_cookie
-
86
@remember_cookie ||= cookies.signed[remember_key]
-
end
-
-
end
-
end
-
end
-
-
1
Warden::Strategies.add(:rememberable, Devise::Strategies::Rememberable)
-
1
module Devise
-
# Devise::TestHelpers provides a facility to test controllers in isolation
-
# when using ActionController::TestCase allowing you to quickly sign_in or
-
# sign_out a user. Do not use Devise::TestHelpers in integration tests.
-
#
-
# Notice you should not test Warden specific behavior (like Warden callbacks)
-
# using Devise::TestHelpers since it is a stub of the actual behavior. Such
-
# callbacks should be tested in your integration suite instead.
-
1
module TestHelpers
-
1
def self.included(base)
-
2
base.class_eval do
-
2
setup :setup_controller_for_warden, :warden if respond_to?(:setup)
-
end
-
end
-
-
# Override process to consider warden.
-
1
def process(*)
-
# Make sure we always return @response, a la ActionController::TestCase::Behaviour#process, even if warden interrupts
-
100
_catch_warden { super } # || @response # _catch_warden will setup the @response object
-
-
# process needs to return the ActionDispath::TestResponse object
-
46
@response
-
end
-
-
# We need to set up the environment variables and the response in the controller.
-
1
def setup_controller_for_warden #:nodoc:
-
63
@request.env['action_controller.instance'] = @controller
-
end
-
-
# Quick access to Warden::Proxy.
-
1
def warden #:nodoc:
-
71
@request.env['warden'] ||= begin
-
63
manager = Warden::Manager.new(nil) do |config|
-
63
config.merge! Devise.warden_config
-
end
-
63
Warden::Proxy.new(@request.env, manager)
-
end
-
end
-
-
# sign_in a given resource by storing its keys in the session.
-
# This method bypass any warden authentication callback.
-
#
-
# Examples:
-
#
-
# sign_in :user, @user # sign_in(scope, resource)
-
# sign_in @user # sign_in(resource)
-
#
-
1
def sign_in(resource_or_scope, resource=nil)
-
4
scope ||= Devise::Mapping.find_scope!(resource_or_scope)
-
4
resource ||= resource_or_scope
-
4
warden.instance_variable_get(:@users).delete(scope)
-
4
warden.session_serializer.store(resource, scope)
-
end
-
-
# Sign out a given resource or scope by calling logout on Warden.
-
# This method bypass any warden logout callback.
-
#
-
# Examples:
-
#
-
# sign_out :user # sign_out(scope)
-
# sign_out @user # sign_out(resource)
-
#
-
1
def sign_out(resource_or_scope)
-
scope = Devise::Mapping.find_scope!(resource_or_scope)
-
@controller.instance_variable_set(:"@current_#{scope}", nil)
-
user = warden.instance_variable_get(:@users).delete(scope)
-
warden.session_serializer.delete(scope, user)
-
end
-
-
1
protected
-
-
# Catch warden continuations and handle like the middleware would.
-
# Returns nil when interrupted, otherwise the normal result of the block.
-
1
def _catch_warden(&block)
-
50
result = catch(:warden, &block)
-
-
46
env = @controller.request.env
-
-
46
result ||= {}
-
-
# Set the response. In production, the rack result is returned
-
# from Warden::Manager#call, which the following is modelled on.
-
46
case result
-
when Array
-
if result.first == 401 && intercept_401?(env) # does this happen during testing?
-
_process_unauthenticated(env)
-
else
-
result
-
end
-
when Hash
-
_process_unauthenticated(env, result)
-
else
-
46
result
-
end
-
end
-
-
1
def _process_unauthenticated(env, options = {})
-
options[:action] ||= :unauthenticated
-
proxy = env['warden']
-
result = options[:result] || proxy.result
-
-
ret = case result
-
when :redirect
-
body = proxy.message || "You are being redirected to #{proxy.headers['Location']}"
-
[proxy.status, proxy.headers, [body]]
-
when :custom
-
proxy.custom_response
-
else
-
env["PATH_INFO"] = "/#{options[:action]}"
-
env["warden.options"] = options
-
Warden::Manager._run_callbacks(:before_failure, env, options)
-
-
status, headers, response = Devise.warden_config[:failure_app].call(env).to_a
-
@controller.response.headers.merge!(headers)
-
r_opts = { status: status, content_type: headers["Content-Type"], location: headers["Location"] }
-
r_opts[Rails.version.start_with?('5') ? :body : :text] = response.body
-
@controller.send :render, r_opts
-
nil # causes process return @response
-
end
-
-
# ensure that the controller response is set up. In production, this is
-
# not necessary since warden returns the results to rack. However, at
-
# testing time, we want the response to be available to the testing
-
# framework to verify what would be returned to rack.
-
if ret.is_a?(Array)
-
# ensure the controller response is set to our response.
-
@controller.response ||= @response
-
@response.status = ret.first
-
@response.headers.clear
-
ret.second.each { |k,v| @response[k] = v }
-
@response.body = ret.third
-
end
-
-
ret
-
end
-
end
-
end
-
1
require 'openssl'
-
-
1
module Devise
-
1
class TokenGenerator
-
1
def initialize(key_generator, digest = "SHA256")
-
1
@key_generator = key_generator
-
1
@digest = digest
-
end
-
-
1
def digest(klass, column, value)
-
value.present? && OpenSSL::HMAC.hexdigest(@digest, key_for(column), value.to_s)
-
end
-
-
1
def generate(klass, column)
-
key = key_for(column)
-
-
loop do
-
raw = Devise.friendly_token
-
enc = OpenSSL::HMAC.hexdigest(@digest, key, raw)
-
break [raw, enc] unless klass.to_adapter.find_first({ column => enc })
-
end
-
end
-
-
1
private
-
-
1
def key_for(column)
-
@key_generator.generate_key("Devise #{column}")
-
end
-
end
-
end
-
1
require "ember_cli/assets/lookup"
-
-
1
module EmberCliRailsAssetsHelper
-
1
def include_ember_script_tags(name, prepend: "")
-
EmberCli[name].build
-
-
assets = EmberCli::Assets::Lookup.new(EmberCli[name])
-
-
assets.javascript_assets.
-
map { |src| [prepend, src].join }.
-
map { |src| %{<script src="#{src}"></script>}.html_safe }.
-
inject(&:+)
-
end
-
-
1
def include_ember_stylesheet_tags(name, prepend: "")
-
EmberCli[name].build
-
-
assets = EmberCli::Assets::Lookup.new(EmberCli[name])
-
-
assets.stylesheet_assets.
-
map { |src| [prepend, src].join }.
-
map { |src| %{<link rel="stylesheet" href="#{src}">}.html_safe }.
-
inject(&:+)
-
end
-
end
-
1
require "ember_cli/assets/errors"
-
-
1
module EmberCli
-
1
module Assets
-
1
class AssetMap
-
1
def initialize(name:, asset_map:)
-
@name = name
-
@asset_map = asset_map
-
end
-
-
1
def javascripts
-
assert_asset_map!
-
-
[
-
asset_matching(/vendor(.*)\.js\z/),
-
asset_matching(/#{name}(.*)\.js\z/),
-
]
-
end
-
-
1
def stylesheets
-
assert_asset_map!
-
-
[
-
asset_matching(/vendor(.*)\.css\z/),
-
asset_matching(/#{name}(.*)\.css\z/),
-
]
-
end
-
-
1
private
-
-
1
attr_reader :name, :asset_map
-
-
1
def asset_matching(regex)
-
matching_asset = files.detect { |asset| asset =~ regex }
-
-
if matching_asset.to_s.empty?
-
raise_missing_asset(regex)
-
end
-
-
prepend + matching_asset
-
end
-
-
1
def prepend
-
asset_map["prepend"].to_s
-
end
-
-
1
def files
-
Array(assets.values)
-
end
-
-
1
def assets
-
asset_map["assets"] || {}
-
end
-
-
1
def raise_missing_asset(regex)
-
raise BuildError.new("Failed to find assets matching `#{regex}`")
-
end
-
-
1
def assert_asset_map!
-
if assets.empty?
-
raise BuildError.new <<-MSG
-
Missing `#{name}/assets/assetMap.json`
-
MSG
-
end
-
end
-
end
-
end
-
end
-
1
module EmberCli
-
1
module Assets
-
1
class DirectoryAssetMap
-
1
def initialize(directory)
-
@directory = Pathname.new(directory)
-
end
-
-
1
def to_h
-
{
-
"assets" => files_with_data,
-
"prepend" => "assets/",
-
}
-
end
-
-
1
private
-
-
1
attr_reader :directory
-
-
1
def files_with_data
-
files.reduce({}) do |manifest, file|
-
name = File.basename(file.path)
-
-
manifest[name] = name
-
-
manifest
-
end
-
end
-
-
-
1
def files
-
directory.children.map { |path| File.new(path) }
-
end
-
end
-
end
-
end
-
1
module EmberCli
-
1
module Assets
-
1
class BuildError < StandardError; end
-
end
-
end
-
1
require "ember_cli/assets/paths"
-
1
require "ember_cli/assets/asset_map"
-
1
require "ember_cli/assets/directory_asset_map"
-
-
1
module EmberCli
-
1
module Assets
-
1
class Lookup
-
1
def initialize(app)
-
@paths = Paths.new(app)
-
end
-
-
1
def javascript_assets
-
asset_map.javascripts
-
end
-
-
1
def stylesheet_assets
-
asset_map.stylesheets
-
end
-
-
1
private
-
-
1
attr_reader :paths
-
-
1
def asset_map
-
AssetMap.new(
-
name: name_from_package_json,
-
asset_map: asset_map_hash.to_h,
-
)
-
end
-
-
1
def asset_map_file
-
paths.asset_map
-
end
-
-
1
def asset_map_hash
-
if asset_map_file.present? && asset_map_file.exist?
-
JSON.parse(asset_map_file.read)
-
else
-
DirectoryAssetMap.new(paths.assets)
-
end
-
end
-
-
1
def name_from_package_json
-
package_json.fetch("name")
-
end
-
-
1
def package_json
-
@package_json ||= JSON.parse(paths.package_json.read)
-
end
-
end
-
end
-
end
-
1
module EmberCli
-
1
module Assets
-
1
class Paths
-
1
def initialize(app)
-
@app = app
-
end
-
-
1
def assets
-
app.dist_path.join("assets")
-
end
-
-
1
def asset_map
-
Pathname.glob(assets.join("assetMap*.json")).first
-
end
-
-
1
def package_json
-
app.root_path.join("package.json")
-
end
-
-
1
protected
-
-
1
attr_reader :app
-
end
-
end
-
end
-
1
module Enumerize
-
1
module ActiveRecordSupport
-
1
def enumerize(name, options={})
-
13
super
-
-
13
_enumerize_module.dependent_eval do
-
13
if self < ::ActiveRecord::Base
-
13
include InstanceMethods
-
-
# Since Rails use `allocate` method on models and initializes them with `init_with` method.
-
# This way `initialize` method is not being called, but `after_initialize` callback always gets triggered.
-
13
after_initialize :_set_default_value_for_enumerized_attributes
-
-
# https://github.com/brainspec/enumerize/issues/111
-
13
require 'enumerize/hooks/uniqueness'
-
end
-
end
-
end
-
-
1
module InstanceMethods
-
# https://github.com/brainspec/enumerize/issues/74
-
1
def write_attribute(attr_name, value)
-
1301
if self.class.enumerized_attributes[attr_name]
-
228
_enumerized_values_for_validation[attr_name.to_s] = value
-
end
-
-
1301
super
-
end
-
-
# Support multiple enumerized attributes
-
1
def becomes(klass)
-
became = super
-
klass.enumerized_attributes.each do |attr|
-
became.send("#{attr.name}=", send(attr.name))
-
end
-
-
became
-
end
-
end
-
end
-
end
-
1
module Enumerize
-
1
class Attribute
-
1
attr_reader :name, :values, :default_value, :i18n_scope
-
-
1
def initialize(klass, name, options={})
-
13
raise ArgumentError, ':in option is required' unless options[:in]
-
13
raise ArgumentError, ':scope option does not work with option :multiple' if options[:multiple] && options[:scope]
-
-
13
extend Multiple if options[:multiple]
-
-
13
@klass = klass
-
13
@name = name.to_sym
-
-
13
value_class = options.fetch(:value_class, Value)
-
120
@values = Array(options[:in]).map { |v| value_class.new(self, *v) }
-
-
120
@value_hash = Hash[@values.map { |v| [v.value.to_s, v] }]
-
120
@value_hash.merge! Hash[@values.map { |v| [v.to_s, v] }]
-
-
13
if options[:i18n_scope]
-
raise ArgumentError, ':i18n_scope option accepts only String or Array of strings' unless Array(options[:i18n_scope]).all? { |s| s.is_a?(String) }
-
@i18n_scope = options[:i18n_scope]
-
end
-
-
13
if options[:default]
-
8
@default_value = find_default_value(options[:default])
-
8
raise ArgumentError, 'invalid default value' unless @default_value
-
end
-
end
-
-
1
def find_default_value(value)
-
8
if value.respond_to?(:call)
-
value
-
else
-
8
find_value(value)
-
end
-
end
-
-
1
def find_value(value)
-
4404
@value_hash[value.to_s] unless value.nil?
-
end
-
-
1
def find_values(*values)
-
values.map { |value| find_value(value) }.compact
-
end
-
-
1
def i18n_scopes
-
@i18n_scopes ||= if i18n_scope
-
scopes = Array(i18n_scope)
-
elsif @klass.respond_to?(:model_name)
-
2
scopes = ["enumerize.#{@klass.model_name.i18n_key}.#{name}"]
-
else
-
[]
-
10
end
-
end
-
-
1
def options(options = {})
-
8
values = if options.empty?
-
8
@values
-
else
-
raise ArgumentError, 'Options cannot have both :only and :except' if options[:only] && options[:except]
-
-
only = Array(options[:only]).map(&:to_s)
-
except = Array(options[:except]).map(&:to_s)
-
-
@values.reject do |value|
-
if options[:only]
-
!only.include?(value)
-
elsif options[:except]
-
except.include?(value)
-
end
-
end
-
end
-
-
36
values.map { |v| [v.text, v.to_s] }
-
end
-
-
1
def respond_to_missing?(method, include_private=false)
-
@value_hash.include?(method.to_s) || super
-
end
-
-
1
def define_methods!(mod)
-
13
mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def #{name}
-
if defined?(super)
-
self.class.enumerized_attributes[:#{name}].find_value(super)
-
elsif respond_to?(:read_attribute)
-
self.class.enumerized_attributes[:#{name}].find_value(read_attribute(:#{name}))
-
else
-
if defined?(@#{name})
-
self.class.enumerized_attributes[:#{name}].find_value(@#{name})
-
else
-
@#{name} = nil
-
end
-
end
-
end
-
-
def #{name}=(new_value)
-
allowed_value_or_nil = self.class.enumerized_attributes[:#{name}].find_value(new_value)
-
allowed_value_or_nil = allowed_value_or_nil.value unless allowed_value_or_nil.nil?
-
-
if defined?(super)
-
super allowed_value_or_nil
-
elsif respond_to?(:write_attribute, true)
-
write_attribute '#{name}', allowed_value_or_nil
-
else
-
@#{name} = allowed_value_or_nil
-
end
-
-
_enumerized_values_for_validation['#{name}'] = new_value.nil? ? nil : new_value.to_s
-
-
allowed_value_or_nil
-
end
-
-
def #{name}_text
-
self.#{name} && self.#{name}.text
-
end
-
-
def #{name}_value
-
self.#{name} && self.#{name}.value
-
end
-
RUBY
-
end
-
-
1
private
-
-
1
def method_missing(method)
-
if @value_hash.include?(method.to_s)
-
find_value(method)
-
else
-
super
-
end
-
end
-
end
-
-
1
module Multiple
-
1
def find_default_value(value)
-
if value.respond_to?(:call)
-
value
-
else
-
find_values(*value)
-
end
-
end
-
-
1
def define_methods!(mod)
-
mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def #{name}
-
unless defined?(@_#{name}_enumerized_set)
-
if defined?(super)
-
self.#{name} = super
-
elsif respond_to?(:read_attribute)
-
self.#{name} = read_attribute(:#{name})
-
else
-
if defined?(@#{name})
-
self.#{name} = @#{name}
-
else
-
self.#{name} = []
-
end
-
end
-
end
-
-
@_#{name}_enumerized_set
-
end
-
-
def #{name}=(values)
-
@_#{name}_enumerized_set = Enumerize::Set.new(self, self.class.enumerized_attributes[:#{name}], values)
-
raw_values = #{name}.values.map(&:value)
-
-
if defined?(super)
-
super raw_values
-
elsif respond_to?(:write_attribute, true)
-
write_attribute '#{name}', raw_values
-
else
-
@#{name} = raw_values
-
end
-
-
_enumerized_values_for_validation['#{name}'] = values.respond_to?(:map) ? values.map(&:to_s) : values
-
-
#{name}
-
end
-
RUBY
-
end
-
end
-
end
-
1
module Enumerize
-
1
class AttributeMap
-
1
attr_reader :attributes
-
-
1
def initialize
-
11
@attributes = {}
-
11
@dependants = []
-
end
-
-
1
def [](name)
-
5554
@attributes[name.to_s]
-
end
-
-
1
def <<(attr)
-
13
@attributes[attr.name.to_s] = attr
-
13
@dependants.each do |dependant|
-
dependant << attr
-
end
-
end
-
-
1
def each
-
1113
@attributes.each_pair do |_name, attr|
-
1225
yield attr
-
end
-
end
-
-
1
def empty?
-
@attributes.empty?
-
end
-
-
1
def add_dependant(dependant)
-
@dependants << dependant
-
each do |attr|
-
dependant << attr
-
end
-
end
-
end
-
end
-
1
module Enumerize
-
1
module Base
-
1
def self.included(base)
-
11
base.extend ClassMethods
-
-
11
if base.respond_to?(:validate)
-
11
base.validate :_validate_enumerized_attributes
-
end
-
-
11
class << base
-
11
if (method_defined?(:inherited) || private_method_defined?(:inherited)) && !private_method_defined?(:inherited_without_enumerized)
-
11
alias_method :inherited_without_enumerized, :inherited
-
11
private :inherited_without_enumerized
-
end
-
-
11
alias_method :inherited, :inherited_with_enumerized
-
end
-
end
-
-
1
module ClassMethods
-
1
def enumerize(name, options={})
-
13
attr = Attribute.new(self, name, options)
-
13
enumerized_attributes << attr
-
-
13
unless methods.include?(attr.name)
-
12
_enumerize_module._class_methods.module_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def #{attr.name}
-
enumerized_attributes[:#{attr.name}]
-
end
-
RUBY
-
end
-
-
13
attr.define_methods!(_enumerize_module)
-
end
-
-
1
def enumerized_attributes
-
6680
@enumerized_attributes ||= AttributeMap.new
-
end
-
-
1
def inherited_with_enumerized(subclass)
-
enumerized_attributes.add_dependant subclass.enumerized_attributes
-
if respond_to?(:inherited_without_enumerized, true)
-
inherited_without_enumerized subclass
-
end
-
end
-
-
1
private
-
-
1
def _enumerize_module
-
@_enumerize_module ||= begin
-
11
mod = Module.new
-
11
include mod
-
11
mod
-
62
end
-
end
-
end
-
-
1
def initialize(*)
-
106
super
-
106
_set_default_value_for_enumerized_attributes
-
end
-
-
1
def read_attribute_for_validation(key)
-
1845
key = key.to_s
-
-
1845
if _enumerized_values_for_validation.has_key?(key)
-
258
_enumerized_values_for_validation[key]
-
1587
elsif defined?(super)
-
1587
super
-
else
-
send(key)
-
end
-
end
-
-
1
private
-
-
1
def _enumerized_values_for_validation
-
3522
@_enumerized_values_for_validation ||= {}
-
end
-
-
1
def _validate_enumerized_attributes
-
224
self.class.enumerized_attributes.each do |attr|
-
262
value = read_attribute_for_validation(attr.name)
-
262
next if value.blank?
-
-
253
if attr.kind_of? Multiple
-
errors.add attr.name unless value.respond_to?(:all?) && value.all? { |v| v.blank? || attr.find_value(v) }
-
else
-
253
errors.add attr.name, :inclusion unless attr.find_value(value)
-
end
-
end
-
end
-
-
1
def _set_default_value_for_enumerized_attributes
-
889
self.class.enumerized_attributes.each do |attr|
-
963
if respond_to?(attr.name)
-
963
attr_value = public_send(attr.name)
-
else
-
next
-
end
-
-
963
value_for_validation = _enumerized_values_for_validation[attr.name.to_s]
-
-
963
if (!attr_value || attr_value.empty?) && (!value_for_validation || value_for_validation.empty?)
-
105
value = attr.default_value
-
-
105
if value.respond_to?(:call)
-
value = value.arity == 0 ? value.call : value.call(self)
-
end
-
-
105
public_send("#{attr.name}=", value)
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/concern'
-
-
1
module Enumerize
-
1
module Hooks
-
1
module UniquenessValidator
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
alias_method_chain :validate_each, :enumerize
-
end
-
-
1
def validate_each_with_enumerize(record, name, value)
-
79
if record.class.respond_to?(:enumerized_attributes) && (attr = record.class.enumerized_attributes[name])
-
31
value = attr.find_value(value).try(:value)
-
end
-
-
79
validate_each_without_enumerize(record, name, value)
-
end
-
end
-
end
-
end
-
-
1
::ActiveRecord::Validations::UniquenessValidator.send :include, Enumerize::Hooks::UniquenessValidator
-
1
module Enumerize
-
1
class Module < ::Module
-
1
attr_reader :_class_methods
-
-
1
def initialize
-
11
super
-
-
11
@_class_methods = ::Module.new
-
11
@_dependents = []
-
11
@_dependent_evals = []
-
end
-
-
1
def included(klass)
-
11
klass.extend _class_methods
-
-
11
@_dependent_evals.each do |block|
-
klass.instance_eval(&block)
-
end
-
-
11
@_dependents << klass
-
end
-
-
1
def dependent_eval(&block)
-
26
@_dependents.each do |klass|
-
26
klass.instance_eval(&block)
-
end
-
-
26
@_dependent_evals << block
-
end
-
end
-
end
-
1
module Enumerize
-
1
module ModuleAttributes
-
1
def included(base)
-
base.extend Enumerize
-
base.send :include, _enumerize_module
-
enumerized_attributes.add_dependant base.enumerized_attributes
-
super
-
end
-
end
-
end
-
1
module Enumerize
-
1
module Predicatable
-
1
def respond_to_missing?(method, include_private=false)
-
530
predicate_method?(method) || super
-
end
-
-
1
private
-
-
1
def method_missing(method, *args, &block)
-
2331
if predicate_method?(method)
-
2304
predicate_call(method[0..-2], *args, &block)
-
else
-
27
super
-
end
-
end
-
-
1
def predicate_method?(method)
-
2861
method[-1] == '?' && @attr.values.include?(method[0..-2])
-
end
-
end
-
end
-
1
require 'active_support/core_ext/module/delegation'
-
-
1
module Enumerize
-
# Predicate methods.
-
#
-
# Basic usage:
-
#
-
# class User
-
# extend Enumerize
-
# enumerize :sex, in: %w(male female), predicates: true
-
# end
-
#
-
# user = User.new
-
#
-
# user.male? # => false
-
# user.female? # => false
-
#
-
# user.sex = 'male'
-
#
-
# user.male? # => true
-
# user.female? # => false
-
#
-
# Using prefix:
-
#
-
# class User
-
# extend Enumerize
-
# enumerize :sex, in: %w(male female), predicates: { prefix: true }
-
# end
-
#
-
# user = User.new
-
# user.sex = 'female'
-
# user.sex_female? # => true
-
#
-
# Use <tt>only</tt> and <tt>except</tt> options to specify what values create
-
# predicate methods for.
-
1
module Predicates
-
1
def enumerize(name, options={})
-
13
super
-
-
13
if options[:predicates]
-
11
Builder.new(enumerized_attributes[name], options[:predicates]).build(_enumerize_module)
-
end
-
end
-
-
1
class Builder
-
1
def initialize(attr, options)
-
11
@attr = attr
-
11
@options = options.is_a?(Hash) ? options : {}
-
end
-
-
1
def values
-
11
values = @attr.values
-
-
11
if @options[:only]
-
values &= Array(@options[:only]).map(&:to_s)
-
end
-
-
11
if @options[:except]
-
values -= Array(@options[:except]).map(&:to_s)
-
end
-
-
11
values
-
end
-
-
1
def names
-
50
values.map { |v| "#{v.tr('-', '_')}?" }
-
end
-
-
1
def build(klass)
-
11
klass.delegate(*names, to: @attr.name, prefix: @options[:prefix], allow_nil: true)
-
end
-
end
-
end
-
end
-
1
module Enumerize
-
1
module Scope
-
1
module ActiveRecord
-
1
def enumerize(name, options={})
-
13
super
-
-
13
_enumerize_module.dependent_eval do
-
13
if self < ::ActiveRecord::Base
-
13
if options[:scope]
-
_define_activerecord_scope_methods!(name, options)
-
end
-
end
-
end
-
end
-
-
1
private
-
-
1
def _define_activerecord_scope_methods!(name, options)
-
scope_name = options[:scope] == true ? "with_#{name}" : options[:scope]
-
-
define_singleton_method scope_name do |*values|
-
values = enumerized_attributes[name].find_values(*values).map(&:value)
-
values = values.first if values.size == 1
-
-
where(name => values)
-
end
-
-
if options[:scope] == true
-
define_singleton_method "without_#{name}" do |*values|
-
values = enumerized_attributes[name].find_values(*values).map(&:value)
-
where(arel_table[name].not_in(values))
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require 'i18n'
-
-
1
module Enumerize
-
1
class Value < String
-
1
include Predicatable
-
-
1
attr_reader :value
-
-
1
def initialize(attr, name, value=nil)
-
107
@attr = attr
-
107
@value = value.nil? ? name.to_s : value
-
-
107
super(name.to_s)
-
end
-
-
1
def text
-
28
I18n.t(i18n_keys[0], :default => i18n_keys[1..-1])
-
end
-
-
1
def ==(other)
-
7819
super(other.to_s) || value == other
-
end
-
-
1
def encode_with(coder)
-
coder.represent_object(self.class.superclass, @value)
-
end
-
-
1
private
-
-
1
def predicate_call(value)
-
2304
value == self
-
end
-
-
1
def i18n_keys
-
@i18n_keys ||= begin
-
10
i18n_keys = i18n_scopes
-
10
i18n_keys << [:"enumerize.defaults.#{@attr.name}.#{self}"]
-
10
i18n_keys << [:"enumerize.#{@attr.name}.#{self}"]
-
10
i18n_keys << self.underscore.humanize # humanize value if there are no translations
-
10
i18n_keys.flatten
-
56
end
-
end
-
-
1
def i18n_scopes
-
20
@attr.i18n_scopes.map { |s| :"#{s}.#{self}" }
-
end
-
end
-
end
-
1
require 'geocoder/lookups/base'
-
1
require "geocoder/results/google"
-
-
1
module Geocoder::Lookup
-
1
class Google < Base
-
-
1
def name
-
"Google"
-
end
-
-
1
def map_link_url(coordinates)
-
"http://maps.google.com/maps?q=#{coordinates.join(',')}"
-
end
-
-
1
def supported_protocols
-
# Google requires HTTPS if an API key is used.
-
40
if configuration.api_key
-
[:https]
-
else
-
40
[:http, :https]
-
end
-
end
-
-
1
def query_url(query)
-
10
"#{protocol}://maps.googleapis.com/maps/api/geocode/json?" + url_query_string(query)
-
end
-
-
1
private # ---------------------------------------------------------------
-
-
1
def valid_response?(response)
-
json = parse_json(response.body)
-
status = json["status"] if json
-
super(response) and ['OK', 'ZERO_RESULTS'].include?(status)
-
end
-
-
1
def results(query)
-
5
return [] unless doc = fetch_data(query)
-
5
case doc['status']; when "OK" # OK status implies >0 results
-
5
return doc['results']
-
when "OVER_QUERY_LIMIT"
-
raise_error(Geocoder::OverQueryLimitError) ||
-
Geocoder.log(:warn, "Google Geocoding API error: over query limit.")
-
when "REQUEST_DENIED"
-
raise_error(Geocoder::RequestDenied) ||
-
Geocoder.log(:warn, "Google Geocoding API error: request denied.")
-
when "INVALID_REQUEST"
-
raise_error(Geocoder::InvalidRequest) ||
-
Geocoder.log(:warn, "Google Geocoding API error: invalid request.")
-
end
-
return []
-
end
-
-
1
def query_url_google_params(query)
-
10
params = {
-
10
(query.reverse_geocode? ? :latlng : :address) => query.sanitized_text,
-
:sensor => "false",
-
10
:language => (query.language || configuration.language)
-
}
-
10
unless (bounds = query.options[:bounds]).nil?
-
params[:bounds] = bounds.map{ |point| "%f,%f" % point }.join('|')
-
end
-
10
unless (region = query.options[:region]).nil?
-
params[:region] = region
-
end
-
10
unless (components = query.options[:components]).nil?
-
params[:components] = components.is_a?(Array) ? components.join("|") : components
-
end
-
10
params
-
end
-
-
1
def query_url_params(query)
-
query_url_google_params(query).merge(
-
:key => configuration.api_key
-
10
).merge(super)
-
end
-
end
-
end
-
1
require 'geocoder/results/base'
-
-
1
module Geocoder::Result
-
1
class Google < Base
-
-
1
def coordinates
-
['lat', 'lng'].map{ |i| geometry['location'][i] }
-
end
-
-
1
def address(format = :full)
-
formatted_address
-
end
-
-
1
def neighborhood
-
if neighborhood = address_components_of_type(:neighborhood).first
-
neighborhood['long_name']
-
end
-
end
-
-
1
def city
-
fields = [:locality, :sublocality,
-
:administrative_area_level_3,
-
:administrative_area_level_2]
-
fields.each do |f|
-
if entity = address_components_of_type(f).first
-
return entity['long_name']
-
end
-
end
-
return nil # no appropriate components found
-
end
-
-
1
def state
-
if state = address_components_of_type(:administrative_area_level_1).first
-
state['long_name']
-
end
-
end
-
-
1
def state_code
-
if state = address_components_of_type(:administrative_area_level_1).first
-
state['short_name']
-
end
-
end
-
-
1
def sub_state
-
if state = address_components_of_type(:administrative_area_level_2).first
-
state['long_name']
-
end
-
end
-
-
1
def sub_state_code
-
if state = address_components_of_type(:administrative_area_level_2).first
-
state['short_name']
-
end
-
end
-
-
1
def country
-
if country = address_components_of_type(:country).first
-
country['long_name']
-
end
-
end
-
-
1
def country_code
-
if country = address_components_of_type(:country).first
-
country['short_name']
-
end
-
end
-
-
1
def postal_code
-
if postal = address_components_of_type(:postal_code).first
-
postal['long_name']
-
end
-
end
-
-
1
def route
-
if route = address_components_of_type(:route).first
-
route['long_name']
-
end
-
end
-
-
1
def street_number
-
if street_number = address_components_of_type(:street_number).first
-
street_number['long_name']
-
end
-
end
-
-
1
def street_address
-
[street_number, route].compact.join(' ')
-
end
-
-
1
def types
-
@data['types']
-
end
-
-
1
def formatted_address
-
@data['formatted_address']
-
end
-
-
1
def address_components
-
@data['address_components']
-
end
-
-
##
-
# Get address components of a given type. Valid types are defined in
-
# Google's Geocoding API documentation and include (among others):
-
#
-
# :street_number
-
# :locality
-
# :neighborhood
-
# :route
-
# :postal_code
-
#
-
1
def address_components_of_type(type)
-
address_components.select{ |c| c['types'].include?(type.to_s) }
-
end
-
-
1
def geometry
-
@data['geometry']
-
end
-
-
1
def precision
-
geometry['location_type'] if geometry
-
end
-
-
1
def partial_match
-
@data['partial_match']
-
end
-
-
1
def place_id
-
@data['place_id']
-
end
-
-
1
def viewport
-
viewport = geometry['viewport'] || fail
-
south, west = %w(lat lng).map { |c| viewport['southwest'][c] }
-
north, east = %w(lat lng).map { |c| viewport['northeast'][c] }
-
[south, west, north, east]
-
end
-
end
-
end
-
1
require 'active_support/concern'
-
-
1
class GlobalID
-
1
module Identification
-
1
extend ActiveSupport::Concern
-
-
1
def to_global_id(options = {})
-
@global_id ||= GlobalID.create(self, options)
-
end
-
1
alias to_gid to_global_id
-
-
1
def to_gid_param(options = {})
-
to_global_id(options).to_param
-
end
-
-
1
def to_signed_global_id(options = {})
-
SignedGlobalID.create(self, options)
-
end
-
1
alias to_sgid to_signed_global_id
-
-
1
def to_sgid_param(options = {})
-
to_signed_global_id(options).to_param
-
end
-
end
-
end
-
1
require 'global_id'
-
1
require 'active_support/message_verifier'
-
1
require 'time'
-
-
1
class SignedGlobalID < GlobalID
-
1
class ExpiredMessage < StandardError; end
-
-
1
class << self
-
1
attr_accessor :verifier
-
-
1
def parse(sgid, options = {})
-
if sgid.is_a? self
-
sgid
-
else
-
super verify(sgid, options), options
-
end
-
end
-
-
# Grab the verifier from options and fall back to SignedGlobalID.verifier.
-
# Raise ArgumentError if neither is available.
-
1
def pick_verifier(options)
-
options.fetch :verifier do
-
verifier || raise(ArgumentError, 'Pass a `verifier:` option with an `ActiveSupport::MessageVerifier` instance, or set a default SignedGlobalID.verifier.')
-
end
-
end
-
-
1
attr_accessor :expires_in
-
-
1
DEFAULT_PURPOSE = "default"
-
-
1
def pick_purpose(options)
-
options.fetch :for, DEFAULT_PURPOSE
-
end
-
-
1
private
-
1
def verify(sgid, options)
-
metadata = pick_verifier(options).verify(sgid)
-
-
raise_if_expired(metadata['expires_at'])
-
-
metadata['gid'] if pick_purpose(options) == metadata['purpose']
-
rescue ActiveSupport::MessageVerifier::InvalidSignature, ExpiredMessage
-
nil
-
end
-
-
1
def raise_if_expired(expires_at)
-
if expires_at && Time.now.utc > Time.iso8601(expires_at)
-
raise ExpiredMessage, 'This signed global id has expired.'
-
end
-
end
-
end
-
-
1
attr_reader :verifier, :purpose, :expires_at
-
-
1
def initialize(gid, options = {})
-
super
-
@verifier = self.class.pick_verifier(options)
-
@purpose = self.class.pick_purpose(options)
-
@expires_at = pick_expiration(options)
-
end
-
-
1
def to_s
-
@sgid ||= @verifier.generate(to_h)
-
end
-
1
alias to_param to_s
-
-
1
def to_h
-
# Some serializers decodes symbol keys to symbols, others to strings.
-
# Using string keys remedies that.
-
{ 'gid' => @uri.to_s, 'purpose' => purpose, 'expires_at' => encoded_expiration }
-
end
-
-
1
def ==(other)
-
super && @purpose == other.purpose
-
end
-
-
1
private
-
1
def encoded_expiration
-
expires_at.utc.iso8601(3) if expires_at
-
end
-
-
1
def pick_expiration(options)
-
return options[:expires_at] if options.key?(:expires_at)
-
-
if expires_in = options.fetch(:expires_in) { self.class.expires_in }
-
expires_in.from_now
-
end
-
end
-
end
-
1
require "thread"
-
1
require "listen"
-
-
1
require "guard/config"
-
1
require "guard/deprecated/guard" unless Guard::Config.new.strict?
-
1
require "guard/internals/helpers"
-
-
1
require "guard/internals/debugging"
-
1
require "guard/internals/traps"
-
1
require "guard/internals/queue"
-
-
# TODO: remove this class altogether
-
1
require "guard/interactor"
-
-
# Guard is the main module for all Guard related modules and classes.
-
# Also Guard plugins should use this namespace.
-
1
module Guard
-
1
Deprecated::Guard.add_deprecated(self) unless Config.new.strict?
-
-
1
class << self
-
1
attr_reader :state
-
1
attr_reader :queue
-
1
attr_reader :listener
-
1
attr_reader :interactor
-
-
# @private api
-
-
1
include Internals::Helpers
-
-
# Initializes the Guard singleton:
-
#
-
# * Initialize the internal Guard state;
-
# * Create the interactor
-
# * Select and initialize the file change listener.
-
#
-
# @option options [Boolean] clear if auto clear the UI should be done
-
# @option options [Boolean] notify if system notifications should be shown
-
# @option options [Boolean] debug if debug output should be shown
-
# @option options [Array<String>] group the list of groups to start
-
# @option options [Array<String>] watchdir the directories to watch
-
# @option options [String] guardfile the path to the Guardfile
-
#
-
# @return [Guard] the Guard singleton
-
1
def setup(cmdline_options = {})
-
init(cmdline_options)
-
-
@queue = Internals::Queue.new(Guard)
-
-
_evaluate(state.session.evaluator_options)
-
-
# NOTE: this should be *after* evaluate so :directories can work
-
# TODO: move listener setup to session?
-
@listener = Listen.send(*state.session.listener_args, &_listener_callback)
-
-
ignores = state.session.guardfile_ignore
-
@listener.ignore(ignores) unless ignores.empty?
-
-
ignores = state.session.guardfile_ignore_bang
-
@listener.ignore!(ignores) unless ignores.empty?
-
-
Notifier.connect(state.session.notify_options)
-
-
traps = Internals::Traps
-
traps.handle("USR1") { async_queue_add([:guard_pause, :paused]) }
-
traps.handle("USR2") { async_queue_add([:guard_pause, :unpaused]) }
-
-
@interactor = Interactor.new(state.session.interactor_name == :sleep)
-
traps.handle("INT") { @interactor.handle_interrupt }
-
-
self
-
end
-
-
1
def init(cmdline_options)
-
@state = Internals::State.new(cmdline_options)
-
end
-
-
# Asynchronously trigger changes
-
#
-
# Currently supported args:
-
#
-
# @example Old style hash:
-
# async_queue_add(modified: ['foo'], added: ['bar'], removed: [])
-
#
-
# @example New style signals with args:
-
# async_queue_add([:guard_pause, :unpaused ])
-
#
-
1
def async_queue_add(changes)
-
@queue << changes
-
-
# Putting interactor in background puts guard into foreground
-
# so it can handle change notifications
-
Thread.new { interactor.background }
-
end
-
-
1
private
-
-
# Check if any of the changes are actually watched for
-
# TODO: why iterate twice? reuse this info when running tasks
-
1
def _relevant_changes?(changes)
-
# TODO: no coverage!
-
files = changes.values.flatten(1)
-
scope = Guard.state.scope
-
watchers = scope.grouped_plugins.map do |_group, plugins|
-
plugins.map(&:watchers).flatten
-
end.flatten
-
watchers.any? { |watcher| files.any? { |file| watcher.match(file) } }
-
end
-
-
1
def _relative_pathnames(paths)
-
paths.map { |path| _relative_pathname(path) }
-
end
-
-
1
def _listener_callback
-
lambda do |modified, added, removed|
-
relative_paths = {
-
modified: _relative_pathnames(modified),
-
added: _relative_pathnames(added),
-
removed: _relative_pathnames(removed)
-
}
-
-
_guardfile_deprecated_check(relative_paths[:modified])
-
-
async_queue_add(relative_paths) if _relevant_changes?(relative_paths)
-
end
-
end
-
-
# TODO: obsoleted? (move to Dsl?)
-
1
def _pluginless_guardfile?
-
state.session.plugins.all.empty?
-
end
-
-
1
def _evaluate(options)
-
evaluator = Guardfile::Evaluator.new(options)
-
evaluator.evaluate
-
-
UI.reset_and_clear
-
-
msg = "No plugins found in Guardfile, please add at least one."
-
UI.error msg if _pluginless_guardfile?
-
-
if evaluator.inline?
-
UI.info("Using inline Guardfile.")
-
elsif evaluator.custom?
-
UI.info("Using Guardfile at #{ evaluator.path }.")
-
end
-
rescue Guardfile::Evaluator::NoPluginsError => e
-
UI.error(e.message)
-
end
-
-
# TODO: remove at some point
-
# TODO: not tested because collides with ongoing refactoring
-
1
def _guardfile_deprecated_check(modified)
-
modified.map!(&:to_s)
-
guardfiles = modified.select { |path| /^(?:.+\/)?Guardfile$/.match(path) }
-
return if guardfiles.empty?
-
-
guardfile = Pathname("Guardfile").realpath
-
real_guardfiles = guardfiles.detect do |path|
-
/^Guardfile$/.match(path) || Pathname(path).expand_path == guardfile
-
end
-
-
if real_guardfiles
-
UI.warning "Guardfile changed -- _guard-core will exit.\n"
-
exit 2 # nonzero to break any while loop
-
else # e.g. templates/Guardfile
-
msg = "Config changed: %s - Guard will exit so it can be restarted."
-
UI.info format(msg, guardfiles.inspect)
-
exit 0 # 0 so any shell while loop can continue
-
end
-
end
-
end
-
end
-
1
require "nenv"
-
-
1
module Guard
-
1
config_class = Nenv::Builder.build do
-
1
create_method(:strict?)
-
1
create_method(:gem_silence_deprecations?)
-
end
-
-
1
class Config < config_class
-
1
def initialize
-
12
super "guard"
-
end
-
-
1
def silence_deprecations?
-
gem_silence_deprecations?
-
end
-
end
-
end
-
1
require "guard/config"
-
1
fail "Deprecations disabled (strict mode)" if Guard::Config.new.strict?
-
-
1
module Guard
-
1
module Deprecated
-
1
module Dsl
-
1
def self.add_deprecated(dsl_klass)
-
1
dsl_klass.send(:extend, ClassMethods)
-
end
-
-
1
MORE_INFO_ON_UPGRADING_TO_GUARD_2 = <<-EOS.gsub(/^\s*/, "")
-
For more information on how to upgrade for Guard 2.0, please head over
-
to: https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0%s
-
EOS
-
-
1
module ClassMethods
-
# @deprecated Use
-
# `Guard::Guardfile::Evaluator.new(options).evaluate_guardfile`
-
# instead.
-
#
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How
-
# to upgrade for Guard 2.0
-
#
-
1
EVALUATE_GUARDFILE = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.0 'Guard::Dsl.evaluate_guardfile(options)' is
-
deprecated.
-
-
Please use
-
'Guard::Guardfile::Evaluator.new(options).evaluate_guardfile'
-
instead.
-
-
#{MORE_INFO_ON_UPGRADING_TO_GUARD_2 % '#deprecated-methods-1'}
-
EOS
-
-
1
def evaluate_guardfile(options = {})
-
require "guard/guardfile/evaluator"
-
require "guard/ui"
-
-
UI.deprecation(EVALUATE_GUARDFILE)
-
::Guard::Guardfile::Evaluator.new(options).evaluate_guardfile
-
end
-
end
-
end
-
end
-
end
-
1
require "guard/config"
-
1
fail "Deprecations disabled (strict mode)" if Guard::Config.new.strict?
-
-
1
require "guard/ui"
-
-
1
module Guard
-
1
module Deprecated
-
1
module Evaluator
-
1
def self.add_deprecated(klass)
-
1
klass.send(:include, self)
-
end
-
-
1
EVALUATE_GUARDFILE = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.3 'Guard::Evaluator#evaluate_guardfile' is
-
deprecated in favor of '#evaluate'.
-
EOS
-
-
1
REEVALUATE_GUARDFILE = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.3 'Guard::Evaluator#reevaluate_guardfile' is
-
deprecated in favor of '#reevaluate'.
-
-
NOTE: this method no longer does anything since it could not be
-
implemented reliably.
-
EOS
-
-
1
def evaluate_guardfile
-
UI.deprecation(EVALUATE_GUARDFILE)
-
evaluate
-
end
-
-
1
def reevaluate_guardfile
-
# require guard only when needed, becuase
-
# guard's deprecations require us
-
require "guard"
-
UI.deprecation(REEVALUATE_GUARDFILE)
-
end
-
end
-
end
-
end
-
1
require "guard/config"
-
1
fail "Deprecations disabled (strict mode)" if Guard::Config.new.strict?
-
-
1
require "guard/ui"
-
1
require "guard/internals/session"
-
1
require "guard/internals/state"
-
1
require "guard/guardfile/evaluator"
-
-
1
module Guard
-
# @deprecated Every method in this module is deprecated
-
1
module Deprecated
-
1
module Guard
-
1
def self.add_deprecated(klass)
-
1
klass.send(:extend, ClassMethods)
-
end
-
-
1
module ClassMethods
-
1
MORE_INFO_ON_UPGRADING_TO_GUARD_2 = <<-EOS.gsub(/^\s*/, "")
-
For more information on how to upgrade for Guard 2.0, please head
-
over to: https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0%s
-
EOS
-
-
# @deprecated Use `Guard.plugins(filter)` instead.
-
#
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
-
# upgrade for Guard 2.0
-
#
-
1
GUARDS = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.0 'Guard.guards(filter)' is deprecated.
-
-
Please use 'Guard.plugins(filter)' instead.
-
-
#{MORE_INFO_ON_UPGRADING_TO_GUARD_2 % '#deprecated-methods'}
-
EOS
-
-
1
def guards(filter = nil)
-
::Guard::UI.deprecation(GUARDS)
-
::Guard.state.session.plugins.all(filter)
-
end
-
-
# @deprecated Use `Guard.add_plugin(name, options = {})` instead.
-
#
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
-
# upgrade for Guard 2.0
-
#
-
1
ADD_GUARD = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.0 'Guard.add_guard(name, options = {})' is
-
deprecated.
-
-
Please use 'Guard.add_plugin(name, options = {})' instead.
-
-
#{MORE_INFO_ON_UPGRADING_TO_GUARD_2 % '#deprecated-methods'}
-
EOS
-
-
1
def add_guard(*args)
-
::Guard::UI.deprecation(ADD_GUARD)
-
add_plugin(*args)
-
end
-
-
# @deprecated Use
-
# `Guard::PluginUtil.new(name).plugin_class(fail_gracefully:
-
# fail_gracefully)` instead.
-
#
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
-
# upgrade for Guard 2.0
-
#
-
1
GET_GUARD_CLASS = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.0 'Guard.get_guard_class(name, fail_gracefully
-
= false)' is deprecated and is now always on.
-
-
Please use 'Guard::PluginUtil.new(name).plugin_class(fail_gracefully:
-
fail_gracefully)' instead.
-
-
#{MORE_INFO_ON_UPGRADING_TO_GUARD_2 % '#deprecated-methods'}
-
EOS
-
-
1
def get_guard_class(name, fail_gracefully = false)
-
UI.deprecation(GET_GUARD_CLASS)
-
PluginUtil.new(name).plugin_class(fail_gracefully: fail_gracefully)
-
end
-
-
# @deprecated Use `Guard::PluginUtil.new(name).plugin_location` instead.
-
#
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
-
# upgrade for Guard 2.0
-
#
-
1
LOCATE_GUARD = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.0 'Guard.locate_guard(name)' is deprecated.
-
-
Please use 'Guard::PluginUtil.new(name).plugin_location' instead.
-
-
#{MORE_INFO_ON_UPGRADING_TO_GUARD_2 % '#deprecated-methods'}
-
EOS
-
-
1
def locate_guard(name)
-
UI.deprecation(LOCATE_GUARD)
-
PluginUtil.new(name).plugin_location
-
end
-
-
# @deprecated Use `Guard::PluginUtil.plugin_names` instead.
-
#
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
-
# upgrade for Guard 2.0
-
#
-
# Deprecator message for the `Guard.guard_gem_names` method
-
1
GUARD_GEM_NAMES = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.0 'Guard.guard_gem_names' is deprecated.
-
-
Please use 'Guard::PluginUtil.plugin_names' instead.
-
-
#{MORE_INFO_ON_UPGRADING_TO_GUARD_2 % '#deprecated-methods'}
-
EOS
-
-
1
def guard_gem_names
-
UI.deprecation(GUARD_GEM_NAMES)
-
PluginUtil.plugin_names
-
end
-
-
1
RUNNING = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.7.1 it was discovered that Guard.running was
-
never initialized or used internally.
-
EOS
-
-
1
def running
-
UI.deprecation(RUNNING)
-
nil
-
end
-
-
1
LOCK = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.7.1 it was discovered that this accessor was
-
never initialized or used internally.
-
EOS
-
1
def lock
-
UI.deprecation(LOCK)
-
end
-
-
1
LISTENER_ASSIGN = <<-EOS.gsub(/^\s*/, "")
-
listener= should not be used
-
EOS
-
-
1
def listener=(_)
-
UI.deprecation(LISTENER_ASSIGN)
-
::Guard.listener
-
end
-
-
1
EVALUATOR = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.2 this method shouldn't be used
-
EOS
-
-
1
def evaluator
-
UI.deprecation(EVALUATOR)
-
options = ::Guard.state.session.evaluator_options
-
::Guard::Guardfile::Evaluator.new(options)
-
end
-
-
1
RESET_EVALUATOR = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.2 this method shouldn't be used
-
EOS
-
-
1
def reset_evaluator(_options)
-
UI.deprecation(RESET_EVALUATOR)
-
end
-
-
1
RUNNER = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.2 this method shouldn't be used
-
EOS
-
-
1
def runner
-
UI.deprecation(RUNNER)
-
::Guard::Runner.new
-
end
-
-
1
EVALUATE_GUARDFILE = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.2 this method shouldn't be used
-
EOS
-
-
1
def evaluate_guardfile
-
UI.deprecation(EVALUATE_GUARDFILE)
-
options = ::Guard.state.session.evaluator_options
-
evaluator = ::Guard::Guardfile::Evaluator.new(options)
-
evaluator.evaluate
-
msg = "No plugins found in Guardfile, please add at least one."
-
::Guard::UI.error msg if _pluginless_guardfile?
-
end
-
-
1
OPTIONS = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.9.0 Guard.options is deprecated and ideally you
-
should be able to set specific options through an API or a DSL
-
method. Feel free to add feature requests if there's something
-
missing.
-
EOS
-
-
1
def options
-
UI.deprecation(OPTIONS)
-
-
Class.new(Hash) do
-
def initialize
-
super(to_hash)
-
end
-
-
def to_hash
-
session = ::Guard.state.session
-
{
-
clear: session.clearing?,
-
debug: session.debug?,
-
watchdir: Array(session.watchdirs).map(&:to_s),
-
notify: session.notify_options[:notify],
-
no_interactions: (session.interactor_name == :sleep)
-
}
-
end
-
-
def to_a
-
to_hash.to_a
-
end
-
-
def fetch(key, *args)
-
hash = to_hash
-
verify_key!(hash, key)
-
hash.fetch(key, *args)
-
end
-
-
def []=(key, value)
-
case key
-
when :clear
-
::Guard.state.session.clearing(value)
-
else
-
msg = "Oops! Guard.option[%s]= is unhandled or unsupported." \
-
"Please file an issue if you rely on this option working."
-
fail NotImplementedError, format(msg, key)
-
end
-
end
-
-
def keys
-
to_hash.keys
-
end
-
-
def include?(value)
-
keys.include? value
-
end
-
-
private
-
-
def verify_key!(hash, key)
-
return if hash.key?(key)
-
msg = "Oops! Guard.option[%s] is unhandled or unsupported." \
-
"Please file an issue if you rely on this option working."
-
fail NotImplementedError, format(msg, key)
-
end
-
end.new
-
end
-
-
1
ADD_GROUP = <<-EOS.gsub(/^\s*/, "")
-
add_group is deprecated since 2.10.0 in favor of
-
Guard.state.session.groups.add
-
EOS
-
-
1
def add_group(name, options = {})
-
UI.deprecation(ADD_GROUP)
-
::Guard.state.session.groups.add(name, options)
-
end
-
-
1
ADD_PLUGIN = <<-EOS.gsub(/^\s*/, "")
-
add_plugin is deprecated since 2.10.0 in favor of
-
Guard.state.session.plugins.add
-
EOS
-
-
1
def add_plugin(name, options = {})
-
UI.deprecation(ADD_PLUGIN)
-
::Guard.state.session.plugins.add(name, options)
-
end
-
-
1
GROUP = <<-EOS.gsub(/^\s*/, "")
-
group is deprecated since 2.10.0 in favor of
-
Guard.state.session.group.add(filter).first
-
EOS
-
-
1
def group(filter)
-
UI.deprecation(GROUP)
-
::Guard.state.session.groups.all(filter).first
-
end
-
-
1
PLUGIN = <<-EOS.gsub(/^\s*/, "")
-
plugin is deprecated since 2.10.0 in favor of
-
Guard.state.session.group.add(filter).first
-
EOS
-
-
1
def plugin(filter)
-
UI.deprecation(PLUGIN)
-
::Guard.state.session.plugins.all(filter).first
-
end
-
-
1
GROUPS = <<-EOS.gsub(/^\s*/, "")
-
group is deprecated since 2.10.0 in favor of
-
Guard.state.session.groups.all(filter)
-
EOS
-
-
1
def groups(filter)
-
UI.deprecation(GROUPS)
-
::Guard.state.session.groups.all(filter)
-
end
-
-
1
PLUGINS = <<-EOS.gsub(/^\s*/, "")
-
plugins is deprecated since 2.10.0 in favor of
-
Guard.state.session.plugins.all(filter)
-
EOS
-
-
1
def plugins(filter)
-
UI.deprecation(PLUGINS)
-
::Guard.state.session.plugins.all(filter)
-
end
-
-
1
SCOPE = <<-EOS.gsub(/^\s*/, "")
-
scope is deprecated since 2.10.0 in favor of
-
Guard.state.scope.to_hash
-
EOS
-
-
1
def scope
-
UI.deprecation(SCOPE)
-
::Guard.state.scope.to_hash
-
end
-
-
1
SCOPE_ASSIGN = <<-EOS.gsub(/^\s*/, "")
-
scope= is deprecated since 2.10.0 in favor of
-
Guard.state.scope.to_hash
-
EOS
-
-
1
def scope=(scope)
-
UI.deprecation(SCOPE_ASSIGN)
-
::Guard.state.scope.from_interactor(scope)
-
end
-
end
-
end
-
end
-
end
-
1
require "guard/config"
-
1
fail "Deprecations disabled (strict mode)" if Guard::Config.new.strict?
-
-
1
module Guard
-
1
module Deprecated
-
1
module Watcher
-
1
def self.add_deprecated(dsl_klass)
-
1
dsl_klass.send(:extend, ClassMethods)
-
end
-
-
1
module ClassMethods
-
1
MATCH_GUARDFILE = <<-EOS.gsub(/^\s*/, "")
-
Starting with Guard 2.8.3 this method is deprecated.
-
EOS
-
-
1
def match_guardfile?(files)
-
require "guard/guardfile/evaluator"
-
UI.deprecation(MATCH_GUARDFILE)
-
options = ::Guard.state.session.evaluator_options
-
evaluator = ::Guard::Guardfile::Evaluator.new(options)
-
path = evaluator.guardfile_path
-
files.any? { |file| File.expand_path(file) == path }
-
end
-
end
-
end
-
end
-
end
-
1
require "guard/guardfile/evaluator"
-
1
require "guard/interactor"
-
1
require "guard/notifier"
-
1
require "guard/ui"
-
1
require "guard/watcher"
-
-
1
require "guard/deprecated/dsl" unless Guard::Config.new.strict?
-
1
require "guard"
-
-
1
module Guard
-
# The Dsl class provides the methods that are used in each `Guardfile` to
-
# describe the behaviour of Guard.
-
#
-
# The main keywords of the DSL are {#guard} and {#watch}. These are necessary
-
# to define the used Guard plugins and the file changes they are watching.
-
#
-
# You can optionally group the Guard plugins with the {#group} keyword and
-
# ignore and filter certain paths with the {#ignore} and {#filter} keywords.
-
#
-
# You can set your preferred system notification library with {#notification}
-
# and pass some optional configuration options for the library. If you don't
-
# configure a library, Guard will automatically pick one with default options
-
# (if you don't want notifications, specify `:off` as library). Please see
-
# {Notifier} for more information about the supported libraries.
-
#
-
# A more advanced DSL use is the {#callback} keyword that allows you to
-
# execute arbitrary code before or after any of the {Plugin#start},
-
# {Plugin#stop}, {Plugin#reload}, {Plugin#run_all},
-
# {Plugin#run_on_changes}, {Plugin#run_on_additions},
-
# {Plugin#run_on_modifications} and {Plugin#run_on_removals}
-
# Guard plugins method.
-
# You can even insert more hooks inside these methods. Please [checkout the
-
# Wiki page](https://github.com/guard/guard/wiki/Hooks-and-callbacks) for
-
# more details.
-
#
-
# The DSL will also evaluate normal Ruby code.
-
#
-
# There are two possible locations for the `Guardfile`:
-
#
-
# * The `Guardfile` in the current directory where Guard has been started
-
# * The `.Guardfile` in your home directory.
-
#
-
# In addition, if a user configuration `.guard.rb` in your home directory is
-
# found, it will be appended to the current project `Guardfile`.
-
#
-
# @see https://github.com/guard/guard/wiki/Guardfile-examples
-
#
-
1
class Dsl
-
1
Deprecated::Dsl.add_deprecated(self) unless Config.new.strict?
-
-
# Wrap exceptions during parsing Guardfile
-
1
class Error < RuntimeError
-
end
-
-
1
WARN_INVALID_LOG_LEVEL = "Invalid log level `%s` ignored. "\
-
"Please use either :debug, :info, :warn or :error."
-
-
1
WARN_INVALID_LOG_OPTIONS = "You cannot specify the logger options"\
-
" :only and :except at the same time."
-
-
# Set notification options for the system notifications.
-
# You can set multiple notifications, which allows you to show local
-
# system notifications and remote notifications with separate libraries.
-
# You can also pass `:off` as library to turn off notifications.
-
#
-
# @example Define multiple notifications
-
# notification :ruby_gntp
-
# notification :ruby_gntp, host: '192.168.1.5'
-
#
-
# @param [Symbol, String] notifier the name of the notifier to use
-
# @param [Hash] options the notification library options
-
#
-
# @see Guard::Notifier for available notifier and its options.
-
#
-
1
def notification(notifier, opts = {})
-
Guard.state.session.guardfile_notification = { notifier.to_sym => opts }
-
end
-
-
# Sets the interactor options or disable the interactor.
-
#
-
# @example Pass options to the interactor
-
# interactor option1: 'value1', option2: 'value2'
-
#
-
# @example Turn off interactions
-
# interactor :off
-
#
-
# @param [Symbol, Hash] options either `:off` or a Hash with interactor
-
# options
-
#
-
1
def interactor(options)
-
# TODO: remove dependency on Interactor (let session handle this)
-
case options
-
when :off
-
Interactor.enabled = false
-
when Hash
-
Interactor.options = options
-
end
-
end
-
-
# Declares a group of Guard plugins to be run with `guard start --group
-
# group_name`.
-
#
-
# @example Declare two groups of Guard plugins
-
# group :backend do
-
# guard :spork
-
# guard :rspec
-
# end
-
#
-
# group :frontend do
-
# guard :passenger
-
# guard :livereload
-
# end
-
#
-
# @param [Symbol, String, Array<Symbol, String>] name the group name called
-
# from the CLI
-
# @param [Hash] options the options accepted by the group
-
# @yield a block where you can declare several Guard plugins
-
#
-
# @see Group
-
# @see Guard.add_group
-
# @see #guard
-
#
-
1
def group(*args)
-
options = args.last.is_a?(Hash) ? args.pop : {}
-
groups = args
-
-
groups.each do |group|
-
next unless group.to_sym == :all
-
fail ArgumentError, "'all' is not an allowed group name!"
-
end
-
-
if block_given?
-
groups.each do |group|
-
# TODO: let groups be added *after* evaluation
-
Guard.state.session.groups.add(group, options)
-
end
-
-
@current_groups ||= []
-
@current_groups.push(groups)
-
-
yield
-
-
@current_groups.pop
-
else
-
UI.error \
-
"No Guard plugins found in the group '#{ groups.join(', ') }',"\
-
" please add at least one."
-
end
-
end
-
-
# Declares a Guard plugin to be used when running `guard start`.
-
#
-
# The name parameter is usually the name of the gem without
-
# the 'guard-' prefix.
-
#
-
# The available options are different for each Guard implementation.
-
#
-
# @example Declare a Guard without `watch` patterns
-
# guard :rspec
-
#
-
# @example Declare a Guard with a `watch` pattern
-
# guard :rspec do
-
# watch %r{.*_spec.rb}
-
# end
-
#
-
# @param [String] name the Guard plugin name
-
# @param [Hash] options the options accepted by the Guard plugin
-
# @yield a block where you can declare several watch patterns and actions
-
#
-
# @see Plugin
-
# @see Guard.add_plugin
-
# @see #watch
-
# @see #group
-
#
-
1
def guard(name, options = {})
-
@plugin_options = options.merge(watchers: [], callbacks: [])
-
-
yield if block_given?
-
-
@current_groups ||= []
-
groups = @current_groups && @current_groups.last || [:default]
-
groups.each do |group|
-
opts = @plugin_options.merge(group: group)
-
# TODO: let plugins be added *after* evaluation
-
Guard.state.session.plugins.add(name, opts)
-
end
-
-
@plugin_options = nil
-
end
-
-
# Defines a pattern to be watched in order to run actions on file
-
# modification.
-
#
-
# @example Declare watchers for a Guard
-
# guard :rspec do
-
# watch('spec/spec_helper.rb')
-
# watch(%r{^.+_spec.rb})
-
# watch(%r{^app/controllers/(.+).rb}) do |m|
-
# 'spec/acceptance/#{m[1]}s_spec.rb'
-
# end
-
# end
-
#
-
# @example Declare global watchers outside of a Guard
-
# watch(%r{^(.+)$}) { |m| puts "#{m[1]} changed." }
-
#
-
# @param [String, Regexp] pattern the pattern that Guard must watch for
-
# modification
-
#
-
# @yield a block to be run when the pattern is matched
-
# @yieldparam [MatchData] m matches of the pattern
-
# @yieldreturn a directory, a filename, an array of
-
# directories / filenames, or nothing (can be an arbitrary command)
-
#
-
# @see Guard::Watcher
-
# @see #guard
-
#
-
1
def watch(pattern, &action)
-
# Allow watches in the global scope (to execute arbitrary commands) by
-
# building a generic Guard::Plugin.
-
@plugin_options ||= nil
-
return guard(:plugin) { watch(pattern, &action) } unless @plugin_options
-
-
@plugin_options[:watchers] << Watcher.new(pattern, action)
-
end
-
-
# Defines a callback to execute arbitrary code before or after any of
-
# the `start`, `stop`, `reload`, `run_all`, `run_on_changes`,
-
# `run_on_additions`, `run_on_modifications` and `run_on_removals` plugin
-
# method.
-
#
-
# @example Add callback before the `reload` action.
-
# callback(:reload_begin) { puts "Let's reload!" }
-
#
-
# @example Add callback before the `start` and `stop` actions.
-
#
-
# my_lambda = lambda do |plugin, event, *args|
-
# puts "Let's #{event} #{plugin} with #{args}!"
-
# end
-
#
-
# callback(my_lambda, [:start_begin, :start_end])
-
#
-
# @param [Array] args the callback arguments
-
# @yield a callback block
-
#
-
1
def callback(*args, &block)
-
@plugin_options ||= nil
-
fail "callback must be called within a guard block" unless @plugin_options
-
-
block, events = if args.size > 1
-
# block must be the first argument in that case, the
-
# yielded block is ignored
-
args
-
else
-
[block, args[0]]
-
end
-
@plugin_options[:callbacks] << { events: events, listener: block }
-
end
-
-
# Ignores certain paths globally.
-
#
-
# @example Ignore some paths
-
# ignore %r{^ignored/path/}, /man/
-
#
-
# @param [Regexp] regexps a pattern (or list of patterns) for ignoring paths
-
#
-
1
def ignore(*regexps)
-
# TODO: use guardfile results class
-
Guard.state.session.guardfile_ignore = regexps
-
end
-
-
# TODO: deprecate
-
1
alias filter ignore
-
-
# Replaces ignored paths globally
-
#
-
# @example Ignore only these paths
-
# ignore! %r{^ignored/path/}, /man/
-
#
-
# @param [Regexp] regexps a pattern (or list of patterns) for ignoring paths
-
#
-
1
def ignore!(*regexps)
-
@ignore_regexps ||= []
-
@ignore_regexps << regexps
-
# TODO: use guardfile results class
-
Guard.state.session.guardfile_ignore_bang = @ignore_regexps
-
end
-
-
# TODO: deprecate
-
1
alias filter! ignore!
-
-
# Configures the Guard logger.
-
#
-
# * Log level must be either `:debug`, `:info`, `:warn` or `:error`.
-
# * Template supports the following placeholders: `:time`, `:severity`,
-
# `:progname`, `:pid`, `:unit_of_work_id` and `:message`.
-
# * Time format directives are the same as `Time#strftime` or
-
# `:milliseconds`.
-
# * The `:only` and `:except` options must be a `RegExp`.
-
#
-
# @example Set the log level
-
# logger level: :warn
-
#
-
# @example Set a custom log template
-
# logger template: '[Guard - :severity - :progname - :time] :message'
-
#
-
# @example Set a custom time format
-
# logger time_format: '%h'
-
#
-
# @example Limit logging to a Guard plugin
-
# logger only: :jasmine
-
#
-
# @example Log all but not the messages from a specific Guard plugin
-
# logger except: :jasmine
-
#
-
# @param [Hash] options the log options
-
# @option options [String, Symbol] level the log level
-
# @option options [String] template the logger template
-
# @option options [String, Symbol] time_format the time format
-
# @option options [Regexp] only show only messages from the matching Guard
-
# plugin
-
# @option options [Regexp] except does not show messages from the matching
-
# Guard plugin
-
#
-
1
def logger(options)
-
if options[:level]
-
options[:level] = options[:level].to_sym
-
-
unless [:debug, :info, :warn, :error].include? options[:level]
-
UI.warning WARN_INVALID_LOG_LEVEL % [options[:level]]
-
options.delete :level
-
end
-
end
-
-
if options[:only] && options[:except]
-
UI.warning WARN_INVALID_LOG_OPTIONS
-
-
options.delete :only
-
options.delete :except
-
end
-
-
# Convert the :only and :except options to a regular expression
-
[:only, :except].each do |name|
-
next unless options[name]
-
-
list = [].push(options[name]).flatten.map do |plugin|
-
Regexp.escape(plugin.to_s)
-
end
-
-
options[name] = Regexp.new(list.join("|"), Regexp::IGNORECASE)
-
end
-
-
UI.options.merge!(options)
-
end
-
-
# Sets the default scope on startup
-
#
-
# @example Scope Guard to a single group
-
# scope group: :frontend
-
#
-
# @example Scope Guard to multiple groups
-
# scope groups: [:specs, :docs]
-
#
-
# @example Scope Guard to a single plugin
-
# scope plugin: :test
-
#
-
# @example Scope Guard to multiple plugins
-
# scope plugins: [:jasmine, :rspec]
-
#
-
# @param [Hash] scopes the scope for the groups and plugins
-
#
-
1
def scope(scope = {})
-
# TODO: use a Guardfile::Results class
-
Guard.state.session.guardfile_scope(scope)
-
end
-
-
1
def evaluate(contents, filename, lineno) # :nodoc
-
instance_eval(contents, filename.to_s, lineno)
-
rescue StandardError, ScriptError => e
-
prefix = "\n\t(dsl)> "
-
cleaned_backtrace = _cleanup_backtrace(e.backtrace)
-
backtrace = "#{prefix}#{cleaned_backtrace.join(prefix)}"
-
msg = "Invalid Guardfile, original error is: \n\n%s, \nbacktrace: %s"
-
raise Error, format(msg, e, backtrace)
-
end
-
-
# Sets the directories to pass to Listen
-
#
-
# @example watch only given directories
-
# directories %w(lib specs)
-
#
-
# @param [Array] directories directories for Listen to watch
-
#
-
1
def directories(directories)
-
directories.each do |dir|
-
fail "Directory #{dir.inspect} does not exist!" unless Dir.exist?(dir)
-
end
-
Guard.state.session.watchdirs = directories
-
end
-
-
# Sets Guard to clear the screen before every task is run
-
#
-
# @example switching clearing the screen on
-
# clearing(:on)
-
#
-
# @param [Symbol] on ':on' to turn on, ':off' (default) to turn off
-
#
-
1
def clearing(on)
-
Guard.state.session.clearing(on == :on)
-
end
-
-
1
private
-
-
1
def _cleanup_backtrace(backtrace)
-
dirs = { File.realpath(Dir.pwd) => ".", }
-
-
gem_env = ENV["GEM_HOME"] || ""
-
dirs[gem_env] = "$GEM_HOME" unless gem_env.empty?
-
-
gem_paths = (ENV["GEM_PATH"] || "").split(File::PATH_SEPARATOR)
-
gem_paths.each_with_index do |path, index|
-
dirs[path] = "$GEM_PATH[#{index}]"
-
end
-
-
backtrace.dup.map do |raw_line|
-
path = nil
-
symlinked_path = raw_line.split(":").first
-
begin
-
path = raw_line.sub(symlinked_path, File.realpath(symlinked_path))
-
dirs.detect { |dir, name| path.sub!(File.realpath(dir), name) }
-
path
-
rescue Errno::ENOENT
-
path || symlinked_path
-
end
-
end
-
end
-
end
-
end
-
1
require "guard/dsl"
-
-
1
module Guard
-
# TODO: this should probably be a base class for Dsl instead (in Guard 3.x)
-
1
class DslReader < Dsl
-
1
attr_reader :plugin_names
-
-
1
def initialize
-
super
-
@plugin_names = []
-
end
-
-
1
def guard(name, _options = {})
-
@plugin_names << name.to_s
-
end
-
-
# Stub everything else
-
1
def notification(_notifier, _opts = {})
-
end
-
-
1
def interactor(_options)
-
end
-
-
1
def group(*_args)
-
end
-
-
1
def watch(_pattern, &_action)
-
end
-
-
1
def callback(*_args, &_block)
-
end
-
-
1
def ignore(*_regexps)
-
end
-
-
1
def ignore!(*_regexps)
-
end
-
-
1
def logger(_options)
-
end
-
-
1
def scope(_scope = {})
-
end
-
-
1
def directories(_directories)
-
end
-
-
1
def clearing(_on)
-
end
-
end
-
end
-
1
module Guard
-
# A group of Guard plugins. There are two reasons why you want to group your
-
# Guard plugins:
-
#
-
# * You can start only certain groups from the command line by passing the
-
# `--group` option to `guard start`.
-
# * Abort task execution chain on failure within a group with the
-
# `:halt_on_fail` option.
-
#
-
# @example Group that aborts on failure
-
#
-
# group :frontend, halt_on_fail: true do
-
# guard 'coffeescript', input: 'spec/coffeescripts',
-
# output: 'spec/javascripts'
-
# guard 'jasmine-headless-webkit' do
-
# watch(%r{^spec/javascripts/(.*)\..*}) do |m|
-
# newest_js_file("spec/javascripts/#{m[1]}_spec")
-
# end
-
# end
-
# end
-
#
-
# @see Guard::CLI
-
#
-
1
class Group
-
1
attr_accessor :name, :options
-
-
# Initializes a Group.
-
#
-
# @param [String] name the name of the group
-
# @param [Hash] options the group options
-
# @option options [Boolean] halt_on_fail if a task execution
-
# should be halted for all Guard plugins in this group if a Guard plugin
-
# throws `:task_has_failed`
-
#
-
1
def initialize(name, options = {})
-
@name = name.to_sym
-
@options = options
-
end
-
-
# Returns the group title.
-
#
-
# @example Title for a group named 'backend'
-
# > Guard::Group.new('backend').title
-
# => "Backend"
-
#
-
# @return [String]
-
#
-
1
def title
-
@title ||= name.to_s.capitalize
-
end
-
-
# String representation of the group.
-
#
-
# @example String representation of a group named 'backend'
-
# > Guard::Group.new('backend').to_s
-
# => "#<Guard::Group @name=backend @options={}>"
-
#
-
# @return [String] the string representation
-
#
-
1
def to_s
-
"#<#{self.class} @name=#{name} @options=#{options}>"
-
end
-
end
-
end
-
1
require "guard/config"
-
1
require "guard/deprecated/evaluator" unless Guard::Config.new.strict?
-
-
1
require "guard/options"
-
1
require "guard/plugin"
-
-
1
require "guard/dsl"
-
1
require "guard/dsl_reader"
-
-
1
module Guard
-
1
module Guardfile
-
# This class is responsible for evaluating the Guardfile. It delegates to
-
# Guard::Dsl for the actual objects generation from the Guardfile content.
-
#
-
# @see Guard::Dsl
-
#
-
# TODO: rename this to a Locator or Loader or something
-
1
class Evaluator
-
1
Deprecated::Evaluator.add_deprecated(self) unless Config.new.strict?
-
-
1
ERROR_NO_GUARDFILE = "No Guardfile found,"\
-
" please create one with `guard init`."
-
-
1
attr_reader :options, :guardfile_path
-
-
1
ERROR_NO_PLUGINS = "No Guard plugins found in Guardfile,"\
-
" please add at least one."
-
-
1
class Error < RuntimeError
-
end
-
-
1
class NoGuardfileError < Error
-
end
-
-
1
class NoCustomGuardfile < Error
-
end
-
-
1
class NoPluginsError < Error
-
end
-
-
1
def guardfile_source
-
@source
-
end
-
-
# Initializes a new Guard::Guardfile::Evaluator object.
-
#
-
# @option opts [String] guardfile the path to a valid Guardfile
-
# @option opts [String] contents a string representing the
-
# content of a valid Guardfile
-
#
-
1
def initialize(opts = {})
-
@type = nil
-
@path = nil
-
@user_config = nil
-
-
opts = _from_deprecated(opts)
-
-
if opts[:contents]
-
@type = :inline
-
@contents = opts[:contents]
-
else
-
if opts[:guardfile]
-
@type = :custom
-
@path = Pathname(opts[:guardfile]) # may be updated by _read
-
end
-
end
-
end
-
-
# Evaluates the DSL methods in the `Guardfile`.
-
#
-
# @example Programmatically evaluate a Guardfile
-
# Guard::Guardfile::Evaluator.new.evaluate
-
#
-
# @example Programmatically evaluate a Guardfile with a custom Guardfile
-
# path
-
#
-
# options = { guardfile: '/Users/guardfile/MyAwesomeGuardfile' }
-
# Guard::Guardfile::Evaluator.new(options).evaluate
-
#
-
# @example Programmatically evaluate a Guardfile with an inline Guardfile
-
#
-
# options = { contents: 'guard :rspec' }
-
# Guard::Guardfile::Evaluator.new(options).evaluate
-
#
-
1
def evaluate
-
inline? || _use_provided || _use_default!
-
-
contents = _guardfile_contents
-
fail NoPluginsError, ERROR_NO_PLUGINS unless /guard/m =~ contents
-
-
Dsl.new.evaluate(contents, @path || "", 1)
-
end
-
-
# Tests if the current `Guardfile` contains a specific Guard plugin.
-
#
-
# @example Programmatically test if a Guardfile contains a specific Guard
-
# plugin
-
#
-
# File.read('Guardfile')
-
# => "guard :rspec"
-
#
-
# Guard::Guardfile::Evaluator.new.guardfile_include?('rspec)
-
# => true
-
#
-
# @param [String] plugin_name the name of the Guard
-
# @return [Boolean] whether the Guard plugin has been declared
-
#
-
# TODO: rename this method to it matches RSpec examples better
-
1
def guardfile_include?(plugin_name)
-
reader = DslReader.new
-
reader.evaluate(@contents, @path || "", 1)
-
reader.plugin_names.include?(plugin_name)
-
end
-
-
1
attr_reader :path
-
-
1
def custom?
-
@type == :custom
-
end
-
-
# Gets the content of the `Guardfile` concatenated with the global
-
# user configuration file.
-
#
-
# @example Programmatically get the content of the current Guardfile
-
# Guard::Guardfile::Evaluator.new.guardfile_contents
-
# => "guard :rspec"
-
#
-
# @return [String] the Guardfile content
-
#
-
1
def guardfile_contents
-
config = File.read(_user_config_path) if File.exist?(_user_config_path)
-
[_guardfile_contents_without_user_config, config].compact.join("\n")
-
end
-
-
1
def inline?
-
@type == :inline
-
end
-
-
1
private
-
-
1
def _guardfile_contents_without_user_config
-
@guardfile_contents || ""
-
end
-
-
1
def _instance_eval_guardfile(contents)
-
Dsl.new.evaluate(contents, @guardfile_path || "", 1)
-
rescue => ex
-
UI.error "Invalid Guardfile, original error is:\n#{ $! }"
-
raise ex
-
end
-
-
1
def _fetch_guardfile_contents
-
_use_inline || _use_provided || _use_default
-
@evaluated = true
-
-
return if _guardfile_contents_usable?
-
UI.error "No Guard plugins found in Guardfile,"\
-
" please add at least one."
-
end
-
-
1
def _use_inline
-
source_from_option = @source.nil? && options[:guardfile_contents]
-
inline = @source == :inline
-
-
return false unless (source_from_option) || inline
-
-
@source = :inline
-
@guardfile_contents = options[:guardfile_contents]
-
-
UI.info "Using inline Guardfile."
-
true
-
end
-
-
1
def _use_provided
-
return unless custom?
-
@path, @contents = _read(@path)
-
true
-
rescue Errno::ENOENT
-
fail NoCustomGuardfile, "No Guardfile exists at #{ @path }."
-
end
-
-
1
def _use_default!
-
@path, @contents = _read("Guardfile")
-
@type = :default
-
rescue Errno::ENOENT
-
begin
-
@path, @contents = _read("~/.Guardfile")
-
@type = :default
-
rescue Errno::ENOENT
-
fail NoGuardfileError, ERROR_NO_GUARDFILE
-
end
-
end
-
-
1
def _read(path)
-
full_path = Pathname(path).expand_path
-
[full_path, full_path.read]
-
rescue Errno::ENOENT
-
fail
-
rescue SystemCallError => e
-
UI.error "Error reading file #{full_path}:"
-
UI.error e.inspect
-
UI.error e.backtrace
-
abort
-
end
-
-
1
def _guardfile_contents
-
@user_config ||= Pathname("~/.guard.rb").expand_path.read
-
[@contents, @user_config].compact.join("\n")
-
rescue Errno::ENOENT
-
@contents || ""
-
end
-
-
1
def _guardfile_contents_usable?
-
guardfile_contents && guardfile_contents =~ /guard/m
-
end
-
-
1
def _from_deprecated(opts)
-
res = opts.dup
-
if opts.key?(:guardfile_contents)
-
res[:contents] = opts[:guardfile_contents]
-
end
-
res
-
end
-
end
-
end
-
end
-
1
module Guard
-
1
class Interactor
-
# Initializes the interactor. This configures
-
# Pry and creates some custom commands and aliases
-
# for Guard.
-
#
-
1
def initialize(no_interaction = false)
-
@interactive = !no_interaction && self.class.enabled?
-
-
# TODO: only require the one used
-
require "guard/jobs/sleep"
-
require "guard/jobs/pry_wrapper"
-
-
job_klass = interactive? ? Jobs::PryWrapper : Jobs::Sleep
-
@idle_job = job_klass.new(self.class.options)
-
end
-
-
1
def interactive?
-
@interactive
-
end
-
-
# Run in foreground and wait until interrupted or closed
-
1
def foreground
-
idle_job.foreground
-
end
-
-
# Remove interactor so other tasks can run in foreground
-
1
def background
-
idle_job.background
-
end
-
-
1
def handle_interrupt
-
idle_job.handle_interrupt
-
end
-
-
# TODO: everything below is just so the DSL can set options
-
# before setup() is called, which makes it useless for when
-
# Guardfile is reevaluated
-
1
class << self
-
1
def options
-
@options ||= {}
-
end
-
-
# Pass options to interactor's job when it's created
-
1
attr_writer :options
-
-
# TODO: allow custom user idle jobs, e.g. [:pry, :sleep, :exit, ...]
-
1
def enabled?
-
@enabled || @enabled.nil?
-
end
-
-
1
alias_method :enabled, :enabled?
-
-
# TODO: handle switching interactors during runtime?
-
1
attr_writer :enabled
-
end
-
-
1
private
-
-
1
attr_reader :idle_job
-
end
-
end
-
# Because it's used by Sheller
-
1
require "open3"
-
1
require "logger"
-
-
1
require "guard/ui"
-
-
1
require "guard/internals/tracing"
-
-
1
module Guard
-
# @private api
-
1
module Internals
-
1
class Debugging
-
1
class << self
-
1
TRACES = [
-
[Kernel, :system],
-
[Kernel, :`],
-
[Open3, :popen3]
-
]
-
-
# Sets up debugging:
-
#
-
# * aborts on thread exceptions
-
# * Set the logging level to `:debug`
-
# * traces execution of Kernel.system and backtick calls
-
1
def start
-
return if @started ||= false
-
@started = true
-
-
Thread.abort_on_exception = true
-
-
UI.level = Logger::DEBUG
-
-
TRACES.each { |mod, meth| _trace(mod, meth, &method(:_notify)) }
-
@traced = true
-
end
-
-
1
def stop
-
return unless @started ||= false
-
UI.level = Logger::INFO
-
_reset
-
end
-
-
1
private
-
-
1
def _notify(*args)
-
UI.debug "Command execution: #{args.join(' ')}"
-
end
-
-
# reset singleton - called by tests
-
1
def _reset
-
@started = false
-
return unless @traced
-
TRACES.each { |mod, meth| _untrace(mod, meth) }
-
@traced = false
-
end
-
-
1
def _trace(mod, meth, &block)
-
Tracing.trace(mod, meth, &block)
-
end
-
-
1
def _untrace(mod, meth)
-
Tracing.untrace(mod, meth)
-
end
-
end
-
end
-
end
-
end
-
1
require "guard/group"
-
-
1
module Guard
-
# @private api
-
1
module Internals
-
1
class Groups
-
1
DEFAULT_GROUPS = [:common, :default]
-
-
1
def initialize
-
@groups = DEFAULT_GROUPS.map { |name| Group.new(name) }
-
end
-
-
1
def all(filter = nil)
-
return @groups if filter.nil?
-
matcher = matcher_for(filter)
-
@groups.select { |group| matcher.call(group) }
-
end
-
-
1
def add(name, options = {})
-
all(name).first || Group.new(name, options).tap do |group|
-
fail if name == :specs && options.empty?
-
@groups << group
-
end
-
end
-
-
1
private
-
-
1
def matcher_for(filter)
-
case filter
-
when String, Symbol
-
lambda { |group| group.name == filter.to_sym }
-
when Regexp
-
lambda { |group| group.name.to_s =~ filter }
-
else
-
fail "Invalid filter: #{filter.inspect}"
-
end
-
end
-
end
-
end
-
end
-
1
module Guard
-
# @private api
-
1
module Internals
-
1
module Helpers
-
1
def _relative_pathname(path)
-
full_path = Pathname(path)
-
full_path.relative_path_from(Pathname.pwd)
-
rescue ArgumentError
-
full_path
-
end
-
end
-
end
-
end
-
1
require "guard/plugin_util"
-
1
require "guard/group"
-
1
require "guard/plugin"
-
-
1
module Guard
-
# @private api
-
1
module Internals
-
1
class Plugins
-
1
def initialize
-
@plugins = []
-
end
-
-
1
def all(filter = nil)
-
return @plugins if filter.nil?
-
matcher = matcher_for(filter)
-
@plugins.select { |plugin| matcher.call(plugin) }
-
end
-
-
1
def remove(plugin)
-
@plugins.delete(plugin)
-
end
-
-
# TODO: should it allow duplicates? (probably yes because of different
-
# configs or groups)
-
1
def add(name, options)
-
@plugins << PluginUtil.new(name).initialize_plugin(options)
-
end
-
-
1
private
-
-
1
def matcher_for(filter)
-
case filter
-
when String, Symbol
-
shortname = filter.to_s.downcase.gsub("-", "")
-
lambda { |plugin| plugin.name == shortname }
-
when Regexp
-
lambda { |plugin| plugin.name =~ filter }
-
when Hash
-
lambda do |plugin|
-
filter.all? do |k, v|
-
case k
-
when :name
-
plugin.name == v.to_s.downcase.gsub("-", "")
-
when :group
-
plugin.group.name == v.to_sym
-
end
-
end
-
end
-
end
-
end
-
end
-
end
-
end
-
1
module Guard
-
1
module Internals
-
1
class Queue
-
1
def initialize(commander)
-
@commander = commander
-
@queue = ::Queue.new
-
end
-
-
# Process the change queue, running tasks within the main Guard thread
-
1
def process
-
actions, changes = [], { modified: [], added: [], removed: [] }
-
-
while pending?
-
if (item = @queue.pop).first.is_a?(Symbol)
-
actions << item
-
else
-
item.each { |key, value| changes[key] += value }
-
end
-
end
-
-
_run_actions(actions)
-
return if changes.values.all?(&:empty?)
-
Runner.new.run_on_changes(*changes.values)
-
end
-
-
1
def pending?
-
! @queue.empty?
-
end
-
-
1
def <<(changes)
-
@queue << changes
-
end
-
-
1
private
-
-
1
def _run_actions(actions)
-
actions.each do |action_args|
-
args = action_args.dup
-
namespaced_action = args.shift
-
action = namespaced_action.to_s.sub(/^guard_/, "")
-
if @commander.respond_to?(action)
-
@commander.send(action, *args)
-
else
-
fail "Unknown action: #{action.inspect}"
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require "guard"
-
-
1
module Guard
-
# @private api
-
1
module Internals
-
1
class Scope
-
1
def initialize
-
@interactor_plugin_scope = []
-
@interactor_group_scope = []
-
end
-
-
1
def to_hash
-
{
-
plugins: _hashify_scope(:plugin),
-
groups: _hashify_scope(:group)
-
}.dup.freeze
-
end
-
-
# TODO: refactor
-
1
def grouped_plugins(scope = { plugins: [], groups: [] })
-
items = nil
-
plugins = _find_non_empty_scope(:plugins, scope)
-
if plugins
-
items = Array(plugins).map { |plugin| _instantiate(:plugin, plugin) }
-
end
-
-
unless items
-
# TODO: no coverage here!!
-
found = _find_non_empty_scope(:groups, scope)
-
found ||= Guard.state.session.groups.all
-
groups = Array(found).map { |group| _instantiate(:group, group) }
-
if groups.any? { |g| g.name == :common }
-
items = groups
-
else
-
items = ([_instantiate(:group, :common)] + Array(found)).compact
-
end
-
end
-
-
items.map do |plugin_or_group|
-
group = nil
-
plugins = [plugin_or_group]
-
if plugin_or_group.is_a?(Group)
-
# TODO: no coverage here!
-
group = plugin_or_group
-
plugins = Guard.state.session.plugins.all(group: group.name)
-
end
-
[group, plugins]
-
end
-
end
-
-
1
def from_interactor(scope)
-
@interactor_plugin_scope = Array(scope[:plugins])
-
@interactor_group_scope = Array(scope[:groups])
-
end
-
-
1
def titles(scope = nil)
-
hash = scope || to_hash
-
plugins = hash[:plugins]
-
groups = hash[:groups]
-
return plugins.map(&:title) unless plugins.nil? || plugins.empty?
-
return hash[:groups].map(&:title) unless groups.nil? || groups.empty?
-
["all"]
-
end
-
-
1
private
-
-
# TODO: move to session
-
1
def _scope_names(new_scope, name)
-
items = Array(new_scope[:"#{name}s"] || new_scope[name]) if items.empty?
-
-
# Convert objects to names
-
items.map { |p| p.respond_to?(:name) ? p.name : p }
-
end
-
-
# TODO: let the Plugins and Groups classes handle this?
-
# TODO: why even instantiate?? just to check if it exists?
-
1
def _hashify_scope(type)
-
# TODO: get cmdline passed to initialize above?
-
cmdline = Array(Guard.state.session.send("cmdline_#{type}s"))
-
guardfile = Guard.state.session.send(:"guardfile_#{type}_scope")
-
interactor = instance_variable_get(:"@interactor_#{type}_scope")
-
-
# TODO: session should decide whether to use cmdline or guardfile -
-
# since it has access to both variables
-
items = [interactor, cmdline, guardfile].detect do |source|
-
!source.empty?
-
end
-
-
# TODO: not tested when groups/plugins given don't exist
-
-
# TODO: should already be instantiated
-
Array(items).map do |obj|
-
if obj.respond_to?(:name)
-
obj
-
else
-
name = obj
-
(type == :group ? _groups : _plugins).all(name).first
-
end
-
end.compact
-
end
-
-
1
def _instantiate(meth, obj)
-
# TODO: no coverage
-
return obj unless obj.is_a?(Symbol) || obj.is_a?(String)
-
Guard.state.session.send("#{meth}s".to_sym).all(obj).first
-
end
-
-
1
def _find_non_empty_scope(type, local_scope)
-
[Array(local_scope[type]), to_hash[type]].map(&:compact).detect(&:any?)
-
end
-
-
1
def _groups
-
Guard.state.session.groups
-
end
-
-
1
def _plugins
-
Guard.state.session.plugins
-
end
-
end
-
end
-
end
-
1
require "guard/internals/plugins"
-
1
require "guard/internals/groups"
-
-
1
require "guard/options"
-
-
1
module Guard
-
# @private api
-
1
module Internals
-
# TODO: split into a commandline class and session (plugins, groups)
-
# TODO: swap session and metadata
-
1
class Session
-
1
attr_reader :plugins
-
1
attr_reader :groups
-
-
1
DEFAULT_OPTIONS = {
-
clear: false,
-
debug: false,
-
no_bundler_warning: false,
-
-
# User defined scopes
-
group: [],
-
plugin: [],
-
-
# Notifier
-
notify: true,
-
-
# Interactor
-
no_interactions: false,
-
-
# Guardfile options:
-
# guardfile_contents
-
guardfile: nil,
-
-
# Listener options
-
# TODO: rename to watchdirs?
-
watchdir: Dir.pwd,
-
latency: nil,
-
force_polling: false,
-
wait_for_delay: nil,
-
listen_on: nil
-
}
-
-
1
def cmdline_groups
-
@cmdline_groups.dup.freeze
-
end
-
-
1
def cmdline_plugins
-
@cmdline_plugins.dup.freeze
-
end
-
-
1
def initialize(new_options)
-
@options = Options.new(new_options, DEFAULT_OPTIONS)
-
-
@plugins = Plugins.new
-
@groups = Groups.new
-
-
@cmdline_groups = @options[:group]
-
@cmdline_plugins = @options[:plugin]
-
-
@clear = @options[:clear]
-
@debug = @options[:debug]
-
@watchdirs = Array(@options[:watchdir])
-
@notify = @options[:notify]
-
@interactor_name = @options[:no_interactions] ? :sleep : :pry_wrapper
-
-
@guardfile_plugin_scope = []
-
@guardfile_group_scope = []
-
@guardfile_ignore = []
-
@guardfile_ignore_bang = []
-
-
@guardfile_notifier_options = {}
-
end
-
-
1
def guardfile_scope(scope)
-
opts = scope.dup
-
-
groups = Array(opts.delete(:groups))
-
group = Array(opts.delete(:group))
-
@guardfile_group_scope = Array(groups) + Array(group)
-
-
plugins = Array(opts.delete(:plugins))
-
plugin = Array(opts.delete(:plugin))
-
@guardfile_plugin_scope = Array(plugins) + Array(plugin)
-
-
fail "Unknown options: #{opts.inspect}" unless opts.empty?
-
end
-
-
# TODO: create a EvaluatorResult class?
-
1
attr_reader :guardfile_group_scope
-
1
attr_reader :guardfile_plugin_scope
-
1
attr_accessor :guardfile_ignore_bang
-
-
1
attr_reader :guardfile_ignore
-
1
def guardfile_ignore=(ignores)
-
@guardfile_ignore += Array(ignores).flatten
-
end
-
-
1
def clearing(on)
-
@clear = on
-
end
-
-
1
def clearing?
-
@clear
-
end
-
-
1
alias :clear? :clearing?
-
-
1
def debug?
-
@debug
-
end
-
-
1
def watchdirs
-
@watchdirs_from_guardfile ||= nil
-
@watchdirs_from_guardfile || @watchdirs
-
end
-
-
# set by Dsl with :directories() command
-
1
def watchdirs=(dirs)
-
dirs = [Dir.pwd] if dirs.empty?
-
@watchdirs_from_guardfile = dirs.map { |dir| File.expand_path dir }
-
end
-
-
1
def listener_args
-
if @options[:listen_on]
-
[:on, @options[:listen_on]]
-
else
-
listener_options = {}
-
[:latency, :force_polling, :wait_for_delay].each do |option|
-
listener_options[option] = @options[option] if @options[option]
-
end
-
expanded_watchdirs = watchdirs.map { |dir| File.expand_path dir }
-
[:to, *expanded_watchdirs, listener_options]
-
end
-
end
-
-
1
def evaluator_options
-
opts = { guardfile: @options[:guardfile] }
-
# TODO: deprecate :guardfile_contents
-
if @options[:guardfile_contents]
-
opts[:contents] = @options[:guardfile_contents]
-
end
-
opts
-
end
-
-
1
def notify_options
-
names = @guardfile_notifier_options.keys
-
return { notify: false } if names.include?(:off)
-
-
{
-
notify: @options[:notify],
-
notifiers: @guardfile_notifier_options
-
}
-
end
-
-
1
def guardfile_notification=(config)
-
@guardfile_notifier_options.merge!(config)
-
end
-
-
1
def interactor_name
-
@interactor_name
-
end
-
-
# TODO: call this from within action, not within interactor command
-
1
def convert_scope(entries)
-
scopes = { plugins: [], groups: [] }
-
unknown = []
-
-
entries.each do |entry|
-
if plugin = plugins.all(entry).first
-
scopes[:plugins] << plugin
-
elsif group = groups.all(entry).first
-
scopes[:groups] << group
-
else
-
unknown << entry
-
end
-
end
-
-
[scopes, unknown]
-
end
-
end
-
end
-
end
-
1
require "guard/group"
-
-
1
require "guard/plugin_util"
-
1
require "guard/internals/session"
-
1
require "guard/internals/scope"
-
1
require "guard/runner"
-
-
1
module Guard
-
1
module Internals
-
1
class State
-
# Minimal setup for non-interactive commands (list, init, show, etc.)
-
1
def initialize(cmdline_opts)
-
@session = Session.new(cmdline_opts)
-
-
@scope = Scope.new
-
-
# NOTE: must be set before anything calls Guard::UI.debug
-
Debugging.start if session.debug?
-
end
-
-
1
attr_reader :scope
-
1
attr_reader :session
-
end
-
end
-
end
-
1
module Guard
-
1
module Internals
-
1
module Tracing
-
1
def self.trace(mod, meth)
-
meta = (class << mod; self; end)
-
original_meth = "original_#{meth}".to_sym
-
-
if mod.respond_to?(original_meth)
-
fail "ALREADY TRACED: #{mod}.#{meth}"
-
end
-
-
meta.send(:alias_method, original_meth, meth)
-
meta.send(:define_method, meth) do |*args, &block|
-
yield(*args) if block_given?
-
mod.send original_meth, *args, &block
-
end
-
end
-
-
1
def self.untrace(mod, meth)
-
meta = (class << mod; self; end)
-
original_meth = "original_#{meth}".to_sym
-
-
unless mod.respond_to?(original_meth)
-
fail "NOT TRACED: #{mod}.#{meth} (no method: #{original_meth})"
-
end
-
-
meta.send(:remove_method, meth)
-
meta.send(:alias_method, meth, original_meth)
-
meta.send(:undef_method, original_meth)
-
end
-
end
-
end
-
end
-
1
module Guard
-
1
module Internals
-
1
module Traps
-
1
def self.handle(signal, &block)
-
return unless Signal.list.key?(signal)
-
Signal.trap(signal, &block)
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier"
-
1
require "guard/ui"
-
-
1
module Guard
-
1
class Notifier
-
1
def self.connect(options = {})
-
1
@notifier ||= nil
-
1
fail "Already connected!" if @notifier
-
1
begin
-
1
opts = options.merge(namespace: "guard", logger: UI)
-
1
@notifier = Notiffany.connect(opts)
-
rescue Notiffany::Notifier::Detected::UnknownNotifier => e
-
UI.error "Failed to setup notification: #{e.message}"
-
fail
-
end
-
end
-
-
1
def self.disconnect
-
@notifier.disconnect
-
@notifier = nil
-
end
-
-
1
DEPRECATED_IMPLICIT_CONNECT = "Calling Notiffany::Notifier.notify()"\
-
" without a prior Notifier.connect() is"\
-
" deprecated"
-
-
1
def self.notify(message, options = {})
-
1
unless @notifier
-
# TODO: reenable again?
-
# UI.deprecation(DEPRECTED_IMPLICIT_CONNECT)
-
1
connect(notify: true)
-
end
-
-
1
@notifier.notify(message, options)
-
rescue RuntimeError => e
-
UI.error "Notification failed for #{@notifier.class.name}: #{e.message}"
-
UI.debug e.backtrace.join("\n")
-
end
-
-
1
def self.turn_on
-
@notifier.turn_on
-
end
-
-
1
def self.toggle
-
unless @notifier.enabled?
-
UI.error NOTIFICATIONS_DISABLED
-
return
-
end
-
-
if @notifier.active?
-
UI.info "Turn off notifications"
-
@notifier.turn_off
-
return
-
end
-
-
@notifier.turn_on
-
end
-
-
# Used by dsl describer
-
1
def self.supported
-
Notiffany::Notifier::SUPPORTED.inject(:merge)
-
end
-
-
# Used by dsl describer
-
1
def self.detected
-
@notifier.available.map do |mod|
-
{ name: mod.name.to_sym, options: mod.options }
-
end
-
end
-
end
-
end
-
1
require "thor/core_ext/hash_with_indifferent_access"
-
-
1
module Guard
-
# A class that holds options. Can be instantiated with default options.
-
#
-
1
class Options < Thor::CoreExt::HashWithIndifferentAccess
-
# Initializes an Guard::Options object. `default_opts` is merged into
-
# `opts`.
-
#
-
# @param [Hash] opts the options
-
# @param [Hash] default_opts the default options
-
#
-
1
def initialize(opts = {}, default_opts = {})
-
1
super(default_opts.merge(opts || {}))
-
end
-
end
-
end
-
1
require "guard"
-
1
require "guard/internals/groups"
-
-
1
module Guard
-
# Base class from which every Guard plugin implementation must inherit.
-
#
-
# Guard will trigger the {#start}, {#stop}, {#reload}, {#run_all} and
-
# {#run_on_changes} ({#run_on_additions}, {#run_on_modifications} and
-
# {#run_on_removals}) task methods depending on user interaction and file
-
# modification.
-
#
-
# {#run_on_changes} could be implemented to handle all the changes task case
-
# (additions, modifications, removals) in once, or each task can be
-
# implemented separately with a specific behavior.
-
#
-
# In each of these Guard task methods you have to implement some work when
-
# you want to support this kind of task. The return value of each Guard task
-
# method is not evaluated by Guard, but it'll be passed to the "_end" hook
-
# for further evaluation. You can throw `:task_has_failed` to indicate that
-
# your Guard plugin method was not successful, and successive Guard plugin
-
# tasks will be aborted when the group has set the `:halt_on_fail` option.
-
#
-
# @see Guard::Group
-
#
-
# @example Throw :task_has_failed
-
#
-
# def run_all
-
# if !runner.run(['all'])
-
# throw :task_has_failed
-
# end
-
# end
-
#
-
# Each Guard plugin should provide a template Guardfile located within the Gem
-
# at `lib/guard/guard-name/templates/Guardfile`.
-
#
-
# Watchers for a Guard plugin should return a file path or an array of files
-
# paths to Guard, but if your Guard plugin wants to allow any return value
-
# from a watcher, you can set the `any_return` option to true.
-
#
-
# If one of those methods raises an exception other than `:task_has_failed`,
-
# the `Guard::GuardName` instance will be removed from the active Guard
-
# plugins.
-
#
-
1
class Plugin
-
1
TEMPLATE_FORMAT = "%s/lib/guard/%s/templates/Guardfile"
-
-
1
require "guard/ui"
-
-
# Get all callbacks registered for all Guard plugins present in the
-
# Guardfile.
-
#
-
1
def self.callbacks
-
@callbacks ||= Hash.new { |hash, key| hash[key] = [] }
-
end
-
-
# Add a callback.
-
#
-
# @param [Block] listener the listener to notify
-
# @param [Guard::Plugin] guard_plugin the Guard plugin to add the callback
-
# @param [Array<Symbol>] events the events to register
-
#
-
1
def self.add_callback(listener, guard_plugin, events)
-
Array(events).each do |event|
-
callbacks[[guard_plugin, event]] << listener
-
end
-
end
-
-
# Notify a callback.
-
#
-
# @param [Guard::Plugin] guard_plugin the Guard plugin to add the callback
-
# @param [Symbol] event the event to trigger
-
# @param [Array] args the arguments for the listener
-
#
-
1
def self.notify(guard_plugin, event, *args)
-
callbacks[[guard_plugin, event]].each do |listener|
-
listener.call(guard_plugin, event, *args)
-
end
-
end
-
-
# Reset all callbacks.
-
#
-
# TODO: remove (not used anywhere)
-
1
def self.reset_callbacks!
-
@callbacks = nil
-
end
-
-
# When event is a Symbol, {#hook} will generate a hook name
-
# by concatenating the method name from where {#hook} is called
-
# with the given Symbol.
-
#
-
# @example Add a hook with a Symbol
-
#
-
# def run_all
-
# hook :foo
-
# end
-
#
-
# Here, when {Guard::Plugin#run_all} is called, {#hook} will notify
-
# callbacks registered for the "run_all_foo" event.
-
#
-
# When event is a String, {#hook} will directly turn the String
-
# into a Symbol.
-
#
-
# @example Add a hook with a String
-
#
-
# def run_all
-
# hook "foo_bar"
-
# end
-
#
-
# When {Guard::Plugin::run_all} is called, {#hook} will notify
-
# callbacks registered for the "foo_bar" event.
-
#
-
# @param [Symbol, String] event the name of the Guard event
-
# @param [Array] args the parameters are passed as is to the callbacks
-
# registered for the given event.
-
#
-
1
def hook(event, *args)
-
hook_name = if event.is_a? Symbol
-
calling_method = caller[0][/`([^']*)'/, 1]
-
"#{ calling_method }_#{ event }"
-
else
-
event
-
end
-
-
UI.debug "Hook :#{ hook_name } executed for #{ self.class }"
-
-
self.class.notify(self, hook_name.to_sym, *args)
-
end
-
-
1
attr_accessor :group, :watchers, :callbacks, :options
-
-
# Returns the non-namespaced class name of the plugin
-
#
-
#
-
# @example Non-namespaced class name for Guard::RSpec
-
# Guard::RSpec.non_namespaced_classname
-
# #=> "RSpec"
-
#
-
# @return [String]
-
#
-
1
def self.non_namespaced_classname
-
to_s.sub("Guard::", "")
-
end
-
-
# Returns the non-namespaced name of the plugin
-
#
-
#
-
# @example Non-namespaced name for Guard::RSpec
-
# Guard::RSpec.non_namespaced_name
-
# #=> "rspec"
-
#
-
# @return [String]
-
#
-
1
def self.non_namespaced_name
-
non_namespaced_classname.downcase
-
end
-
-
# Specify the source for the Guardfile template.
-
# Each Guard plugin can redefine this method to add its own logic.
-
#
-
# @param [String] plugin_location the plugin location
-
#
-
1
def self.template(plugin_location)
-
File.read TEMPLATE_FORMAT % [plugin_location, non_namespaced_name]
-
end
-
-
# Called once when Guard starts. Please override initialize method to
-
# init stuff.
-
#
-
# @raise [:task_has_failed] when start has failed
-
# @return [Object] the task result
-
#
-
# @!method start
-
-
# Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard
-
# quits).
-
#
-
# @raise [:task_has_failed] when stop has failed
-
# @return [Object] the task result
-
#
-
# @!method stop
-
-
# Called when `reload|r|z + enter` is pressed.
-
# This method should be mainly used for "reload" (really!) actions like
-
# reloading passenger/spork/bundler/...
-
#
-
# @raise [:task_has_failed] when reload has failed
-
# @return [Object] the task result
-
#
-
# @!method reload
-
-
# Called when just `enter` is pressed
-
# This method should be principally used for long action like running all
-
# specs/tests/...
-
#
-
# @raise [:task_has_failed] when run_all has failed
-
# @return [Object] the task result
-
#
-
# @!method run_all
-
-
# Default behaviour on file(s) changes that the Guard plugin watches.
-
#
-
# @param [Array<String>] paths the changes files or paths
-
# @raise [:task_has_failed] when run_on_changes has failed
-
# @return [Object] the task result
-
#
-
# @!method run_on_changes(paths)
-
-
# Called on file(s) additions that the Guard plugin watches.
-
#
-
# @param [Array<String>] paths the changes files or paths
-
# @raise [:task_has_failed] when run_on_additions has failed
-
# @return [Object] the task result
-
#
-
# @!method run_on_additions(paths)
-
-
# Called on file(s) modifications that the Guard plugin watches.
-
#
-
# @param [Array<String>] paths the changes files or paths
-
# @raise [:task_has_failed] when run_on_modifications has failed
-
# @return [Object] the task result
-
#
-
# @!method run_on_modifications(paths)
-
-
# Called on file(s) removals that the Guard plugin watches.
-
#
-
# @param [Array<String>] paths the changes files or paths
-
# @raise [:task_has_failed] when run_on_removals has failed
-
# @return [Object] the task result
-
#
-
# @!method run_on_removals(paths)
-
-
# Returns the plugin's name (without "guard-").
-
#
-
# @example Name for Guard::RSpec
-
# Guard::RSpec.new.name
-
# #=> "rspec"
-
#
-
# @return [String]
-
#
-
1
def name
-
@name ||= self.class.non_namespaced_name
-
end
-
-
# Returns the plugin's class name without the Guard:: namespace.
-
#
-
# @example Title for Guard::RSpec
-
# Guard::RSpec.new.title
-
# #=> "RSpec"
-
#
-
# @return [String]
-
#
-
1
def title
-
@title ||= self.class.non_namespaced_classname
-
end
-
-
# String representation of the plugin.
-
#
-
# @example String representation of an instance of the Guard::RSpec plugin
-
#
-
# Guard::RSpec.new.title
-
# #=> "#<Guard::RSpec @name=rspec @group=#<Guard::Group @name=default
-
# @options={}> @watchers=[] @callbacks=[] @options={all_after_pass:
-
# true}>"
-
#
-
# @return [String] the string representation
-
#
-
1
def to_s
-
"#<#{self.class} @name=#{name} @group=#{group} @watchers=#{watchers}"\
-
" @callbacks=#{callbacks} @options=#{options}>"
-
end
-
-
1
private
-
-
# Initializes a Guard plugin.
-
# Don't do any work here, especially as Guard plugins get initialized even
-
# if they are not in an active group!
-
#
-
# @param [Hash] options the Guard plugin options
-
# @option options [Array<Guard::Watcher>] watchers the Guard plugin file
-
# watchers
-
# @option options [Symbol] group the group this Guard plugin belongs to
-
# @option options [Boolean] any_return allow any object to be returned from
-
# a watcher
-
#
-
1
def initialize(options = {})
-
group_name = options.delete(:group) { :default }
-
@group = Guard.state.session.groups.add(group_name)
-
@watchers = options.delete(:watchers) { [] }
-
@callbacks = options.delete(:callbacks) { [] }
-
@options = options
-
_register_callbacks
-
end
-
-
# Add all the Guard::Plugin's callbacks to the global @callbacks array
-
# that's used by Guard to know which callbacks to notify.
-
#
-
1
def _register_callbacks
-
callbacks.each do |callback|
-
self.class.add_callback(callback[:listener], self, callback[:events])
-
end
-
end
-
end
-
end
-
1
require "guard/ui"
-
-
1
module Guard
-
# This class contains useful methods to:
-
#
-
# * Fetch all the Guard plugins names;
-
# * Initialize a plugin, get its location;
-
# * Return its class name;
-
# * Add its template to the Guardfile.
-
#
-
1
class PluginUtil
-
1
ERROR_NO_GUARD_OR_CLASS = "Could not load 'guard/%s' or" \
-
" find class Guard::%s"
-
-
1
INFO_ADDED_GUARD_TO_GUARDFILE = "%s guard added to Guardfile,"\
-
" feel free to edit it"
-
-
1
attr_accessor :name
-
-
# Returns a list of Guard plugin Gem names installed locally.
-
#
-
# @return [Array<String>] a list of Guard plugin gem names
-
#
-
1
def self.plugin_names
-
valid = Gem::Specification.find_all.select do |gem|
-
_gem_valid?(gem)
-
end
-
-
valid.map { |x| x.name.sub(/^guard-/, "") }.uniq
-
end
-
-
# Initializes a new `Guard::PluginUtil` object.
-
#
-
# @param [String] name the name of the Guard plugin
-
#
-
1
def initialize(name)
-
@name = name.to_s.sub(/^guard-/, "")
-
end
-
-
# Initializes a new `Guard::Plugin` with the given `options` hash. This
-
# methods handles plugins that inherit from the deprecated `Guard::Guard`
-
# class as well as plugins that inherit from `Guard::Plugin`.
-
#
-
# @see Guard::Plugin
-
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
-
# upgrade for Guard 2.0
-
#
-
# @return [Guard::Plugin] the initialized plugin
-
# @return [Guard::Guard] the initialized plugin. This return type is
-
# deprecated and the plugin's maintainer should update it to be
-
# compatible with Guard 2.0. For more information on how to upgrade for
-
# Guard 2.0, please head over to:
-
# https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0
-
#
-
1
def initialize_plugin(options)
-
klass = plugin_class
-
fail "Could not load class: #{_constant_name.inspect}" unless klass
-
if klass.superclass.to_s == "Guard::Guard"
-
klass.new(options.delete(:watchers), options)
-
else
-
begin
-
klass.new(options)
-
rescue ArgumentError => e
-
fail "Failed to call #{klass}.new(options): #{e}"
-
end
-
end
-
end
-
-
# Locates a path to a Guard plugin gem.
-
#
-
# @return [String] the full path to the plugin gem
-
#
-
1
def plugin_location
-
@plugin_location ||= _full_gem_path("guard-#{name}")
-
rescue Gem::LoadError
-
UI.error "Could not find 'guard-#{ name }' gem path."
-
end
-
-
# Tries to load the Guard plugin main class. This transforms the supplied
-
# plugin name into a class name:
-
#
-
# * `guardname` will become `Guard::Guardname`
-
# * `dashed-guard-name` will become `Guard::DashedGuardName`
-
# * `underscore_guard_name` will become `Guard::UnderscoreGuardName`
-
#
-
# When no class is found with the strict case sensitive rules, another
-
# try is made to locate the class without matching case:
-
#
-
# * `rspec` will find a class `Guard::RSpec`
-
#
-
# @option options [Boolean] fail_gracefully whether error messages should
-
# not be printed
-
#
-
# @return [Class, nil] the loaded class
-
#
-
1
def plugin_class(options = {})
-
options = { fail_gracefully: false }.merge(options)
-
-
const = _plugin_constant
-
fail TypeError, "no constant: #{_constant_name}" unless const
-
@plugin_class ||= Guard.const_get(const)
-
-
rescue TypeError
-
begin
-
require "guard/#{ name.downcase }"
-
const = _plugin_constant
-
@plugin_class ||= Guard.const_get(const)
-
-
rescue TypeError => error
-
UI.error "Could not find class Guard::#{ _constant_name }"
-
UI.error error.backtrace.join("\n")
-
# TODO: return value or move exception higher
-
rescue LoadError => error
-
unless options[:fail_gracefully]
-
UI.error ERROR_NO_GUARD_OR_CLASS % [name.downcase, _constant_name]
-
UI.error "Error is: #{error}"
-
UI.error error.backtrace.join("\n")
-
# TODO: return value or move exception higher
-
end
-
end
-
end
-
-
# Adds a plugin's template to the Guardfile.
-
#
-
1
def add_to_guardfile
-
klass = plugin_class # call here to avoid failing later
-
-
require "guard/guardfile/evaluator"
-
# TODO: move this to Generator?
-
options = Guard.state.session.evaluator_options
-
evaluator = Guardfile::Evaluator.new(options)
-
begin
-
evaluator.evaluate
-
rescue Guard::Guardfile::Evaluator::NoPluginsError
-
end
-
-
if evaluator.guardfile_include?(name)
-
UI.info "Guardfile already includes #{ name } guard"
-
else
-
content = File.read("Guardfile")
-
File.open("Guardfile", "wb") do |f|
-
f.puts(content)
-
f.puts("")
-
f.puts(klass.template(plugin_location))
-
end
-
-
UI.info INFO_ADDED_GUARD_TO_GUARDFILE % name
-
end
-
end
-
-
1
private
-
-
# Returns the constant for the current plugin.
-
#
-
# @example Returns the constant for a plugin
-
# > Guard::PluginUtil.new('rspec').send(:_plugin_constant)
-
# => Guard::RSpec
-
#
-
1
def _plugin_constant
-
@_plugin_constant ||= Guard.constants.detect do |c|
-
c.to_s.downcase == _constant_name.downcase
-
end
-
end
-
-
# Guesses the most probable name for the current plugin based on its name.
-
#
-
# @example Returns the most probable name for a plugin
-
# > Guard::PluginUtil.new('rspec').send(:_constant_name)
-
# => "Rspec"
-
#
-
1
def _constant_name
-
@_constant_name ||= name.gsub(/\/(.?)/) { "::#{ $1.upcase }" }.
-
gsub(/(?:^|[_-])(.)/) { $1.upcase }
-
end
-
-
1
def self._gem_valid?(gem)
-
return false if gem.name == "guard-compat"
-
return true if gem.name =~ /^guard-/
-
full_path = gem.full_gem_path
-
file = File.join(full_path, "lib", "guard", "#{gem.name}.rb")
-
File.exist?(file)
-
end
-
-
1
def _full_gem_path(name)
-
Gem::Specification.find_by_name(name).full_gem_path
-
end
-
end
-
end
-
1
require "lumberjack"
-
-
1
require "guard/ui"
-
1
require "guard/watcher"
-
-
1
module Guard
-
# The runner is responsible for running all methods defined on each plugin.
-
#
-
1
class Runner
-
# Runs a Guard-task on all registered plugins.
-
#
-
# @param [Symbol] task the task to run
-
#
-
# @param [Hash] scopes either the Guard plugin or the group to run the task
-
# on
-
#
-
1
def run(task, scope_hash = {})
-
Lumberjack.unit_of_work do
-
items = Guard.state.scope.grouped_plugins(scope_hash || {})
-
items.each do |_group, plugins|
-
_run_group_plugins(plugins) do |plugin|
-
_supervise(plugin, task) if plugin.respond_to?(task)
-
end
-
end
-
end
-
end
-
-
1
PLUGIN_FAILED = "%s has failed, other group's plugins will be skipped."
-
-
1
MODIFICATION_TASKS = [
-
:run_on_modifications, :run_on_changes, :run_on_change
-
]
-
-
1
ADDITION_TASKS = [:run_on_additions, :run_on_changes, :run_on_change]
-
1
REMOVAL_TASKS = [:run_on_removals, :run_on_changes, :run_on_deletion]
-
-
# Runs the appropriate tasks on all registered plugins
-
# based on the passed changes.
-
#
-
# @param [Array<String>] modified the modified paths.
-
# @param [Array<String>] added the added paths.
-
# @param [Array<String>] removed the removed paths.
-
#
-
1
def run_on_changes(modified, added, removed)
-
types = {
-
MODIFICATION_TASKS => modified,
-
ADDITION_TASKS => added,
-
REMOVAL_TASKS => removed
-
}
-
-
UI.clearable
-
-
Guard.state.scope.grouped_plugins.each do |_group, plugins|
-
_run_group_plugins(plugins) do |plugin|
-
UI.clear
-
types.each do |tasks, unmatched_paths|
-
next if unmatched_paths.empty?
-
match_result = Watcher.match_files(plugin, unmatched_paths)
-
next if match_result.empty?
-
task = tasks.detect { |meth| plugin.respond_to?(meth) }
-
_supervise(plugin, task, match_result) if task
-
end
-
end
-
end
-
end
-
-
# Run a Guard plugin task, but remove the Guard plugin when his work leads
-
# to a system failure.
-
#
-
# When the Group has `:halt_on_fail` disabled, we've to catch
-
# `:task_has_failed` here in order to avoid an uncaught throw error.
-
#
-
# @param [Guard::Plugin] guard the Guard to execute
-
# @param [Symbol] task the task to run
-
# @param [Array] args the arguments for the task
-
# @raise [:task_has_failed] when task has failed
-
#
-
1
def _supervise(plugin, task, *args)
-
catch self.class.stopping_symbol_for(plugin) do
-
plugin.hook("#{ task }_begin", *args)
-
begin
-
result = plugin.send(task, *args)
-
rescue Interrupt
-
throw(:task_has_failed)
-
end
-
plugin.hook("#{ task }_end", result)
-
result
-
end
-
rescue ScriptError, StandardError, RuntimeError
-
UI.error("#{ plugin.class.name } failed to achieve its"\
-
" <#{ task }>, exception was:" \
-
"\n#{ $!.class }: #{ $!.message }" \
-
"\n#{ $!.backtrace.join("\n") }")
-
Guard.state.session.plugins.remove(plugin)
-
UI.info("\n#{ plugin.class.name } has just been fired")
-
$!
-
end
-
-
# Returns the symbol that has to be caught when running a supervised task.
-
#
-
# @note If a Guard group is being run and it has the `:halt_on_fail`
-
# option set, this method returns :no_catch as it will be caught at the
-
# group level.
-
#
-
# @param [Guard::Plugin] guard the Guard plugin to execute
-
# @return [Symbol] the symbol to catch
-
#
-
1
def self.stopping_symbol_for(guard)
-
guard.group.options[:halt_on_fail] ? :no_catch : :task_has_failed
-
end
-
-
1
private
-
-
1
def _run_group_plugins(plugins)
-
failed_plugin = nil
-
catch :task_has_failed do
-
plugins.each do |plugin|
-
failed_plugin = plugin
-
yield plugin
-
failed_plugin = nil
-
end
-
end
-
UI.info format(PLUGIN_FAILED, failed_plugin.class.name) if failed_plugin
-
end
-
end
-
end
-
1
require "shellany/sheller"
-
-
1
module Guard
-
1
class Terminal
-
1
class << self
-
1
def clear
-
cmd = Gem.win_platform? ? "cls" : "clear;"
-
exit_code, _, stderr = Shellany::Sheller.system(cmd)
-
fail Errno::ENOENT, stderr unless exit_code == 0
-
end
-
end
-
end
-
end
-
1
require "guard/ui/colors"
-
-
1
require "guard/terminal"
-
1
require "guard/options"
-
-
# TODO: rework this class from the bottom-up
-
# - remove dependency on Session and Scope
-
# - extract into a separate gem
-
-
1
module Guard
-
# The UI class helps to format messages for the user. Everything that is
-
# logged through this class is considered either as an error message or a
-
# diagnostic message and is written to standard error ($stderr).
-
#
-
# If your Guard plugin does some output that is piped into another process
-
# for further processing, please just write it to STDOUT with `puts`.
-
#
-
1
module UI
-
1
include Colors
-
-
1
class << self
-
# Get the Guard::UI logger instance
-
#
-
1
def logger
-
@logger ||= begin
-
1
require "lumberjack"
-
1
Lumberjack::Logger.new(
-
1
options.fetch(:device) { $stderr },
-
options)
-
10
end
-
end
-
-
# Since logger is global, for Aruba in-process to properly
-
# separate output between calls, we need to reset
-
#
-
# We don't use logger=() since it's expected to be a Lumberjack instance
-
1
def reset_logger
-
@logger = nil
-
end
-
-
# Get the logger options
-
#
-
# @return [Hash] the logger options
-
#
-
1
def options
-
@options ||= Options.new(
-
level: :info,
-
template: ":time - :severity - :message",
-
22
time_format: "%H:%M:%S")
-
end
-
-
# Set the logger options
-
#
-
# @param [Hash] options the logger options
-
# @option options [Symbol] level the log level
-
# @option options [String] template the logger template
-
# @option options [String] time_format the time format
-
#
-
# TODO: deprecate?
-
1
def options=(options)
-
@options = Options.new(options)
-
end
-
-
# Assigns a log level
-
1
def level=(new_level)
-
logger.level = new_level
-
end
-
-
# Show an info message.
-
#
-
# @param [String] message the message to show
-
# @option options [Boolean] reset whether to clean the output before
-
# @option options [String] plugin manually define the calling plugin
-
#
-
1
def info(message, options = {})
-
_filtered_logger_message(message, :info, nil, options)
-
end
-
-
# Show a yellow warning message that is prefixed with WARNING.
-
#
-
# @param [String] message the message to show
-
# @option options [Boolean] reset whether to clean the output before
-
# @option options [String] plugin manually define the calling plugin
-
#
-
1
def warning(message, options = {})
-
_filtered_logger_message(message, :warn, :yellow, options)
-
end
-
-
# Show a red error message that is prefixed with ERROR.
-
#
-
# @param [String] message the message to show
-
# @option options [Boolean] reset whether to clean the output before
-
# @option options [String] plugin manually define the calling plugin
-
#
-
1
def error(message, options = {})
-
_filtered_logger_message(message, :error, :red, options)
-
end
-
-
# Show a red deprecation message that is prefixed with DEPRECATION.
-
# It has a log level of `warn`.
-
#
-
# @param [String] message the message to show
-
# @option options [Boolean] reset whether to clean the output before
-
# @option options [String] plugin manually define the calling plugin
-
#
-
1
def deprecation(message, options = {})
-
unless ENV["GUARD_GEM_SILENCE_DEPRECATIONS"] == "1"
-
backtrace = Thread.current.backtrace[1..5].join("\n\t >")
-
msg = format("%s\nDeprecation backtrace: %s", message, backtrace)
-
warning(msg, options)
-
end
-
end
-
-
# Show a debug message that is prefixed with DEBUG and a timestamp.
-
#
-
# @param [String] message the message to show
-
# @option options [Boolean] reset whether to clean the output before
-
# @option options [String] plugin manually define the calling plugin
-
#
-
1
def debug(message, options = {})
-
10
_filtered_logger_message(message, :debug, :yellow, options)
-
end
-
-
# Reset a line.
-
#
-
1
def reset_line
-
$stderr.print(color_enabled? ? "\r\e[0m" : "\r\n")
-
end
-
-
# Clear the output if clearable.
-
#
-
1
def clear(opts = {})
-
return unless Guard.state.session.clear?
-
-
fail "UI not set up!" if @clearable.nil?
-
return unless @clearable || opts[:force]
-
-
@clearable = false
-
Terminal.clear
-
rescue Errno::ENOENT => e
-
warning("Failed to clear the screen: #{e.inspect}")
-
end
-
-
# TODO: arguments: UI uses Guard::options anyway
-
# @private api
-
1
def reset_and_clear
-
@clearable = false
-
clear(force: true)
-
end
-
-
# Allow the screen to be cleared again.
-
#
-
1
def clearable
-
@clearable = true
-
end
-
-
# Show a scoped action message.
-
#
-
# @param [String] action the action to show
-
# @param [Hash] scope hash with a guard or a group scope
-
#
-
1
def action_with_scopes(action, scope)
-
titles = Guard.state.scope.titles(scope)
-
info "#{action} #{titles.join(', ')}"
-
end
-
-
1
private
-
-
# Filters log messages depending on either the
-
# `:only`` or `:except` option.
-
#
-
# @param [String] plugin the calling plugin name
-
# @yield When the message should be logged
-
# @yieldparam [String] param the calling plugin name
-
#
-
1
def _filter(plugin)
-
10
only = options[:only]
-
10
except = options[:except]
-
10
plugin ||= calling_plugin_name
-
-
10
match = !(only || except)
-
10
match ||= (only && only.match(plugin))
-
10
match ||= (except && !except.match(plugin))
-
10
return unless match
-
10
yield plugin
-
end
-
-
# @private
-
1
def _filtered_logger_message(message, method, color_name, options = {})
-
10
message = color(message, color_name) if color_name
-
-
10
_filter(options[:plugin]) do |plugin|
-
10
reset_line if options[:reset]
-
10
logger.send(method, message, plugin)
-
end
-
end
-
-
# Tries to extract the calling Guard plugin name
-
# from the call stack.
-
#
-
# @param [Integer] depth the stack depth
-
# @return [String] the Guard plugin name
-
#
-
1
def calling_plugin_name(depth = 2)
-
10
name = /(guard\/[a-z_]*)(\/[a-z_]*)?.rb:/i.match(caller[depth])
-
10
return "Guard" unless name
-
name[1].split("/").map do |part|
-
20
part.split(/[^a-z0-9]/i).map(&:capitalize).join
-
10
end.join("::")
-
end
-
-
# Checks if color output can be enabled.
-
#
-
# @return [Boolean] whether color is enabled or not
-
#
-
1
def color_enabled?
-
10
@color_enabled_initialized ||= false
-
10
@color_enabled = nil unless @color_enabled_initialized
-
10
@color_enabled_initialized = true
-
10
if @color_enabled.nil?
-
1
if Gem.win_platform?
-
1
if ENV["ANSICON"]
-
1
@color_enabled = true
-
else
-
begin
-
require "rubygems" unless ENV["NO_RUBYGEMS"]
-
require "Win32/Console/ANSI"
-
@color_enabled = true
-
rescue LoadError
-
@color_enabled = false
-
info "Run 'gem install win32console' to use color on Windows"
-
end
-
end
-
else
-
@color_enabled = true
-
end
-
end
-
-
10
@color_enabled
-
end
-
-
# Colorizes a text message. See the constant in the UI class for possible
-
# color_options parameters. You can pass optionally :bright, a foreground
-
# color and a background color.
-
#
-
# @example
-
#
-
# color('Hello World', :red, :bright)
-
#
-
# @param [String] text the text to colorize
-
# @param [Array] color_options the color options
-
#
-
1
def color(text, *color_options)
-
10
color_code = ""
-
10
color_options.each do |color_option|
-
10
color_option = color_option.to_s
-
10
next if color_option == ""
-
-
10
unless color_option =~ /\d+/
-
10
color_option = const_get("ANSI_ESCAPE_#{ color_option.upcase }")
-
end
-
10
color_code += ";" + color_option
-
end
-
10
color_enabled? ? "\e[0#{ color_code }m#{ text }\e[0m" : text
-
end
-
end
-
end
-
end
-
1
module Guard
-
1
module UI
-
1
module Colors
-
# Brighten the color
-
1
ANSI_ESCAPE_BRIGHT = "1"
-
-
# Black foreground color
-
1
ANSI_ESCAPE_BLACK = "30"
-
-
# Red foreground color
-
1
ANSI_ESCAPE_RED = "31"
-
-
# Green foreground color
-
1
ANSI_ESCAPE_GREEN = "32"
-
-
# Yellow foreground color
-
1
ANSI_ESCAPE_YELLOW = "33"
-
-
# Blue foreground color
-
1
ANSI_ESCAPE_BLUE = "34"
-
-
# Magenta foreground color
-
1
ANSI_ESCAPE_MAGENTA = "35"
-
-
# Cyan foreground color
-
1
ANSI_ESCAPE_CYAN = "36"
-
-
# White foreground color
-
1
ANSI_ESCAPE_WHITE = "37"
-
-
# Black background color
-
1
ANSI_ESCAPE_BGBLACK = "40"
-
-
# Red background color
-
1
ANSI_ESCAPE_BGRED = "41"
-
-
# Green background color
-
1
ANSI_ESCAPE_BGGREEN = "42"
-
-
# Yellow background color
-
1
ANSI_ESCAPE_BGYELLOW = "43"
-
-
# Blue background color
-
1
ANSI_ESCAPE_BGBLUE = "44"
-
-
# Magenta background color
-
1
ANSI_ESCAPE_BGMAGENTA = "45"
-
-
# Cyan background color
-
1
ANSI_ESCAPE_BGCYAN = "46"
-
-
# White background color
-
1
ANSI_ESCAPE_BGWHITE = "47"
-
end
-
end
-
end
-
1
require "guard/config"
-
1
require "guard/deprecated/watcher" unless Guard::Config.new.strict?
-
-
1
require "guard/ui"
-
-
1
module Guard
-
# The watcher defines a RegExp that will be matched against file system
-
# modifications.
-
# When a watcher matches a change, an optional action block is executed to
-
# enable processing the file system change result.
-
#
-
1
class Watcher
-
1
Deprecated::Watcher.add_deprecated(self) unless Config.new.strict?
-
1
attr_accessor :pattern, :action
-
-
# Initializes a file watcher.
-
#
-
# @param [String, Regexp] pattern the pattern to be watched by the Guard
-
# plugin
-
# @param [Block] action the action to execute before passing the result to
-
# the Guard plugin
-
#
-
1
def initialize(pattern, action = nil)
-
@pattern, @action = pattern, action
-
@@warning_printed ||= false
-
-
# deprecation warning
-
regexp = /(^(\^))|(>?(\\\.)|(\.\*))|(\(.*\))|(\[.*\])|(\$$)/
-
return unless @pattern.is_a?(String) && @pattern =~ regexp
-
-
unless @@warning_printed
-
UI.info "*" * 20 + "\nDEPRECATION WARNING!\n" + "*" * 20
-
UI.info <<-MSG
-
You have a string in your Guardfile watch patterns that seem to
-
represent a Regexp.
-
-
Guard matches String with == and Regexp with Regexp#match.
-
-
You should either use plain String (without Regexp special
-
characters) or real Regexp.
-
MSG
-
@@warning_printed = true
-
end
-
-
new_regexp = Regexp.new(@pattern).inspect
-
UI.info "\"#{@pattern}\" has been converted to #{ new_regexp }\n"
-
@pattern = Regexp.new(@pattern)
-
end
-
-
# Finds the files that matches a Guard plugin.
-
#
-
# @param [Guard::Plugin] guard the Guard plugin which watchers are used
-
# @param [Array<String>] files the changed files
-
# @return [Array<Object>] the matched watcher response
-
#
-
1
def self.match_files(guard, files)
-
return [] if files.empty?
-
-
files.inject([]) do |paths, file|
-
guard.watchers.each do |watcher|
-
matches = watcher.match(file)
-
next unless matches
-
-
if watcher.action
-
result = watcher.call_action(matches)
-
if guard.options[:any_return]
-
paths << result
-
elsif result.respond_to?(:empty?) && !result.empty?
-
paths << Array(result)
-
else
-
next
-
end
-
else
-
paths << matches[0]
-
end
-
-
break if guard.options[:first_match]
-
end
-
-
guard.options[:any_return] ? paths : paths.flatten.map(&:to_s)
-
end
-
end
-
-
# Test the watchers pattern against a file.
-
#
-
# @param [String] file the file to test
-
# @return [Array<String>] an array of matches (or containing a single path
-
# if the pattern is a string)
-
#
-
1
def match(string_or_pathname)
-
# TODO: use only match() - and show fnmatch example
-
file = string_or_pathname.to_s
-
return (file == @pattern ? [file] : nil) unless @pattern.is_a?(Regexp)
-
return unless (m = @pattern.match(file))
-
m = m.to_a
-
m[0] = file
-
m
-
end
-
-
# Executes a watcher action.
-
#
-
# @param [String, MatchData] matches the matched path or the match from the
-
# Regex
-
# @return [String] the final paths
-
#
-
1
def call_action(matches)
-
@action.arity > 0 ? @action.call(matches) : @action.call
-
rescue => ex
-
UI.error "Problem with watch action!\n#{ ex.message }"
-
UI.error ex.backtrace.join("\n")
-
end
-
end
-
end
-
# Note: currently, this file only exists to allow Bundler to require this file
-
# without crashing (e.g. when Guard hasn't been included)
-
-
1
unless Object.const_defined?('Guard')
-
1
module Guard
-
end
-
end
-
-
1
unless Guard.const_defined?('Plugin')
-
# Provided empty definition so requiring the plugin without Guard won't crash
-
# (e.g. when added to a Gemfile without `require: false`)
-
1
module Guard
-
1
class Plugin
-
1
def initialize(_options = {})
-
msg = 'either Guard has not been required or you did not' \
-
' include guard/compat/test/helper'
-
fail NotImplementedError, msg
-
end
-
end
-
end
-
end
-
-
1
module Guard
-
1
module Compat
-
# TODO: this is just a temporary workaround to allow plugins
-
# to use watcher patterns in run_all
-
1
def self.matching_files(plugin, files)
-
unless Guard.const_defined?('Watcher')
-
msg = 'either Guard has not been required or you did not' \
-
' stub this method in your plugin tests'
-
fail NotImplementedError, msg
-
end
-
-
# TODO: uniq not tested
-
# TODO: resolve symlinks and then uniq?
-
Guard::Watcher.match_files(plugin, files).uniq
-
end
-
-
1
def self.watched_directories
-
unless Guard.const_defined?('CLI')
-
fail NotImplementedError, 'either Guard has not been required or'\
-
' you did not stub this method in your plugin tests'
-
end
-
-
if Guard.respond_to?(:state)
-
# TODO: the new version is temporary
-
Guard.state.session.watchdirs.map { |d| Pathname(d) }
-
else
-
dirs = Array(Guard.options(:watchdir))
-
dirs.empty? ? [Pathname.pwd] : dirs.map { |d| Pathname(d) }
-
end
-
end
-
-
1
module UI
-
1
def self.color(text, *colors)
-
if Guard.const_defined?(:UI)
-
Guard::UI.send(:color, text, *colors)
-
else
-
text
-
end
-
end
-
-
1
def self.color_enabled?
-
if Guard.const_defined?(:UI)
-
Guard::UI.send(:color_enabled?)
-
else
-
false
-
end
-
end
-
-
1
def self.info(message, options = {})
-
if Guard.const_defined?(:UI)
-
Guard::UI.info(message, options)
-
else
-
$stdout.puts(message)
-
end
-
end
-
-
1
def self.warning(message, options = {})
-
if Guard.const_defined?(:UI)
-
Guard::UI.warning(message, options)
-
else
-
$stdout.puts(message)
-
end
-
end
-
-
1
def self.error(message, options = {})
-
if Guard.const_defined?(:UI)
-
Guard::UI.error(message, options)
-
else
-
$stderr.puts(message)
-
end
-
end
-
-
1
def self.debug(message, options = {})
-
if Guard.const_defined?(:UI)
-
Guard::UI.debug(message, options)
-
else
-
$stdout.puts(message)
-
end
-
end
-
-
1
def self.deprecation(message, options = {})
-
if Guard.const_defined?(:UI)
-
Guard::UI.deprecation(message, options)
-
else
-
$stdout.puts(message)
-
end
-
end
-
-
1
def self.notify(msg, options = {})
-
1
return $stdout.puts(msg) unless Guard.const_defined?(:UI)
-
1
return Notifier.notify(msg, options) if Notifier.respond_to?(:notify)
-
-
# test helper was included
-
note = 'NOTE: Notification is disabled when testing Guard plugins'\
-
' (it makes no sense)'
-
-
$stderr.puts(note)
-
$stdout.puts(msg)
-
end
-
end
-
end
-
end
-
1
require 'guard/compat/plugin'
-
-
1
module Guard
-
1
class Minitest < Plugin
-
1
require 'guard/minitest/runner'
-
1
require 'guard/minitest/utils'
-
1
require 'guard/minitest/version'
-
-
1
attr_accessor :runner
-
-
1
def initialize(options = {})
-
super
-
@options = {
-
all_on_start: true
-
}.merge(options)
-
@runner = Runner.new(@options)
-
end
-
-
1
def start
-
Compat::UI.info "Guard::Minitest #{MinitestVersion::VERSION} is running, with Minitest::Unit #{Utils.minitest_version}!"
-
run_all if @options[:all_on_start]
-
end
-
-
1
def stop
-
true
-
end
-
-
1
def reload
-
true
-
end
-
-
1
def run_all
-
throw_on_failed_tests { runner.run_all }
-
end
-
-
1
def run_on_modifications(paths = [])
-
throw_on_failed_tests { runner.run_on_modifications(paths) }
-
end
-
-
1
def run_on_additions(paths)
-
runner.run_on_additions(paths)
-
end
-
-
1
def run_on_removals(paths)
-
runner.run_on_removals(paths)
-
end
-
-
1
private
-
-
1
def throw_on_failed_tests
-
throw :task_has_failed unless yield
-
end
-
end
-
end
-
1
require 'guard/minitest'
-
-
1
module Guard
-
1
class Minitest < Plugin
-
1
class Inspector
-
1
attr_reader :test_folders, :test_file_patterns
-
-
1
def initialize(test_folders, test_file_patterns)
-
@test_folders = test_folders.uniq.compact
-
@test_file_patterns = test_file_patterns.uniq.compact
-
end
-
-
1
def clean_all
-
clean(test_folders)
-
end
-
-
1
def clean(paths)
-
paths.reduce([]) do |memo, path|
-
if File.directory?(path)
-
memo += _test_files_for_paths(path)
-
else
-
memo << path if _test_file?(path)
-
end
-
memo
-
end.uniq
-
end
-
-
1
def clear_memoized_test_files
-
@all_test_files = nil
-
end
-
-
1
def all_test_files
-
@all_test_files ||= _test_files_for_paths
-
end
-
-
1
private
-
-
1
def _test_files_for_paths(paths = test_folders)
-
paths = _join_for_glob(Array(paths))
-
files = _join_for_glob(test_file_patterns)
-
-
Dir["#{paths}/**/#{files}"]
-
end
-
-
1
def _test_file?(path)
-
_test_files_for_paths.include?(path)
-
end
-
-
1
def _join_for_glob(fragments)
-
"{#{fragments.join(',')}}"
-
end
-
end
-
end
-
end
-
1
require 'guard/compat/plugin'
-
-
1
module Guard
-
1
class Minitest < Plugin
-
1
class Notifier
-
1
def self.guard_message(test_count, assertion_count, failure_count, error_count, skip_count, duration)
-
1
message = "#{test_count} tests"
-
1
message << " (#{skip_count} skipped)" if skip_count > 0
-
1
message << "\n#{assertion_count} assertions, #{failure_count} failures, #{error_count} errors"
-
1
if test_count && assertion_count
-
1
message << "\n\n%.2f tests/s, %.2f assertions/s\n\nFinished in %.4f seconds" % [test_count / duration, assertion_count / duration, duration]
-
end
-
1
message
-
end
-
-
# failed | pending (skip) | success
-
1
def self.guard_image(failure_count, skip_count)
-
1
if failure_count > 0
-
1
:failed
-
elsif skip_count > 0
-
:pending
-
else
-
:success
-
end
-
end
-
-
1
def self.notify(test_count, assertion_count, failure_count, error_count, skip_count, duration)
-
1
message = guard_message(test_count, assertion_count, failure_count, error_count, skip_count, duration)
-
1
image = guard_image(failure_count + error_count, skip_count)
-
-
1
Compat::UI.notify(message, title: 'Minitest results', image: image)
-
end
-
end
-
end
-
end
-
1
require 'minitest'
-
1
require 'guard/minitest/notifier'
-
-
1
module Guard
-
1
class Minitest < Plugin
-
1
class Reporter < ::Minitest::StatisticsReporter
-
1
def report
-
1
super
-
-
1
::Guard::Minitest::Notifier.notify(count, assertions,
-
failures, errors,
-
skips, total_time)
-
end
-
end
-
end
-
end
-
1
require 'guard/minitest/inspector'
-
1
require 'English'
-
-
1
module Guard
-
1
class Minitest < Plugin
-
1
class Runner
-
1
attr_accessor :inspector
-
-
1
def initialize(options = {})
-
@options = {
-
all_after_pass: false,
-
bundler: File.exist?("#{Dir.pwd}/Gemfile"),
-
rubygems: false,
-
drb: false,
-
zeus: false,
-
spring: false,
-
all_env: {},
-
env: {},
-
include: [],
-
test_folders: %w(test spec),
-
test_file_patterns: %w(*_test.rb test_*.rb *_spec.rb),
-
cli: nil,
-
autorun: true
-
}.merge(options)
-
-
parse_deprecated_options
-
-
[:test_folders, :test_file_patterns].each do |k|
-
@options[k] = Array(@options[k]).uniq.compact
-
end
-
-
@inspector = Inspector.new(test_folders, test_file_patterns)
-
end
-
-
1
def run(paths, options = {})
-
return unless options[:all] || !paths.empty?
-
-
message = "Running: #{options[:all] ? 'all tests' : paths.join(' ')}"
-
Compat::UI.info message, reset: true
-
-
begin
-
status = _run_possibly_bundled_command(paths, options[:all])
-
rescue Errno::ENOENT => e
-
Compat::UI.error e.message
-
throw :task_has_failed
-
end
-
-
success = status.zero?
-
-
# When using zeus or spring, the Guard::Minitest::Reporter can't be used because the minitests run in another
-
# process, but we can use the exit status of the client process to distinguish between :success and :failed.
-
if zeus? || spring?
-
Compat::UI.notify(message, title: 'Minitest results', image: success ? :success : :failed)
-
end
-
-
run_all_coz_ok = @options[:all_after_pass] && success && !options[:all]
-
run_all_coz_ok ? run_all : success
-
end
-
-
1
def run_all
-
paths = inspector.clean_all
-
run(paths, all: true)
-
end
-
-
1
def run_on_modifications(paths = [])
-
paths = inspector.clean(paths)
-
run(paths, all: all_paths?(paths))
-
end
-
-
1
def run_on_additions(_paths)
-
inspector.clear_memoized_test_files
-
true
-
end
-
-
1
def run_on_removals(_paths)
-
inspector.clear_memoized_test_files
-
end
-
-
1
private
-
-
1
def cli_options
-
@cli_options ||= Array(@options[:cli])
-
end
-
-
1
def bundler?
-
@options[:bundler] && !@options[:spring]
-
end
-
-
1
def rubygems?
-
!bundler? && @options[:rubygems]
-
end
-
-
1
def drb?
-
@options[:drb]
-
end
-
-
1
def zeus?
-
@options[:zeus].is_a?(String) || @options[:zeus]
-
end
-
-
1
def spring?
-
@options[:spring].is_a?(String) || @options[:spring]
-
end
-
-
1
def all_after_pass?
-
@options[:all_after_pass]
-
end
-
-
1
def test_folders
-
@options[:test_folders]
-
end
-
-
1
def include_folders
-
@options[:include]
-
end
-
-
1
def test_file_patterns
-
@options[:test_file_patterns]
-
end
-
-
1
def autorun?
-
@options[:autorun]
-
end
-
-
1
def _run(*args)
-
Compat::UI.debug "Running: #{args.join(' ')}"
-
return $CHILD_STATUS.exitstatus unless Kernel.system(*args).nil?
-
-
fail Errno::ENOENT, args.join(' ')
-
end
-
-
1
def _run_possibly_bundled_command(paths, all)
-
args = minitest_command(paths, all)
-
bundler_env = !bundler? && defined?(::Bundler)
-
bundler_env ? ::Bundler.with_clean_env { _run(*args) } : _run(*args)
-
end
-
-
1
def _commander(paths)
-
return drb_command(paths) if drb?
-
return zeus_command(paths) if zeus?
-
return spring_command(paths) if spring?
-
ruby_command(paths)
-
end
-
-
1
def minitest_command(paths, all)
-
cmd_parts = []
-
-
cmd_parts << 'bundle exec' if bundler?
-
cmd_parts << _commander(paths)
-
-
[cmd_parts.compact.join(' ')].tap do |args|
-
env = generate_env(all)
-
args.unshift(env) if env.length > 0
-
end
-
end
-
-
1
def drb_command(paths)
-
%w(testdrb) + generate_includes(false) + relative_paths(paths)
-
end
-
-
1
def zeus_command(paths)
-
command = @options[:zeus].is_a?(String) ? @options[:zeus] : 'test'
-
['zeus', command] + relative_paths(paths)
-
end
-
-
1
def spring_command(paths)
-
command = @options[:spring].is_a?(String) ? @options[:spring] : 'bin/rake test'
-
cmd_parts = [command]
-
cmd_parts << File.expand_path('../runners/old_runner.rb', __FILE__) unless Utils.minitest_version_gte_5? || command != 'spring testunit'
-
if cli_options.length > 0
-
cmd_parts + paths + ['--'] + cli_options
-
else
-
cmd_parts + paths
-
end
-
end
-
-
1
def ruby_command(paths)
-
cmd_parts = ['ruby']
-
cmd_parts.concat(generate_includes)
-
cmd_parts << '-r rubygems' if rubygems?
-
cmd_parts << '-r bundler/setup' if bundler?
-
cmd_parts << '-r minitest/autorun' if autorun?
-
cmd_parts.concat(paths.map { |path| "-r ./#{path}" })
-
-
unless Utils.minitest_version_gte_5?
-
cmd_parts << "-r #{File.expand_path('../runners/old_runner.rb', __FILE__)}"
-
end
-
-
# All the work is done through minitest/autorun
-
# and requiring the test files, so this is just
-
# a placeholder so Ruby doesn't try to exceute
-
# code from STDIN.
-
cmd_parts << '-e ""'
-
-
cmd_parts << '--'
-
cmd_parts += cli_options
-
cmd_parts
-
end
-
-
1
def generate_includes(include_test_folders = true)
-
if include_test_folders
-
folders = test_folders + include_folders
-
else
-
folders = include_folders
-
end
-
-
folders.map { |f| %(-I"#{f}") }
-
end
-
-
1
def generate_env(all = false)
-
base_env.merge(all ? all_env : {})
-
end
-
-
1
def base_env
-
Hash[(@options[:env] || {}).map { |key, value| [key.to_s, value.to_s] }]
-
end
-
-
1
def all_env
-
return { @options[:all_env].to_s => 'true' } unless @options[:all_env].is_a? Hash
-
Hash[@options[:all_env].map { |key, value| [key.to_s, value.to_s] }]
-
end
-
-
1
def relative_paths(paths)
-
paths.map { |p| "./#{p}" }
-
end
-
-
1
def all_paths?(paths)
-
paths == inspector.all_test_files
-
end
-
-
1
def parse_deprecated_options
-
if @options.key?(:notify)
-
# TODO: no coverage
-
Compat::UI.info %(DEPRECATION WARNING: The :notify option is deprecated. Guard notification configuration is used.)
-
end
-
-
[:seed, :verbose].each do |key|
-
next unless (value = @options.delete(key))
-
-
final_value = "--#{key}"
-
final_value << " #{value}" unless [TrueClass, FalseClass].include?(value.class)
-
cli_options << final_value
-
-
Compat::UI.info %(DEPRECATION WARNING: The :#{key} option is deprecated. Pass standard command line argument "--#{key}" to Minitest with the :cli option.)
-
end
-
end
-
end
-
end
-
end
-
1
require 'rubygems/requirement'
-
-
1
require 'guard/minitest'
-
-
1
module Guard
-
1
class Minitest < Plugin
-
1
class Utils
-
1
def self.minitest_version
-
@@minitest_version ||= begin
-
1
require 'minitest'
-
1
::Minitest::VERSION
-
-
rescue LoadError, NameError
-
require 'minitest/unit'
-
::MiniTest::Unit::VERSION
-
1
end
-
end
-
-
1
def self.minitest_version_gte_5?
-
@@minitest_version_gte_5 ||= Gem::Requirement.new('>= 5').satisfied_by?(Gem::Version.new(minitest_version))
-
end
-
-
1
def self.minitest_version_gte_5_0_4?
-
1
@@minitest_version_gte_5_0_4 ||= Gem::Requirement.new('>= 5.0.4').satisfied_by?(Gem::Version.new(minitest_version))
-
end
-
end
-
end
-
end
-
1
module Guard
-
1
class MinitestVersion
-
1
VERSION = '2.4.4'
-
end
-
end
-
1
require 'guard/minitest/utils'
-
-
# Require guard unless we're using guard-minitest to test a guard plugin
-
1
require 'guard' unless Dir['guard-*.gemspec'].any?
-
-
1
if ::Guard::Minitest::Utils.minitest_version_gte_5_0_4?
-
1
require 'guard/minitest/reporter'
-
else
-
require 'guard/minitest/reporters/old_reporter'
-
end
-
-
1
module Minitest
-
1
def self.plugin_guard_minitest_options(_opts, _options) # :nodoc:
-
end
-
-
1
def self.plugin_guard_minitest_init(_options) # :nodoc:
-
1
reporter << ::Guard::Minitest::Reporter.new
-
end
-
end
-
1
module Haml
-
1
module Helpers
-
1
@@action_view_defined = true
-
-
# This module contains various useful helper methods
-
# that either tie into ActionView or the rest of the ActionPack stack,
-
# or are only useful in that context.
-
# Thus, the methods defined here are only available
-
# if ActionView is installed.
-
1
module ActionViewExtensions
-
# Returns a value for the "class" attribute
-
# unique to this controller/action pair.
-
# This can be used to target styles specifically at this action or controller.
-
# For example, if the current action were `EntryController#show`,
-
#
-
# %div{:class => page_class} My Div
-
#
-
# would become
-
#
-
# <div class="entry show">My Div</div>
-
#
-
# Then, in a stylesheet (shown here as [Sass](http://sass-lang.com)),
-
# you could refer to this specific action:
-
#
-
# .entry.show
-
# font-weight: bold
-
#
-
# or to all actions in the entry controller:
-
#
-
# .entry
-
# color: #00f
-
#
-
# @return [String] The class name for the current page
-
1
def page_class
-
controller.controller_name + " " + controller.action_name
-
end
-
1
alias_method :generate_content_class_names, :page_class
-
-
# Treats all input to \{Haml::Helpers#haml\_concat} within the block
-
# as being HTML safe for Rails' XSS protection.
-
# This is useful for wrapping blocks of code that concatenate HTML en masse.
-
#
-
# This has no effect if Rails' XSS protection isn't enabled.
-
#
-
# @yield A block in which all input to `#haml_concat` is treated as raw.
-
# @see Haml::Util#rails_xss_safe?
-
1
def with_raw_haml_concat
-
old = instance_variable_defined?('@_haml_concat_raw') ? @_haml_concat_raw : false
-
@_haml_concat_raw = true
-
yield
-
ensure
-
@_haml_concat_raw = old
-
end
-
end
-
-
1
include ActionViewExtensions
-
end
-
end
-
1
module ActionView
-
1
class Base
-
1
def render_with_haml(*args, &block)
-
173
options = args.first
-
-
# If render :layout is used with a block, it concats rather than returning
-
# a string so we need it to keep thinking it's Haml until it hits the
-
# sub-render.
-
173
if is_haml? && !(options.is_a?(Hash) && options[:layout] && block_given?)
-
346
return non_haml { render_without_haml(*args, &block) }
-
end
-
render_without_haml(*args, &block)
-
end
-
1
alias_method :render_without_haml, :render
-
1
alias_method :render, :render_with_haml
-
-
1
def output_buffer_with_haml
-
95
return haml_buffer.buffer if is_haml?
-
output_buffer_without_haml
-
end
-
1
alias_method :output_buffer_without_haml, :output_buffer
-
1
alias_method :output_buffer, :output_buffer_with_haml
-
-
1
def set_output_buffer_with_haml(new_buffer)
-
38
if is_haml?
-
38
if Haml::Util.rails_xss_safe? && new_buffer.is_a?(ActiveSupport::SafeBuffer)
-
19
new_buffer = String.new(new_buffer)
-
end
-
38
haml_buffer.buffer = new_buffer
-
else
-
set_output_buffer_without_haml new_buffer
-
end
-
end
-
1
alias_method :set_output_buffer_without_haml, :output_buffer=
-
1
alias_method :output_buffer=, :set_output_buffer_with_haml
-
end
-
-
1
module Helpers
-
1
module CaptureHelper
-
1
def capture_with_haml(*args, &block)
-
192
if Haml::Helpers.block_is_haml?(block)
-
#double assignment is to avoid warnings
-
173
_hamlout = _hamlout = eval('_hamlout', block.binding) # Necessary since capture_haml checks _hamlout
-
-
173
str = capture_haml(*args, &block)
-
-
# NonCattingString is present in Rails less than 3.1.0. When support
-
# for 3.0 is dropped, this can be removed.
-
173
return ActionView::NonConcattingString.new(str) if str && defined?(ActionView::NonConcattingString)
-
173
return str
-
else
-
19
capture_without_haml(*args, &block)
-
end
-
end
-
1
alias_method :capture_without_haml, :capture
-
1
alias_method :capture, :capture_with_haml
-
end
-
-
1
module TagHelper
-
1
def content_tag_with_haml(name, *args, &block)
-
446
return content_tag_without_haml(name, *args, &block) unless is_haml?
-
-
389
preserve = haml_buffer.options[:preserve].include?(name.to_s)
-
-
389
if block_given? && block_is_haml?(block) && preserve
-
return content_tag_without_haml(name, *args) {preserve(&block)}
-
end
-
-
389
content = content_tag_without_haml(name, *args, &block)
-
389
content = Haml::Helpers.preserve(content) if preserve && content
-
389
content
-
end
-
-
1
alias_method :content_tag_without_haml, :content_tag
-
1
alias_method :content_tag, :content_tag_with_haml
-
end
-
-
1
module HamlSupport
-
1
include Haml::Helpers
-
-
1
def haml_buffer
-
@template_object.send :haml_buffer
-
end
-
-
1
def is_haml?
-
@template_object.send :is_haml?
-
end
-
end
-
-
1
if ActionPack::VERSION::MAJOR == 4
-
1
module Tags
-
1
class TextArea
-
1
include HamlSupport
-
end
-
end
-
end
-
-
1
class InstanceTag
-
1
include HamlSupport
-
-
1
def content_tag(*args, &block)
-
html_tag = content_tag_with_haml(*args, &block)
-
return html_tag unless respond_to?(:error_wrapping)
-
return error_wrapping(html_tag) if method(:error_wrapping).arity == 1
-
return html_tag unless object.respond_to?(:errors) && object.errors.respond_to?(:on)
-
return error_wrapping(html_tag, object.errors.on(@method_name))
-
end
-
end
-
-
1
module FormTagHelper
-
1
def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
-
if is_haml?
-
wrap_block = block_given? && block_is_haml?(proc)
-
if wrap_block
-
oldproc = proc
-
proc = haml_bind_proc do |*args|
-
concat "\n"
-
with_tabs(1) {oldproc.call(*args)}
-
end
-
end
-
res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
-
res << "\n" if wrap_block
-
res
-
else
-
form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc)
-
end
-
end
-
1
alias_method :form_tag_without_haml, :form_tag
-
1
alias_method :form_tag, :form_tag_with_haml
-
end
-
-
1
module FormHelper
-
1
def form_for_with_haml(object_name, *args, &proc)
-
19
wrap_block = block_given? && is_haml? && block_is_haml?(proc)
-
19
if wrap_block
-
19
oldproc = proc
-
57
proc = proc {|*subargs| with_tabs(1) {oldproc.call(*subargs)}}
-
end
-
19
res = form_for_without_haml(object_name, *args, &proc)
-
19
res << "\n" if wrap_block
-
19
res
-
end
-
1
alias_method :form_for_without_haml, :form_for
-
1
alias_method :form_for, :form_for_with_haml
-
end
-
end
-
end
-
1
module ActionView
-
1
module Helpers
-
1
module CaptureHelper
-
1
def with_output_buffer_with_haml_xss(*args, &block)
-
19
res = with_output_buffer_without_haml_xss(*args, &block)
-
19
case res
-
when Array; res.map {|s| Haml::Util.html_safe(s)}
-
19
when String; Haml::Util.html_safe(res)
-
else; res
-
end
-
end
-
1
alias_method :with_output_buffer_without_haml_xss, :with_output_buffer
-
1
alias_method :with_output_buffer, :with_output_buffer_with_haml_xss
-
end
-
-
1
module FormTagHelper
-
1
def form_tag_with_haml_xss(*args, &block)
-
res = form_tag_without_haml_xss(*args, &block)
-
res = Haml::Util.html_safe(res) unless block_given?
-
res
-
end
-
1
alias_method :form_tag_without_haml_xss, :form_tag
-
1
alias_method :form_tag, :form_tag_with_haml_xss
-
end
-
-
1
module FormHelper
-
1
def form_for_with_haml_xss(*args, &block)
-
19
res = form_for_without_haml_xss(*args, &block)
-
19
return Haml::Util.html_safe(res) if res.is_a?(String)
-
return res
-
end
-
1
alias_method :form_for_without_haml_xss, :form_for
-
1
alias_method :form_for, :form_for_with_haml_xss
-
end
-
-
1
module TextHelper
-
1
def concat_with_haml_xss(string)
-
if is_haml?
-
haml_buffer.buffer.concat(haml_xss_html_escape(string))
-
else
-
concat_without_haml_xss(string)
-
end
-
end
-
1
alias_method :concat_without_haml_xss, :concat
-
1
alias_method :concat, :concat_with_haml_xss
-
-
1
def safe_concat_with_haml_xss(string)
-
if is_haml?
-
haml_buffer.buffer.concat(string)
-
else
-
safe_concat_without_haml_xss(string)
-
end
-
end
-
1
alias_method :safe_concat_without_haml_xss, :safe_concat
-
1
alias_method :safe_concat, :safe_concat_with_haml_xss
-
end
-
end
-
end
-
1
module Haml
-
1
module Helpers
-
# This module overrides Haml helpers to work properly
-
# in the context of ActionView.
-
# Currently it's only used for modifying the helpers
-
# to work with Rails' XSS protection methods.
-
1
module XssMods
-
1
def self.included(base)
-
%w[html_escape find_and_preserve preserve list_of surround
-
precede succeed capture_haml haml_concat haml_indent
-
1
haml_tag escape_once].each do |name|
-
12
base.send(:alias_method, "#{name}_without_haml_xss", name)
-
12
base.send(:alias_method, name, "#{name}_with_haml_xss")
-
end
-
end
-
-
# Don't escape text that's already safe,
-
# output is always HTML safe
-
1
def html_escape_with_haml_xss(text)
-
1386
str = text.to_s
-
1386
return text if str.html_safe?
-
632
Haml::Util.html_safe(html_escape_without_haml_xss(str))
-
end
-
-
# Output is always HTML safe
-
1
def find_and_preserve_with_haml_xss(*args, &block)
-
4
Haml::Util.html_safe(find_and_preserve_without_haml_xss(*args, &block))
-
end
-
-
# Output is always HTML safe
-
1
def preserve_with_haml_xss(*args, &block)
-
336
Haml::Util.html_safe(preserve_without_haml_xss(*args, &block))
-
end
-
-
# Output is always HTML safe
-
1
def list_of_with_haml_xss(*args, &block)
-
Haml::Util.html_safe(list_of_without_haml_xss(*args, &block))
-
end
-
-
# Input is escaped, output is always HTML safe
-
1
def surround_with_haml_xss(front, back = front, &block)
-
Haml::Util.html_safe(
-
surround_without_haml_xss(
-
haml_xss_html_escape(front),
-
haml_xss_html_escape(back),
-
&block))
-
end
-
-
# Input is escaped, output is always HTML safe
-
1
def precede_with_haml_xss(str, &block)
-
Haml::Util.html_safe(precede_without_haml_xss(haml_xss_html_escape(str), &block))
-
end
-
-
# Input is escaped, output is always HTML safe
-
1
def succeed_with_haml_xss(str, &block)
-
20
Haml::Util.html_safe(succeed_without_haml_xss(haml_xss_html_escape(str), &block))
-
end
-
-
# Output is always HTML safe
-
1
def capture_haml_with_haml_xss(*args, &block)
-
193
Haml::Util.html_safe(capture_haml_without_haml_xss(*args, &block))
-
end
-
-
# Input is escaped
-
1
def haml_concat_with_haml_xss(text = "")
-
raw = instance_variable_defined?('@_haml_concat_raw') ? @_haml_concat_raw : false
-
haml_concat_without_haml_xss(raw ? text : haml_xss_html_escape(text))
-
end
-
-
# Output is always HTML safe
-
1
def haml_indent_with_haml_xss
-
Haml::Util.html_safe(haml_indent_without_haml_xss)
-
end
-
-
# Input is escaped, haml_concat'ed output is always HTML safe
-
1
def haml_tag_with_haml_xss(name, *rest, &block)
-
name = haml_xss_html_escape(name.to_s)
-
rest.unshift(haml_xss_html_escape(rest.shift.to_s)) unless [Symbol, Hash, NilClass].any? {|t| rest.first.is_a? t}
-
with_raw_haml_concat {haml_tag_without_haml_xss(name, *rest, &block)}
-
end
-
-
# Output is always HTML safe
-
1
def escape_once_with_haml_xss(*args)
-
Haml::Util.html_safe(escape_once_without_haml_xss(*args))
-
end
-
-
1
private
-
-
# Escapes the HTML in the text if and only if
-
# Rails XSS protection is enabled *and* the `:escape_html` option is set.
-
1
def haml_xss_html_escape(text)
-
20
return text unless Haml::Util.rails_xss_safe? && haml_buffer.options[:escape_html]
-
20
html_escape(text)
-
end
-
end
-
-
1
class ErrorReturn
-
# Any attempt to treat ErrorReturn as a string should cause it to blow up.
-
1
alias_method :html_safe, :to_s
-
1
alias_method :html_safe?, :to_s
-
1
alias_method :html_safe!, :to_s
-
end
-
end
-
end
-
1
require 'haml/template/options'
-
1
require 'haml/engine'
-
1
require 'haml/helpers/action_view_mods'
-
1
require 'haml/helpers/action_view_extensions'
-
1
require 'haml/helpers/xss_mods'
-
1
require 'haml/helpers/action_view_xss_mods'
-
-
1
module Haml
-
1
class Compiler
-
1
def precompiled_method_return_value_with_haml_xss
-
31
"::Haml::Util.html_safe(#{precompiled_method_return_value_without_haml_xss})"
-
end
-
1
alias_method :precompiled_method_return_value_without_haml_xss, :precompiled_method_return_value
-
1
alias_method :precompiled_method_return_value, :precompiled_method_return_value_with_haml_xss
-
end
-
-
1
module Helpers
-
1
include Haml::Helpers::XssMods
-
end
-
-
1
module Util
-
1
undef :rails_xss_safe? if defined? rails_xss_safe?
-
59
def rails_xss_safe?; true; end
-
end
-
-
end
-
-
-
1
Haml::Template.options[:ugly] = defined?(Rails) ? !Rails.env.development? : true
-
1
Haml::Template.options[:escape_html] = true
-
-
1
require 'haml/template/plugin'
-
1
module Haml
-
-
# This module makes Haml work with Rails using the template handler API.
-
1
class Plugin < ActionView::Template::Handlers::ERB.superclass
-
-
# Rails 3.1+, template handlers don't inherit from anything. In <= 3.0, they
-
# do. To avoid messy logic figuring this out, we just inherit from whatever
-
# the ERB handler does.
-
-
# In Rails 3.1+, we don't need to include Compilable.
-
1
if (ActionPack::VERSION::MAJOR == 3) && (ActionPack::VERSION::MINOR < 1)
-
include ActionView::Template::Handlers::Compilable
-
end
-
-
1
def handles_encoding?; true; end
-
-
1
def compile(template)
-
31
options = Haml::Template.options.dup
-
31
if (ActionPack::VERSION::MAJOR >= 4) && template.respond_to?(:type)
-
31
options[:mime_type] = template.type
-
elsif template.respond_to? :mime_type
-
options[:mime_type] = template.mime_type
-
end
-
31
options[:filename] = template.identifier
-
31
Haml::Engine.new(template.source, options).compiler.precompiled_with_ambles([])
-
end
-
-
# In Rails 3.1+, #call takes the place of #compile
-
1
def self.call(template)
-
31
new.compile(template)
-
end
-
-
1
def cache_fragment(block, name = {}, options = nil)
-
@view.fragment_for(block, name, options) do
-
eval("_hamlout.buffer", block.binding)
-
end
-
end
-
end
-
end
-
-
1
ActionView::Template.register_template_handler(:haml, Haml::Plugin)
-
1
HighVoltage.parent_engine.routes.draw do
-
1
if HighVoltage.home_page
-
1
get "/#{HighVoltage.home_page}", to: redirect('/')
-
1
root to: 'high_voltage/pages#show', id: HighVoltage.home_page
-
end
-
-
1
if HighVoltage.routes
-
1
get HighVoltage.route_drawer.match_attributes
-
end
-
end
-
1
module HtmlPage
-
1
class Capture
-
1
def initialize(context, &block)
-
@context = context
-
@block = block || NullBlock.new
-
end
-
-
1
def capture
-
if block.arity > 0
-
block.call(*block_arguments)
-
end
-
-
[head.content, body.content]
-
end
-
-
1
private
-
-
1
attr_reader :block, :context
-
-
1
def block_arguments
-
[head, body].first(block.arity)
-
end
-
-
1
def body
-
@body ||= Block.new(context)
-
end
-
-
1
def head
-
@head ||= begin
-
if block.arity < 1
-
BlockWithoutArguments.new(context, &block)
-
else
-
Block.new(context)
-
end
-
end
-
end
-
-
1
class BlockWithoutArguments
-
1
def initialize(context, &block)
-
@context = context
-
@block = block
-
end
-
-
1
def content
-
@context.with_output_buffer(&@block)
-
end
-
end
-
1
private_constant :BlockWithoutArguments
-
-
1
class Block
-
1
def initialize(context)
-
@context = context
-
@content = []
-
end
-
-
1
def append(&block)
-
@content.push(@context.with_output_buffer(&block))
-
nil
-
end
-
-
1
def content
-
@content.join
-
end
-
end
-
1
private_constant :Block
-
-
1
class NullBlock
-
1
def arity
-
1
-
end
-
-
1
def call(*)
-
end
-
end
-
1
private_constant :NullBlock
-
end
-
end
-
1
module I18n
-
1
module Backend
-
1
autoload :Base, 'i18n/backend/base'
-
1
autoload :InterpolationCompiler, 'i18n/backend/interpolation_compiler'
-
1
autoload :Cache, 'i18n/backend/cache'
-
1
autoload :Cascade, 'i18n/backend/cascade'
-
1
autoload :Chain, 'i18n/backend/chain'
-
1
autoload :Fallbacks, 'i18n/backend/fallbacks'
-
1
autoload :Flatten, 'i18n/backend/flatten'
-
1
autoload :Gettext, 'i18n/backend/gettext'
-
1
autoload :KeyValue, 'i18n/backend/key_value'
-
1
autoload :Memoize, 'i18n/backend/memoize'
-
1
autoload :Metadata, 'i18n/backend/metadata'
-
1
autoload :Pluralization, 'i18n/backend/pluralization'
-
1
autoload :Simple, 'i18n/backend/simple'
-
1
autoload :Transliterator, 'i18n/backend/transliterator'
-
end
-
end
-
1
require 'yaml'
-
1
require 'i18n/core_ext/hash'
-
1
require 'i18n/core_ext/kernel/suppress_warnings'
-
-
1
module I18n
-
1
module Backend
-
1
module Base
-
1
include I18n::Backend::Transliterator
-
-
# Accepts a list of paths to translation files. Loads translations from
-
# plain Ruby (*.rb) or YAML files (*.yml). See #load_rb and #load_yml
-
# for details.
-
1
def load_translations(*filenames)
-
1
filenames = I18n.load_path if filenames.empty?
-
10
filenames.flatten.each { |filename| load_file(filename) }
-
end
-
-
# This method receives a locale, a data hash and options for storing translations.
-
# Should be implemented
-
1
def store_translations(locale, data, options = {})
-
raise NotImplementedError
-
end
-
-
1
def translate(locale, key, options = {})
-
1670
raise InvalidLocale.new(locale) unless locale
-
1670
entry = key && lookup(locale, key, options[:scope], options)
-
-
1670
if options.empty?
-
57
entry = resolve(locale, key, entry, options)
-
else
-
1613
count, default = options.values_at(:count, :default)
-
1613
values = options.except(*RESERVED_KEYS)
-
1613
entry = entry.nil? && default ?
-
default(locale, key, default, options) : resolve(locale, key, entry, options)
-
end
-
-
1670
throw(:exception, I18n::MissingTranslation.new(locale, key, options)) if entry.nil?
-
909
entry = entry.dup if entry.is_a?(String)
-
-
909
entry = pluralize(locale, entry, count) if count
-
909
entry = interpolate(locale, entry, values) if values
-
909
entry
-
end
-
-
1
def exists?(locale, key)
-
lookup(locale, key) != nil
-
end
-
-
# Acts the same as +strftime+, but uses a localized version of the
-
# format string. Takes a key from the date/time formats translations as
-
# a format argument (<em>e.g.</em>, <tt>:short</tt> in <tt>:'date.formats'</tt>).
-
1
def localize(locale, object, format = :default, options = {})
-
raise ArgumentError, "Object must be a Date, DateTime or Time object. #{object.inspect} given." unless object.respond_to?(:strftime)
-
-
if Symbol === format
-
key = format
-
type = object.respond_to?(:sec) ? 'time' : 'date'
-
options = options.merge(:raise => true, :object => object, :locale => locale)
-
format = I18n.t(:"#{type}.formats.#{key}", options)
-
end
-
-
# format = resolve(locale, object, format, options)
-
format = format.to_s.gsub(/%[aAbBpP]/) do |match|
-
case match
-
when '%a' then I18n.t(:"date.abbr_day_names", :locale => locale, :format => format)[object.wday]
-
when '%A' then I18n.t(:"date.day_names", :locale => locale, :format => format)[object.wday]
-
when '%b' then I18n.t(:"date.abbr_month_names", :locale => locale, :format => format)[object.mon]
-
when '%B' then I18n.t(:"date.month_names", :locale => locale, :format => format)[object.mon]
-
when '%p' then I18n.t(:"time.#{object.hour < 12 ? :am : :pm}", :locale => locale, :format => format).upcase if object.respond_to? :hour
-
when '%P' then I18n.t(:"time.#{object.hour < 12 ? :am : :pm}", :locale => locale, :format => format).downcase if object.respond_to? :hour
-
end
-
end
-
-
object.strftime(format)
-
end
-
-
# Returns an array of locales for which translations are available
-
# ignoring the reserved translation meta data key :i18n.
-
1
def available_locales
-
raise NotImplementedError
-
end
-
-
1
def reload!
-
end
-
-
1
protected
-
-
# The method which actually looks up for the translation in the store.
-
1
def lookup(locale, key, scope = [], options = {})
-
raise NotImplementedError
-
end
-
-
# Evaluates defaults.
-
# If given subject is an Array, it walks the array and returns the
-
# first translation that can be resolved. Otherwise it tries to resolve
-
# the translation directly.
-
1
def default(locale, object, subject, options = {})
-
2221
options = options.dup.reject { |key, value| key == :default }
-
547
case subject
-
when Array
-
subject.each do |item|
-
1308
result = resolve(locale, object, item, options) and return result
-
547
end and nil
-
else
-
resolve(locale, object, subject, options)
-
end
-
end
-
-
# Resolves a translation.
-
# If the given subject is a Symbol, it will be translated with the
-
# given options. If it is a Proc then it will be evaluated. All other
-
# subjects will be returned directly.
-
1
def resolve(locale, object, subject, options = {})
-
2431
return subject if options[:resolve] == false
-
2431
result = catch(:exception) do
-
2431
case subject
-
when Symbol
-
943
I18n.translate(subject, options.merge(:locale => locale, :throw => true))
-
when Proc
-
date_or_time = options.delete(:object) || object
-
resolve(locale, object, subject.call(date_or_time, options))
-
else
-
1488
subject
-
end
-
end
-
2431
result unless result.is_a?(MissingTranslation)
-
end
-
-
# Picks a translation from a pluralized mnemonic subkey according to English
-
# pluralization rules :
-
# - It will pick the :one subkey if count is equal to 1.
-
# - It will pick the :other subkey otherwise.
-
# - It will pick the :zero subkey in the special case where count is
-
# equal to 0 and there is a :zero subkey present. This behaviour is
-
# not stand with regards to the CLDR pluralization rules.
-
# Other backends can implement more flexible or complex pluralization rules.
-
1
def pluralize(locale, entry, count)
-
535
return entry unless entry.is_a?(Hash) && count
-
-
20
key = :zero if count == 0 && entry.has_key?(:zero)
-
20
key ||= count == 1 ? :one : :other
-
20
raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key)
-
20
entry[key]
-
end
-
-
# Interpolates values into a given string.
-
#
-
# interpolate "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X'
-
# # => "file test.txt opened by %{user}"
-
1
def interpolate(locale, string, values = {})
-
908
if string.is_a?(::String) && !values.empty?
-
861
I18n.interpolate(string, values)
-
else
-
47
string
-
end
-
end
-
-
# Loads a single translations file by delegating to #load_rb or
-
# #load_yml depending on the file extension and directly merges the
-
# data to the existing translations. Raises I18n::UnknownFileType
-
# for all other file extensions.
-
1
def load_file(filename)
-
9
type = File.extname(filename).tr('.', '').downcase
-
9
raise UnknownFileType.new(type, filename) unless respond_to?(:"load_#{type}", true)
-
9
data = send(:"load_#{type}", filename)
-
9
unless data.is_a?(Hash)
-
raise InvalidLocaleData.new(filename, 'expects it to return a hash, but does not')
-
end
-
18
data.each { |locale, d| store_translations(locale, d || {}) }
-
end
-
-
# Loads a plain Ruby translations file. eval'ing the file must yield
-
# a Hash containing translation data with locales as toplevel keys.
-
1
def load_rb(filename)
-
eval(IO.read(filename), binding, filename)
-
end
-
-
# Loads a YAML translations file. The data must have locales as
-
# toplevel keys.
-
1
def load_yml(filename)
-
9
begin
-
9
YAML.load_file(filename)
-
rescue TypeError, ScriptError, StandardError => e
-
raise InvalidLocaleData.new(filename, e.inspect)
-
end
-
end
-
end
-
end
-
end
-
1
module I18n
-
1
module Backend
-
# A simple backend that reads translations from YAML files and stores them in
-
# an in-memory hash. Relies on the Base backend.
-
#
-
# The implementation is provided by a Implementation module allowing to easily
-
# extend Simple backend's behavior by including modules. E.g.:
-
#
-
# module I18n::Backend::Pluralization
-
# def pluralize(*args)
-
# # extended pluralization logic
-
# super
-
# end
-
# end
-
#
-
# I18n::Backend::Simple.include(I18n::Backend::Pluralization)
-
1
class Simple
-
3
(class << self; self; end).class_eval { public :include }
-
-
1
module Implementation
-
1
include Base
-
-
1
def initialized?
-
1671
@initialized ||= false
-
end
-
-
# Stores translations for the given locale in memory.
-
# This uses a deep merge for the translations hash, so existing
-
# translations will be overwritten by new ones only at the deepest
-
# level of the hash.
-
1
def store_translations(locale, data, options = {})
-
9
locale = locale.to_sym
-
9
translations[locale] ||= {}
-
9
data = data.deep_symbolize_keys
-
9
translations[locale].deep_merge!(data)
-
end
-
-
# Get available locales from the translations hash
-
1
def available_locales
-
1
init_translations unless initialized?
-
1
translations.inject([]) do |locales, (locale, data)|
-
1
locales << locale unless (data.keys - [:i18n]).empty?
-
1
locales
-
end
-
end
-
-
# Clean up translations hash and set initialized to false on reload!
-
1
def reload!
-
1
@initialized = false
-
1
@translations = nil
-
1
super
-
end
-
-
1
protected
-
-
1
def init_translations
-
1
load_translations
-
1
@initialized = true
-
end
-
-
1
def translations
-
1689
@translations ||= {}
-
end
-
-
# Looks up a translation from the translations hash. Returns nil if
-
# eiher key is nil, or locale, scope or key do not exist as a key in the
-
# nested translations hash. Splits keys or scopes containing dots
-
# into multiple keys, i.e. <tt>currency.format</tt> is regarded the same as
-
# <tt>%w(currency format)</tt>.
-
1
def lookup(locale, key, scope = [], options = {})
-
1670
init_translations unless initialized?
-
1670
keys = I18n.normalize_keys(locale, key, scope, options[:separator])
-
-
1670
keys.inject(translations) do |result, _key|
-
6208
_key = _key.to_sym
-
6208
return nil unless result.is_a?(Hash) && result.has_key?(_key)
-
4900
result = result[_key]
-
4900
result = resolve(locale, _key, result, options.merge(:scope => nil)) if result.is_a?(Symbol)
-
4900
result
-
end
-
end
-
end
-
-
1
include Implementation
-
end
-
end
-
end
-
# encoding: utf-8
-
1
module I18n
-
1
module Backend
-
1
module Transliterator
-
1
DEFAULT_REPLACEMENT_CHAR = "?"
-
-
# Given a locale and a UTF-8 string, return the locale's ASCII
-
# approximation for the string.
-
1
def transliterate(locale, string, replacement = nil)
-
@transliterators ||= {}
-
@transliterators[locale] ||= Transliterator.get I18n.t(:'i18n.transliterate.rule',
-
:locale => locale, :resolve => false, :default => {})
-
@transliterators[locale].transliterate(string, replacement)
-
end
-
-
# Get a transliterator instance.
-
1
def self.get(rule = nil)
-
if !rule || rule.kind_of?(Hash)
-
HashTransliterator.new(rule)
-
elsif rule.kind_of? Proc
-
ProcTransliterator.new(rule)
-
else
-
raise I18n::ArgumentError, "Transliteration rule must be a proc or a hash."
-
end
-
end
-
-
# A transliterator which accepts a Proc as its transliteration rule.
-
1
class ProcTransliterator
-
1
def initialize(rule)
-
@rule = rule
-
end
-
-
1
def transliterate(string, replacement = nil)
-
@rule.call(string)
-
end
-
end
-
-
# A transliterator which accepts a Hash of characters as its translation
-
# rule.
-
1
class HashTransliterator
-
1
DEFAULT_APPROXIMATIONS = {
-
"À"=>"A", "Á"=>"A", "Â"=>"A", "Ã"=>"A", "Ä"=>"A", "Å"=>"A", "Æ"=>"AE",
-
"Ç"=>"C", "È"=>"E", "É"=>"E", "Ê"=>"E", "Ë"=>"E", "Ì"=>"I", "Í"=>"I",
-
"Î"=>"I", "Ï"=>"I", "Ð"=>"D", "Ñ"=>"N", "Ò"=>"O", "Ó"=>"O", "Ô"=>"O",
-
"Õ"=>"O", "Ö"=>"O", "×"=>"x", "Ø"=>"O", "Ù"=>"U", "Ú"=>"U", "Û"=>"U",
-
"Ü"=>"U", "Ý"=>"Y", "Þ"=>"Th", "ß"=>"ss", "à"=>"a", "á"=>"a", "â"=>"a",
-
"ã"=>"a", "ä"=>"a", "å"=>"a", "æ"=>"ae", "ç"=>"c", "è"=>"e", "é"=>"e",
-
"ê"=>"e", "ë"=>"e", "ì"=>"i", "í"=>"i", "î"=>"i", "ï"=>"i", "ð"=>"d",
-
"ñ"=>"n", "ò"=>"o", "ó"=>"o", "ô"=>"o", "õ"=>"o", "ö"=>"o", "ø"=>"o",
-
"ù"=>"u", "ú"=>"u", "û"=>"u", "ü"=>"u", "ý"=>"y", "þ"=>"th", "ÿ"=>"y",
-
"Ā"=>"A", "ā"=>"a", "Ă"=>"A", "ă"=>"a", "Ą"=>"A", "ą"=>"a", "Ć"=>"C",
-
"ć"=>"c", "Ĉ"=>"C", "ĉ"=>"c", "Ċ"=>"C", "ċ"=>"c", "Č"=>"C", "č"=>"c",
-
"Ď"=>"D", "ď"=>"d", "Đ"=>"D", "đ"=>"d", "Ē"=>"E", "ē"=>"e", "Ĕ"=>"E",
-
"ĕ"=>"e", "Ė"=>"E", "ė"=>"e", "Ę"=>"E", "ę"=>"e", "Ě"=>"E", "ě"=>"e",
-
"Ĝ"=>"G", "ĝ"=>"g", "Ğ"=>"G", "ğ"=>"g", "Ġ"=>"G", "ġ"=>"g", "Ģ"=>"G",
-
"ģ"=>"g", "Ĥ"=>"H", "ĥ"=>"h", "Ħ"=>"H", "ħ"=>"h", "Ĩ"=>"I", "ĩ"=>"i",
-
"Ī"=>"I", "ī"=>"i", "Ĭ"=>"I", "ĭ"=>"i", "Į"=>"I", "į"=>"i", "İ"=>"I",
-
"ı"=>"i", "IJ"=>"IJ", "ij"=>"ij", "Ĵ"=>"J", "ĵ"=>"j", "Ķ"=>"K", "ķ"=>"k",
-
"ĸ"=>"k", "Ĺ"=>"L", "ĺ"=>"l", "Ļ"=>"L", "ļ"=>"l", "Ľ"=>"L", "ľ"=>"l",
-
"Ŀ"=>"L", "ŀ"=>"l", "Ł"=>"L", "ł"=>"l", "Ń"=>"N", "ń"=>"n", "Ņ"=>"N",
-
"ņ"=>"n", "Ň"=>"N", "ň"=>"n", "ʼn"=>"'n", "Ŋ"=>"NG", "ŋ"=>"ng",
-
"Ō"=>"O", "ō"=>"o", "Ŏ"=>"O", "ŏ"=>"o", "Ő"=>"O", "ő"=>"o", "Œ"=>"OE",
-
"œ"=>"oe", "Ŕ"=>"R", "ŕ"=>"r", "Ŗ"=>"R", "ŗ"=>"r", "Ř"=>"R", "ř"=>"r",
-
"Ś"=>"S", "ś"=>"s", "Ŝ"=>"S", "ŝ"=>"s", "Ş"=>"S", "ş"=>"s", "Š"=>"S",
-
"š"=>"s", "Ţ"=>"T", "ţ"=>"t", "Ť"=>"T", "ť"=>"t", "Ŧ"=>"T", "ŧ"=>"t",
-
"Ũ"=>"U", "ũ"=>"u", "Ū"=>"U", "ū"=>"u", "Ŭ"=>"U", "ŭ"=>"u", "Ů"=>"U",
-
"ů"=>"u", "Ű"=>"U", "ű"=>"u", "Ų"=>"U", "ų"=>"u", "Ŵ"=>"W", "ŵ"=>"w",
-
"Ŷ"=>"Y", "ŷ"=>"y", "Ÿ"=>"Y", "Ź"=>"Z", "ź"=>"z", "Ż"=>"Z", "ż"=>"z",
-
"Ž"=>"Z", "ž"=>"z"
-
}.freeze
-
-
1
def initialize(rule = nil)
-
@rule = rule
-
add DEFAULT_APPROXIMATIONS.dup
-
add rule if rule
-
end
-
-
1
def transliterate(string, replacement = nil)
-
string.gsub(/[^\x00-\x7f]/u) do |char|
-
approximations[char] || replacement || DEFAULT_REPLACEMENT_CHAR
-
end
-
end
-
-
1
private
-
-
1
def approximations
-
@approximations ||= {}
-
end
-
-
# Add transliteration rules to the approximations hash.
-
1
def add(hash)
-
hash.each do |key, value|
-
approximations[key.to_s] = value.to_s
-
end
-
end
-
end
-
end
-
end
-
end
-
1
class Hash
-
def slice(*keep_keys)
-
h = {}
-
keep_keys.each { |key| h[key] = fetch(key) }
-
h
-
1
end unless Hash.method_defined?(:slice)
-
-
def except(*less_keys)
-
slice(*keys - less_keys)
-
1
end unless Hash.method_defined?(:except)
-
-
def deep_symbolize_keys
-
inject({}) { |result, (key, value)|
-
value = value.deep_symbolize_keys if value.is_a?(Hash)
-
result[(key.to_sym rescue key) || key] = value
-
result
-
}
-
1
end unless Hash.method_defined?(:deep_symbolize_keys)
-
-
# deep_merge_hash! by Stefan Rusterholz, see http://www.ruby-forum.com/topic/142809
-
1
MERGER = proc do |key, v1, v2|
-
Hash === v1 && Hash === v2 ? v1.merge(v2, &MERGER) : v2
-
end
-
-
def deep_merge!(data)
-
merge!(data, &MERGER)
-
1
end unless Hash.method_defined?(:deep_merge!)
-
end
-
-
1
module Kernel
-
1
def suppress_warnings
-
original_verbosity, $VERBOSE = $VERBOSE, nil
-
yield
-
ensure
-
$VERBOSE = original_verbosity
-
end
-
end
-
1
require 'kaminari/models/active_record_model_extension'
-
-
1
module Kaminari
-
1
module ActiveRecordExtension
-
1
extend ActiveSupport::Concern
-
-
1
module ClassMethods
-
# Future subclasses will pick up the model extension
-
1
def inherited(kls) #:nodoc:
-
24
super
-
24
kls.send(:include, Kaminari::ActiveRecordModelExtension) if kls.superclass == ::ActiveRecord::Base
-
end
-
end
-
-
1
included do
-
# Existing subclasses pick up the model extension as well
-
1
self.descendants.each do |kls|
-
1
kls.send(:include, Kaminari::ActiveRecordModelExtension) if kls.superclass == ::ActiveRecord::Base
-
end
-
end
-
end
-
end
-
1
require 'kaminari/models/active_record_relation_methods'
-
-
1
module Kaminari
-
1
module ActiveRecordModelExtension
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
22
self.send(:include, Kaminari::ConfigurationMethods)
-
-
# Fetch the values at the specified page number
-
# Model.page(5)
-
22
eval <<-RUBY
-
def self.#{Kaminari.config.page_method_name}(num = nil)
-
limit(default_per_page).offset(default_per_page * ((num = num.to_i - 1) < 0 ? 0 : num)).extending do
-
include Kaminari::ActiveRecordRelationMethods
-
include Kaminari::PageScopeMethods
-
end
-
end
-
RUBY
-
end
-
end
-
end
-
1
module Kaminari
-
1
module ActiveRecordRelationMethods
-
# a workaround for AR 3.0.x that returns 0 for #count when page > 1
-
# if +limit_value+ is specified, load all the records and count them
-
1
if ActiveRecord::VERSION::STRING < '3.1'
-
def count(column_name = nil, options = {}) #:nodoc:
-
limit_value && !options[:distinct] ? length : super(column_name, options)
-
end
-
end
-
-
1
def entry_name
-
model_name.human.downcase
-
end
-
-
1
def reset #:nodoc:
-
@total_count = nil
-
super
-
end
-
-
1
def total_count(column_name = :all, options = {}) #:nodoc:
-
# #count overrides the #select which could include generated columns referenced in #order, so skip #order here, where it's irrelevant to the result anyway
-
@total_count ||= begin
-
c = except(:offset, :limit, :order)
-
-
# Remove includes only if they are irrelevant
-
c = c.except(:includes) unless references_eager_loaded_tables?
-
-
# Rails 4.1 removes the `options` argument from AR::Relation#count
-
args = [column_name]
-
args << options if ActiveRecord::VERSION::STRING < '4.1.0'
-
-
# .group returns an OrderdHash that responds to #count
-
c = c.count(*args)
-
if c.is_a?(Hash) || c.is_a?(ActiveSupport::OrderedHash)
-
c.count
-
else
-
c.respond_to?(:count) ? c.count(*args) : c
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/module'
-
1
module Kaminari
-
# Kind of Array that can paginate
-
1
class PaginatableArray < Array
-
1
include Kaminari::ConfigurationMethods::ClassMethods
-
-
1
attr_internal_accessor :limit_value, :offset_value
-
-
# ==== Options
-
# * <tt>:limit</tt> - limit
-
# * <tt>:offset</tt> - offset
-
# * <tt>:total_count</tt> - total_count
-
1
def initialize(original_array = [], options = {})
-
@_original_array, @_limit_value, @_offset_value, @_total_count, @_padding = original_array, (options[:limit] || default_per_page).to_i, options[:offset].to_i, options[:total_count], options[:padding].to_i
-
-
if options[:limit] && options[:offset]
-
extend Kaminari::PageScopeMethods
-
end
-
-
if @_total_count.present? && @_total_count <= original_array.count
-
original_array = original_array.first(@_total_count)[@_offset_value, @_limit_value]
-
end
-
-
if @_total_count.nil?
-
original_array = original_array[@_offset_value, @_limit_value]
-
end
-
-
super(original_array || [])
-
end
-
-
1
def entry_name
-
"entry"
-
end
-
-
# items at the specified "page"
-
1
class_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def #{Kaminari.config.page_method_name}(num = 1)
-
offset(limit_value * ((num = num.to_i - 1) < 0 ? 0 : num))
-
end
-
RUBY
-
-
# returns another chunk of the original array
-
1
def limit(num)
-
self.class.new @_original_array, :limit => num, :offset => @_offset_value, :total_count => @_total_count, :padding => @_padding
-
end
-
-
# total item numbers of the original array
-
1
def total_count
-
@_total_count || @_original_array.count
-
end
-
-
# returns another chunk of the original array
-
1
def offset(num)
-
self.class.new @_original_array, :limit => @_limit_value, :offset => num, :total_count => @_total_count, :padding => @_padding
-
end
-
end
-
-
# Wrap an Array object to make it paginatable
-
# ==== Options
-
# * <tt>:limit</tt> - limit
-
# * <tt>:offset</tt> - offset
-
# * <tt>:total_count</tt> - total_count
-
1
def self.paginate_array(array, options = {})
-
PaginatableArray.new array, options
-
end
-
end
-
1
require 'logger'
-
1
require 'listen/logger'
-
1
require 'listen/listener'
-
-
1
require 'listen/internals/thread_pool'
-
-
# Show warnings about vulnerabilities, bugs and outdated Rubies, since previous
-
# versions aren't tested or officially supported.
-
1
require 'ruby_dep/warning'
-
1
RubyDep::Warning.new.show_warnings
-
-
# Always set up logging by default first time file is required
-
#
-
# NOTE: If you need to clear the logger completely, do so *after*
-
# requiring this file. If you need to set a custom logger,
-
# require the listen/logger file and set the logger before requiring
-
# this file.
-
1
Listen.setup_default_logger_if_unset
-
-
# Won't print anything by default because of level - unless you've set
-
# LISTEN_GEM_DEBUGGING or provided your own logger with a high enough level
-
1
Listen::Logger.info "Listen loglevel set to: #{Listen.logger.level}"
-
1
Listen::Logger.info "Listen version: #{Listen::VERSION}"
-
-
1
module Listen
-
1
class << self
-
# Listens to file system modifications on a either single directory or
-
# multiple directories.
-
#
-
# @param (see Listen::Listener#new)
-
#
-
# @yield [modified, added, removed] the changed files
-
# @yieldparam [Array<String>] modified the list of modified files
-
# @yieldparam [Array<String>] added the list of added files
-
# @yieldparam [Array<String>] removed the list of removed files
-
#
-
# @return [Listen::Listener] the listener
-
#
-
1
def to(*args, &block)
-
@listeners ||= []
-
Listener.new(*args, &block).tap do |listener|
-
@listeners << listener
-
end
-
end
-
-
# This is used by the `listen` binary to handle Ctrl-C
-
#
-
1
def stop
-
Internals::ThreadPool.stop
-
@listeners ||= []
-
-
# TODO: should use a mutex for this
-
@listeners.each(&:stop)
-
@listeners = nil
-
end
-
end
-
end
-
1
require 'listen/adapter/base'
-
1
require 'listen/adapter/bsd'
-
1
require 'listen/adapter/darwin'
-
1
require 'listen/adapter/linux'
-
1
require 'listen/adapter/polling'
-
1
require 'listen/adapter/windows'
-
-
1
module Listen
-
1
module Adapter
-
1
OPTIMIZED_ADAPTERS = [Darwin, Linux, BSD, Windows].freeze
-
1
POLLING_FALLBACK_MESSAGE = 'Listen will be polling for changes.'\
-
'Learn more at https://github.com/guard/listen#listen-adapters.'.freeze
-
-
1
class << self
-
1
def select(options = {})
-
_log :debug, 'Adapter: considering polling ...'
-
return Polling if options[:force_polling]
-
_log :debug, 'Adapter: considering optimized backend...'
-
return _usable_adapter_class if _usable_adapter_class
-
_log :debug, 'Adapter: falling back to polling...'
-
_warn_polling_fallback(options)
-
Polling
-
rescue
-
_log :warn, format('Adapter: failed: %s:%s', $ERROR_POSITION.inspect,
-
$ERROR_POSITION * "\n")
-
raise
-
end
-
-
1
private
-
-
1
def _usable_adapter_class
-
OPTIMIZED_ADAPTERS.detect(&:usable?)
-
end
-
-
1
def _warn_polling_fallback(options)
-
msg = options.fetch(:polling_fallback_message, POLLING_FALLBACK_MESSAGE)
-
Kernel.warn "[Listen warning]:\n #{msg}" if msg
-
end
-
-
1
def _log(type, message)
-
Listen::Logger.send(type, message)
-
end
-
end
-
end
-
end
-
1
require 'listen/options'
-
1
require 'listen/record'
-
1
require 'listen/change'
-
-
1
module Listen
-
1
module Adapter
-
1
class Base
-
1
attr_reader :options
-
-
# TODO: only used by tests
-
1
DEFAULTS = {}.freeze
-
-
1
attr_reader :config
-
-
1
def initialize(config)
-
@started = false
-
@config = config
-
-
@configured = nil
-
-
fail 'No directories to watch!' if config.directories.empty?
-
-
defaults = self.class.const_get('DEFAULTS')
-
@options = Listen::Options.new(config.adapter_options, defaults)
-
rescue
-
_log_exception 'adapter config failed: %s:%s called from: %s', caller
-
raise
-
end
-
-
# TODO: it's a separate method as a temporary workaround for tests
-
1
def configure
-
if @configured
-
_log(:warn, 'Adapter already configured!')
-
return
-
end
-
-
@configured = true
-
-
@callbacks ||= {}
-
config.directories.each do |dir|
-
callback = @callbacks[dir] || lambda do |event|
-
_process_event(dir, event)
-
end
-
@callbacks[dir] = callback
-
_configure(dir, &callback)
-
end
-
-
@snapshots ||= {}
-
# TODO: separate config per directory (some day maybe)
-
change_config = Change::Config.new(config.queue, config.silencer)
-
config.directories.each do |dir|
-
record = Record.new(dir)
-
snapshot = Change.new(change_config, record)
-
@snapshots[dir] = snapshot
-
end
-
end
-
-
1
def started?
-
@started
-
end
-
-
1
def start
-
configure
-
-
if started?
-
_log(:warn, 'Adapter already started!')
-
return
-
end
-
-
@started = true
-
-
calling_stack = caller.dup
-
Listen::Internals::ThreadPool.add do
-
begin
-
@snapshots.values.each do |snapshot|
-
_timed('Record.build()') { snapshot.record.build }
-
end
-
_run
-
rescue
-
msg = 'run() in thread failed: %s:\n'\
-
' %s\n\ncalled from:\n %s'
-
_log_exception(msg, calling_stack)
-
raise # for unit tests mostly
-
end
-
end
-
end
-
-
1
def stop
-
_stop
-
end
-
-
1
def self.usable?
-
const_get('OS_REGEXP') =~ RbConfig::CONFIG['target_os']
-
end
-
-
1
private
-
-
1
def _stop
-
end
-
-
1
def _timed(title)
-
start = Time.now.to_f
-
yield
-
diff = Time.now.to_f - start
-
Listen::Logger.info format('%s: %.05f seconds', title, diff)
-
rescue
-
Listen::Logger.warn "#{title} crashed: #{$ERROR_INFO.inspect}"
-
raise
-
end
-
-
# TODO: allow backend adapters to pass specific invalidation objects
-
# e.g. Darwin -> DirRescan, INotify -> MoveScan, etc.
-
1
def _queue_change(type, dir, rel_path, options)
-
@snapshots[dir].invalidate(type, rel_path, options)
-
end
-
-
1
def _log(*args, &block)
-
self.class.send(:_log, *args, &block)
-
end
-
-
1
def _log_exception(msg, caller_stack)
-
formatted = format(
-
msg,
-
$ERROR_INFO,
-
$ERROR_POSITION * "\n",
-
caller_stack * "\n"
-
)
-
-
_log(:error, formatted)
-
end
-
-
1
class << self
-
1
private
-
-
1
def _log(*args, &block)
-
Listen::Logger.send(*args, &block)
-
end
-
end
-
end
-
end
-
end
-
# Listener implementation for BSD's `kqueue`.
-
# @see http://www.freebsd.org/cgi/man.cgi?query=kqueue
-
# @see https://github.com/mat813/rb-kqueue/blob/master/lib/rb-kqueue/queue.rb
-
#
-
1
module Listen
-
1
module Adapter
-
1
class BSD < Base
-
1
OS_REGEXP = /bsd|dragonfly/i
-
-
1
DEFAULTS = {
-
events: [
-
:delete,
-
:write,
-
:extend,
-
:attrib,
-
:rename
-
# :link, :revoke
-
]
-
}.freeze
-
-
1
BUNDLER_DECLARE_GEM = <<-EOS.gsub(/^ {6}/, '')
-
Please add the following to your Gemfile to avoid polling for changes:
-
require 'rbconfig'
-
if RbConfig::CONFIG['target_os'] =~ /#{OS_REGEXP}/
-
gem 'rb-kqueue', '>= 0.2'
-
end
-
EOS
-
-
1
def self.usable?
-
return false unless super
-
require 'rb-kqueue'
-
require 'find'
-
true
-
rescue LoadError
-
Kernel.warn BUNDLER_DECLARE_GEM
-
false
-
end
-
-
1
private
-
-
1
def _configure(directory, &callback)
-
@worker ||= KQueue::Queue.new
-
@callback = callback
-
# use Record to make a snapshot of dir, so we
-
# can detect new files
-
_find(directory.to_s) { |path| _watch_file(path, @worker) }
-
end
-
-
1
def _run
-
@worker.run
-
end
-
-
1
def _process_event(dir, event)
-
full_path = _event_path(event)
-
if full_path.directory?
-
# Force dir content tracking to kick in, or we won't have
-
# names of added files
-
_queue_change(:dir, dir, '.', recursive: true)
-
elsif full_path.exist?
-
path = full_path.relative_path_from(dir)
-
_queue_change(:file, dir, path.to_s, change: _change(event.flags))
-
end
-
-
# If it is a directory, and it has a write flag, it means a
-
# file has been added so find out which and deal with it.
-
# No need to check for removed files, kqueue will forget them
-
# when the vfs does.
-
_watch_for_new_file(event) if full_path.directory?
-
end
-
-
1
def _change(event_flags)
-
{ modified: [:attrib, :extend],
-
added: [:write],
-
removed: [:rename, :delete]
-
}.each do |change, flags|
-
return change unless (flags & event_flags).empty?
-
end
-
nil
-
end
-
-
1
def _event_path(event)
-
Pathname.new(event.watcher.path)
-
end
-
-
1
def _watch_for_new_file(event)
-
queue = event.watcher.queue
-
_find(_event_path(event).to_s) do |file_path|
-
unless queue.watchers.detect { |_, v| v.path == file_path.to_s }
-
_watch_file(file_path, queue)
-
end
-
end
-
end
-
-
1
def _watch_file(path, queue)
-
queue.watch_file(path, *options.events, &@callback)
-
rescue Errno::ENOENT => e
-
_log :warn, "kqueue: watch file failed: #{e.message}"
-
end
-
-
# Quick rubocop workaround
-
1
def _find(*paths, &block)
-
Find.send(:find, *paths, &block)
-
end
-
end
-
end
-
end
-
1
require 'pathname'
-
-
1
module Listen
-
1
module Adapter
-
1
class Config
-
1
attr_reader :directories
-
1
attr_reader :silencer
-
1
attr_reader :queue
-
1
attr_reader :adapter_options
-
-
1
def initialize(directories, queue, silencer, adapter_options)
-
# Default to current directory if no directories are supplied
-
directories = [Dir.pwd] if directories.to_a.empty?
-
-
# TODO: fix (flatten, array, compact?)
-
@directories = directories.map do |directory|
-
Pathname.new(directory.to_s).realpath
-
end
-
-
@silencer = silencer
-
@queue = queue
-
@adapter_options = adapter_options
-
end
-
end
-
end
-
end
-
1
require 'thread'
-
1
require 'listen/internals/thread_pool'
-
-
1
module Listen
-
1
module Adapter
-
# Adapter implementation for Mac OS X `FSEvents`.
-
#
-
1
class Darwin < Base
-
1
OS_REGEXP = /darwin(?<major_version>1\d+)/i
-
-
# The default delay between checking for changes.
-
1
DEFAULTS = { latency: 0.1 }.freeze
-
-
1
INCOMPATIBLE_GEM_VERSION = <<-EOS.gsub(/^ {8}/, '')
-
rb-fsevent > 0.9.4 no longer supports OS X 10.6 through 10.8.
-
-
Please add the following to your Gemfile to avoid polling for changes:
-
require 'rbconfig'
-
if RbConfig::CONFIG['target_os'] =~ /darwin(1[0-3])/i
-
gem 'rb-fsevent', '<= 0.9.4'
-
end
-
EOS
-
-
1
def self.usable?
-
require 'rb-fsevent'
-
version = RbConfig::CONFIG['target_os'][OS_REGEXP, :major_version]
-
return false unless version
-
return true if version.to_i >= 13 # darwin13 is OS X 10.9
-
-
fsevent_version = Gem::Version.new(FSEvent::VERSION)
-
return true if fsevent_version <= Gem::Version.new('0.9.4')
-
Kernel.warn INCOMPATIBLE_GEM_VERSION
-
false
-
end
-
-
1
private
-
-
# NOTE: each directory gets a DIFFERENT callback!
-
1
def _configure(dir, &callback)
-
opts = { latency: options.latency }
-
-
@workers ||= ::Queue.new
-
@workers << FSEvent.new.tap do |worker|
-
_log :debug, "fsevent: watching: #{dir.to_s.inspect}"
-
worker.watch(dir.to_s, opts, &callback)
-
end
-
end
-
-
1
def _run
-
first = @workers.pop
-
-
# NOTE: _run is called within a thread, so run every other
-
# worker in it's own thread
-
_run_workers_in_background(_to_array(@workers))
-
_run_worker(first)
-
end
-
-
1
def _process_event(dir, event)
-
_log :debug, "fsevent: processing event: #{event.inspect}"
-
event.each do |path|
-
new_path = Pathname.new(path.sub(%r{\/$}, ''))
-
_log :debug, "fsevent: #{new_path}"
-
# TODO: does this preserve symlinks?
-
rel_path = new_path.relative_path_from(dir).to_s
-
_queue_change(:dir, dir, rel_path, recursive: true)
-
end
-
end
-
-
1
def _run_worker(worker)
-
_log :debug, "fsevent: running worker: #{worker.inspect}"
-
worker.run
-
rescue
-
format_string = 'fsevent: running worker failed: %s:%s called from: %s'
-
_log_exception format_string, caller
-
end
-
-
1
def _run_workers_in_background(workers)
-
workers.each do |worker|
-
# NOTE: while passing local variables to the block below is not
-
# thread safe, using 'worker' from the enumerator above is ok
-
Listen::Internals::ThreadPool.add { _run_worker(worker) }
-
end
-
end
-
-
1
def _to_array(queue)
-
workers = []
-
workers << queue.pop until queue.empty?
-
workers
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
module Adapter
-
# @see https://github.com/nex3/rb-inotify
-
1
class Linux < Base
-
1
OS_REGEXP = /linux/i
-
-
1
DEFAULTS = {
-
events: [
-
:recursive,
-
:attrib,
-
:create,
-
:delete,
-
:move,
-
:close_write
-
],
-
wait_for_delay: 0.1
-
}.freeze
-
-
1
private
-
-
1
WIKI_URL = 'https://github.com/guard/listen'\
-
'/wiki/Increasing-the-amount-of-inotify-watchers'.freeze
-
-
1
INOTIFY_LIMIT_MESSAGE = <<-EOS.gsub(/^\s*/, '')
-
FATAL: Listen error: unable to monitor directories for changes.
-
Visit #{WIKI_URL} for info on how to fix this.
-
EOS
-
-
1
def _configure(directory, &callback)
-
require 'rb-inotify'
-
@worker ||= ::INotify::Notifier.new
-
@worker.watch(directory.to_s, *options.events, &callback)
-
rescue Errno::ENOSPC
-
abort(INOTIFY_LIMIT_MESSAGE)
-
end
-
-
1
def _run
-
Thread.current[:listen_blocking_read_thread] = true
-
@worker.run
-
Thread.current[:listen_blocking_read_thread] = false
-
end
-
-
1
def _process_event(dir, event)
-
# NOTE: avoid using event.absolute_name since new API
-
# will need to have a custom recursion implemented
-
# to properly match events to configured directories
-
path = Pathname.new(event.watcher.path) + event.name
-
rel_path = path.relative_path_from(dir).to_s
-
-
_log(:debug) { "inotify: #{rel_path} (#{event.flags.inspect})" }
-
-
if /1|true/ =~ ENV['LISTEN_GEM_SIMULATE_FSEVENT']
-
if (event.flags & [:moved_to, :moved_from]) || _dir_event?(event)
-
rel_path = path.dirname.relative_path_from(dir).to_s
-
end
-
_queue_change(:dir, dir, rel_path, {})
-
return
-
end
-
-
return if _skip_event?(event)
-
-
cookie_params = event.cookie.zero? ? {} : { cookie: event.cookie }
-
-
# Note: don't pass options to force rescanning the directory, so we can
-
# detect moving/deleting a whole tree
-
if _dir_event?(event)
-
_queue_change(:dir, dir, rel_path, cookie_params)
-
return
-
end
-
-
params = cookie_params.merge(change: _change(event.flags))
-
-
_queue_change(:file, dir, rel_path, params)
-
end
-
-
1
def _skip_event?(event)
-
# Event on root directory
-
return true if event.name == ''
-
# INotify reports changes to files inside directories as events
-
# on the directories themselves too.
-
#
-
# @see http://linux.die.net/man/7/inotify
-
_dir_event?(event) && (event.flags & [:close, :modify]).any?
-
end
-
-
1
def _change(event_flags)
-
{ modified: [:attrib, :close_write],
-
moved_to: [:moved_to],
-
moved_from: [:moved_from],
-
added: [:create],
-
removed: [:delete] }.each do |change, flags|
-
return change unless (flags & event_flags).empty?
-
end
-
nil
-
end
-
-
1
def _dir_event?(event)
-
event.flags.include?(:isdir)
-
end
-
-
1
def _stop
-
@worker.close
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
module Adapter
-
# Polling Adapter that works cross-platform and
-
# has no dependencies. This is the adapter that
-
# uses the most CPU processing power and has higher
-
# file IO than the other implementations.
-
#
-
1
class Polling < Base
-
1
OS_REGEXP = // # match every OS
-
-
1
DEFAULTS = { latency: 1.0, wait_for_delay: 0.05 }.freeze
-
-
1
private
-
-
1
def _configure(_, &callback)
-
@polling_callbacks ||= []
-
@polling_callbacks << callback
-
end
-
-
1
def _run
-
loop do
-
start = Time.now.to_f
-
@polling_callbacks.each do |callback|
-
callback.call(nil)
-
nap_time = options.latency - (Time.now.to_f - start)
-
# TODO: warn if nap_time is negative (polling too slow)
-
sleep(nap_time) if nap_time > 0
-
end
-
end
-
end
-
-
1
def _process_event(dir, _)
-
_queue_change(:dir, dir, '.', recursive: true)
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
module Adapter
-
# Adapter implementation for Windows `wdm`.
-
#
-
1
class Windows < Base
-
1
OS_REGEXP = /mswin|mingw|cygwin/i
-
-
1
BUNDLER_DECLARE_GEM = <<-EOS.gsub(/^ {6}/, '')
-
Please add the following to your Gemfile to avoid polling for changes:
-
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
-
EOS
-
-
1
def self.usable?
-
return false unless super
-
require 'wdm'
-
true
-
rescue LoadError
-
_log :debug, format('wdm - load failed: %s:%s', $ERROR_INFO,
-
$ERROR_POSITION * "\n")
-
-
Kernel.warn BUNDLER_DECLARE_GEM
-
false
-
end
-
-
1
private
-
-
1
def _configure(dir)
-
require 'wdm'
-
_log :debug, 'wdm - starting...'
-
@worker ||= WDM::Monitor.new
-
@worker.watch_recursively(dir.to_s, :files) do |change|
-
yield([:file, change])
-
end
-
-
@worker.watch_recursively(dir.to_s, :directories) do |change|
-
yield([:dir, change])
-
end
-
-
events = [:attributes, :last_write]
-
@worker.watch_recursively(dir.to_s, *events) do |change|
-
yield([:attr, change])
-
end
-
end
-
-
1
def _run
-
@worker.run!
-
end
-
-
1
def _process_event(dir, event)
-
_log :debug, "wdm - callback: #{event.inspect}"
-
-
type, change = event
-
-
full_path = Pathname(change.path)
-
-
rel_path = full_path.relative_path_from(dir).to_s
-
-
options = { change: _change(change.type) }
-
-
case type
-
when :file
-
_queue_change(:file, dir, rel_path, options)
-
when :attr
-
unless full_path.directory?
-
_queue_change(:file, dir, rel_path, options)
-
end
-
when :dir
-
if change.type == :removed
-
# TODO: check if watched dir?
-
_queue_change(:dir, dir, Pathname(rel_path).dirname.to_s, {})
-
elsif change.type == :added
-
_queue_change(:dir, dir, rel_path, {})
-
# do nothing - changed directory means either:
-
# - removed subdirs (handled above)
-
# - added subdirs (handled above)
-
# - removed files (handled by _file_callback)
-
# - added files (handled by _file_callback)
-
# so what's left?
-
end
-
end
-
rescue
-
details = event.inspect
-
_log :error, format('wdm - callback (%s): %s:%s', details, $ERROR_INFO,
-
$ERROR_POSITION * "\n")
-
raise
-
end
-
-
1
def _change(type)
-
{ modified: [:modified, :attrib], # TODO: is attrib really passed?
-
added: [:added, :renamed_new_file],
-
removed: [:removed, :renamed_old_file] }.each do |change, types|
-
return change if types.include?(type)
-
end
-
nil
-
end
-
end
-
end
-
end
-
1
require 'listen/adapter'
-
1
require 'listen/adapter/base'
-
1
require 'listen/adapter/config'
-
-
1
require 'forwardable'
-
-
# This class just aggregates configuration object to avoid Listener specs
-
# from exploding with huge test setup blocks
-
1
module Listen
-
1
class Backend
-
1
extend Forwardable
-
-
1
def initialize(directories, queue, silencer, config)
-
adapter_select_opts = config.adapter_select_options
-
-
adapter_class = Adapter.select(adapter_select_opts)
-
-
# Use default from adapter if possible
-
@min_delay_between_events = config.min_delay_between_events
-
@min_delay_between_events ||= adapter_class::DEFAULTS[:wait_for_delay]
-
@min_delay_between_events ||= 0.1
-
-
adapter_opts = config.adapter_instance_options(adapter_class)
-
-
aconfig = Adapter::Config.new(directories, queue, silencer, adapter_opts)
-
@adapter = adapter_class.new(aconfig)
-
end
-
-
1
delegate start: :adapter
-
1
delegate stop: :adapter
-
-
1
attr_reader :min_delay_between_events
-
-
1
private
-
-
1
attr_reader :adapter
-
end
-
end
-
1
require 'listen/file'
-
1
require 'listen/directory'
-
-
1
module Listen
-
# TODO: rename to Snapshot
-
1
class Change
-
# TODO: test this class for coverage
-
1
class Config
-
1
def initialize(queue, silencer)
-
@queue = queue
-
@silencer = silencer
-
end
-
-
1
def silenced?(path, type)
-
@silencer.silenced?(Pathname(path), type)
-
end
-
-
1
def queue(*args)
-
@queue << args
-
end
-
end
-
-
1
attr_reader :record
-
-
1
def initialize(config, record)
-
@config = config
-
@record = record
-
end
-
-
# Invalidate some part of the snapshot/record (dir, file, subtree, etc.)
-
1
def invalidate(type, rel_path, options)
-
watched_dir = Pathname.new(record.root)
-
-
change = options[:change]
-
cookie = options[:cookie]
-
-
if !cookie && config.silenced?(rel_path, type)
-
Listen::Logger.debug { "(silenced): #{rel_path.inspect}" }
-
return
-
end
-
-
path = watched_dir + rel_path
-
-
Listen::Logger.debug do
-
log_details = options[:silence] && 'recording' || change || 'unknown'
-
"#{log_details}: #{type}:#{path} (#{options.inspect})"
-
end
-
-
if change
-
options = cookie ? { cookie: cookie } : {}
-
config.queue(type, change, watched_dir, rel_path, options)
-
elsif type == :dir
-
# NOTE: POSSIBLE RECURSION
-
# TODO: fix - use a queue instead
-
Directory.scan(self, rel_path, options)
-
else
-
change = File.change(record, rel_path)
-
return if !change || options[:silence]
-
config.queue(:file, change, watched_dir, rel_path)
-
end
-
rescue RuntimeError => ex
-
msg = format(
-
'%s#%s crashed %s:%s',
-
self.class,
-
__method__,
-
exinspect,
-
ex.backtrace * "\n")
-
Listen::Logger.error(msg)
-
raise
-
end
-
-
1
private
-
-
1
attr_reader :config
-
end
-
end
-
1
require 'set'
-
-
1
module Listen
-
# TODO: refactor (turn it into a normal object, cache the stat, etc)
-
1
class Directory
-
1
def self.scan(snapshot, rel_path, options)
-
record = snapshot.record
-
dir = Pathname.new(record.root)
-
previous = record.dir_entries(rel_path)
-
-
record.add_dir(rel_path)
-
-
# TODO: use children(with_directory: false)
-
path = dir + rel_path
-
current = Set.new(_children(path))
-
-
Listen::Logger.debug do
-
format('%s: %s(%s): %s -> %s',
-
(options[:silence] ? 'Recording' : 'Scanning'),
-
rel_path, options.inspect, previous.inspect, current.inspect)
-
end
-
-
begin
-
current.each do |full_path|
-
type = ::File.lstat(full_path.to_s).directory? ? :dir : :file
-
item_rel_path = full_path.relative_path_from(dir).to_s
-
_change(snapshot, type, item_rel_path, options)
-
end
-
rescue Errno::ENOENT
-
# The directory changed meanwhile, so rescan it
-
current = Set.new(_children(path))
-
retry
-
end
-
-
# TODO: this is not tested properly
-
previous = previous.reject { |entry, _| current.include? path + entry }
-
-
_async_changes(snapshot, Pathname.new(rel_path), previous, options)
-
-
rescue Errno::ENOENT, Errno::EHOSTDOWN
-
record.unset_path(rel_path)
-
_async_changes(snapshot, Pathname.new(rel_path), previous, options)
-
-
rescue Errno::ENOTDIR
-
# TODO: path not tested
-
record.unset_path(rel_path)
-
_async_changes(snapshot, path, previous, options)
-
_change(snapshot, :file, rel_path, options)
-
rescue
-
Listen::Logger.warn do
-
format('scan DIED: %s:%s', $ERROR_INFO, $ERROR_POSITION * "\n")
-
end
-
raise
-
end
-
-
1
def self._async_changes(snapshot, path, previous, options)
-
fail "Not a Pathname: #{path.inspect}" unless path.respond_to?(:children)
-
previous.each do |entry, data|
-
# TODO: this is a hack with insufficient testing
-
type = data.key?(:mtime) ? :file : :dir
-
rel_path_s = (path + entry).to_s
-
_change(snapshot, type, rel_path_s, options)
-
end
-
end
-
-
1
def self._change(snapshot, type, path, options)
-
return snapshot.invalidate(type, path, options) if type == :dir
-
-
# Minor param cleanup for tests
-
# TODO: use a dedicated Event class
-
opts = options.dup
-
opts.delete(:recursive)
-
snapshot.invalidate(type, path, opts)
-
end
-
-
1
def self._children(path)
-
return path.children unless RUBY_ENGINE == 'jruby'
-
-
# JRuby inconsistency workaround, see:
-
# https://github.com/jruby/jruby/issues/3840
-
exists = path.exist?
-
directory = path.directory?
-
return path.children unless exists && !directory
-
raise Errno::ENOTDIR, path.to_s
-
end
-
end
-
end
-
1
module Listen
-
1
module Event
-
1
class Config
-
1
def initialize(
-
listener,
-
event_queue,
-
queue_optimizer,
-
wait_for_delay,
-
&block)
-
-
@listener = listener
-
@event_queue = event_queue
-
@queue_optimizer = queue_optimizer
-
@min_delay_between_events = wait_for_delay
-
@block = block
-
end
-
-
1
def sleep(*args)
-
Kernel.sleep(*args)
-
end
-
-
1
def call(*args)
-
@block.call(*args) if @block
-
end
-
-
1
def timestamp
-
Time.now.to_f
-
end
-
-
1
attr_reader :event_queue
-
-
1
def callable?
-
@block
-
end
-
-
1
def optimize_changes(changes)
-
@queue_optimizer.smoosh_changes(changes)
-
end
-
-
1
attr_reader :min_delay_between_events
-
-
1
def stopped?
-
listener.state == :stopped
-
end
-
-
1
def paused?
-
listener.state == :paused
-
end
-
-
1
private
-
-
1
attr_reader :listener
-
end
-
end
-
end
-
1
require 'thread'
-
-
1
require 'timeout'
-
1
require 'listen/event/processor'
-
-
1
module Listen
-
1
module Event
-
1
class Loop
-
1
class Error < RuntimeError
-
1
class NotStarted < Error
-
end
-
end
-
-
1
def initialize(config)
-
@config = config
-
@wait_thread = nil
-
@state = :paused
-
@reasons = ::Queue.new
-
end
-
-
1
def wakeup_on_event
-
return if stopped?
-
return unless processing?
-
return unless wait_thread.alive?
-
_wakeup(:event)
-
end
-
-
1
def paused?
-
wait_thread && state == :paused
-
end
-
-
1
def processing?
-
return false if stopped?
-
return false if paused?
-
state == :processing
-
end
-
-
1
def setup
-
# TODO: use a Fiber instead?
-
q = ::Queue.new
-
@wait_thread = Internals::ThreadPool.add do
-
_wait_for_changes(q, config)
-
end
-
-
Listen::Logger.debug('Waiting for processing to start...')
-
Timeout.timeout(5) { q.pop }
-
end
-
-
1
def resume
-
fail Error::NotStarted if stopped?
-
return unless wait_thread
-
_wakeup(:resume)
-
end
-
-
1
def pause
-
# TODO: works?
-
# fail NotImplementedError
-
end
-
-
1
def teardown
-
return unless wait_thread
-
if wait_thread.alive?
-
_wakeup(:teardown)
-
wait_thread.join
-
end
-
@wait_thread = nil
-
end
-
-
1
def stopped?
-
!wait_thread
-
end
-
-
1
private
-
-
1
attr_reader :config
-
1
attr_reader :wait_thread
-
-
1
attr_accessor :state
-
-
1
def _wait_for_changes(ready_queue, config)
-
processor = Event::Processor.new(config, @reasons)
-
-
_wait_until_resumed(ready_queue)
-
processor.loop_for(config.min_delay_between_events)
-
rescue StandardError => ex
-
_nice_error(ex)
-
end
-
-
1
def _sleep(*args)
-
Kernel.sleep(*args)
-
end
-
-
1
def _wait_until_resumed(ready_queue)
-
self.state = :paused
-
ready_queue << :ready
-
sleep
-
self.state = :processing
-
end
-
-
1
def _nice_error(ex)
-
indent = "\n -- "
-
msg = format(
-
'exception while processing events: %s Backtrace:%s%s',
-
ex,
-
indent,
-
ex.backtrace * indent
-
)
-
Listen::Logger.error(msg)
-
end
-
-
1
def _wakeup(reason)
-
@reasons << reason
-
wait_thread.wakeup
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
module Event
-
1
class Processor
-
1
def initialize(config, reasons)
-
@config = config
-
@reasons = reasons
-
_reset_no_unprocessed_events
-
end
-
-
# TODO: implement this properly instead of checking the state at arbitrary
-
# points in time
-
1
def loop_for(latency)
-
@latency = latency
-
-
loop do
-
_wait_until_events
-
_wait_until_events_calm_down
-
_wait_until_no_longer_paused
-
_process_changes
-
end
-
rescue Stopped
-
Listen::Logger.debug('Processing stopped')
-
end
-
-
1
private
-
-
1
class Stopped < RuntimeError
-
end
-
-
1
def _wait_until_events_calm_down
-
loop do
-
now = _timestamp
-
-
# Assure there's at least latency between callbacks to allow
-
# for accumulating changes
-
diff = _deadline - now
-
break if diff <= 0
-
-
# give events a bit of time to accumulate so they can be
-
# compressed/optimized
-
_sleep(:waiting_until_latency, diff)
-
end
-
end
-
-
1
def _wait_until_no_longer_paused
-
# TODO: may not be a good idea?
-
_sleep(:waiting_for_unpause) while config.paused?
-
end
-
-
1
def _check_stopped
-
return unless config.stopped?
-
-
_flush_wakeup_reasons
-
raise Stopped
-
end
-
-
1
def _sleep(_local_reason, *args)
-
_check_stopped
-
sleep_duration = config.sleep(*args)
-
_check_stopped
-
-
_flush_wakeup_reasons do |reason|
-
next unless reason == :event
-
_remember_time_of_first_unprocessed_event unless config.paused?
-
end
-
-
sleep_duration
-
end
-
-
1
def _remember_time_of_first_unprocessed_event
-
@first_unprocessed_event_time ||= _timestamp
-
end
-
-
1
def _reset_no_unprocessed_events
-
@first_unprocessed_event_time = nil
-
end
-
-
1
def _deadline
-
@first_unprocessed_event_time + @latency
-
end
-
-
1
def _wait_until_events
-
# TODO: long sleep may not be a good idea?
-
_sleep(:waiting_for_events) while config.event_queue.empty?
-
@first_unprocessed_event_time ||= _timestamp
-
end
-
-
1
def _flush_wakeup_reasons
-
reasons = @reasons
-
until reasons.empty?
-
reason = reasons.pop
-
yield reason if block_given?
-
end
-
end
-
-
1
def _timestamp
-
config.timestamp
-
end
-
-
# for easier testing without sleep loop
-
1
def _process_changes
-
_reset_no_unprocessed_events
-
-
changes = []
-
changes << config.event_queue.pop until config.event_queue.empty?
-
-
callable = config.callable?
-
return unless callable
-
-
hash = config.optimize_changes(changes)
-
result = [hash[:modified], hash[:added], hash[:removed]]
-
return if result.all?(&:empty?)
-
-
block_start = _timestamp
-
config.call(*result)
-
Listen::Logger.debug "Callback took #{_timestamp - block_start} sec"
-
end
-
-
1
attr_reader :config
-
end
-
end
-
end
-
1
require 'thread'
-
-
1
require 'forwardable'
-
-
1
module Listen
-
1
module Event
-
1
class Queue
-
1
extend Forwardable
-
-
1
class Config
-
1
def initialize(relative)
-
@relative = relative
-
end
-
-
1
def relative?
-
@relative
-
end
-
end
-
-
1
def initialize(config, &block)
-
@event_queue = ::Queue.new
-
@block = block
-
@config = config
-
end
-
-
1
def <<(args)
-
type, change, dir, path, options = *args
-
fail "Invalid type: #{type.inspect}" unless [:dir, :file].include? type
-
fail "Invalid change: #{change.inspect}" unless change.is_a?(Symbol)
-
fail "Invalid path: #{path.inspect}" unless path.is_a?(String)
-
-
dir = _safe_relative_from_cwd(dir)
-
event_queue.public_send(:<<, [type, change, dir, path, options])
-
-
block.call(args) if block
-
end
-
-
1
delegate empty?: :event_queue
-
1
delegate pop: :event_queue
-
-
1
private
-
-
1
attr_reader :event_queue
-
1
attr_reader :block
-
1
attr_reader :config
-
-
1
def _safe_relative_from_cwd(dir)
-
return dir unless config.relative?
-
dir.relative_path_from(Pathname.pwd)
-
rescue ArgumentError
-
dir
-
end
-
end
-
end
-
end
-
1
require 'digest/md5'
-
-
1
module Listen
-
1
class File
-
1
def self.change(record, rel_path)
-
path = Pathname.new(record.root) + rel_path
-
lstat = path.lstat
-
-
data = { mtime: lstat.mtime.to_f, mode: lstat.mode }
-
-
record_data = record.file_data(rel_path)
-
-
if record_data.empty?
-
record.update_file(rel_path, data)
-
return :added
-
end
-
-
if data[:mode] != record_data[:mode]
-
record.update_file(rel_path, data)
-
return :modified
-
end
-
-
if data[:mtime] != record_data[:mtime]
-
record.update_file(rel_path, data)
-
return :modified
-
end
-
-
return if /1|true/ =~ ENV['LISTEN_GEM_DISABLE_HASHING']
-
return unless inaccurate_mac_time?(lstat)
-
-
# Check if change happened within 1 second (maybe it's even
-
# too much, e.g. 0.3-0.5 could be sufficient).
-
#
-
# With rb-fsevent, there's a (configurable) latency between
-
# when file was changed and when the event was triggered.
-
#
-
# If a file is saved at ???14.998, by the time the event is
-
# actually received by Listen, the time could already be e.g.
-
# ???15.7.
-
#
-
# And since Darwin adapter uses directory scanning, the file
-
# mtime may be the same (e.g. file was changed at ???14.001,
-
# then at ???14.998, but the fstat time would be ???14.0 in
-
# both cases).
-
#
-
# If change happend at ???14.999997, the mtime is 14.0, so for
-
# an mtime=???14.0 we assume it could even be almost ???15.0
-
#
-
# So if Time.now.to_f is ???15.999998 and stat reports mtime
-
# at ???14.0, then event was due to that file'd change when:
-
#
-
# ???15.999997 - ???14.999998 < 1.0s
-
#
-
# So the "2" is "1 + 1" (1s to cover rb-fsevent latency +
-
# 1s maximum difference between real mtime and that recorded
-
# in the file system)
-
#
-
return if data[:mtime].to_i + 2 <= Time.now.to_f
-
-
md5 = Digest::MD5.file(path).digest
-
record.update_file(rel_path, data.merge(md5: md5))
-
:modified if record_data[:md5] && md5 != record_data[:md5]
-
rescue SystemCallError
-
record.unset_path(rel_path)
-
:removed
-
rescue
-
Listen::Logger.debug "lstat failed for: #{rel_path} (#{$ERROR_INFO})"
-
raise
-
end
-
-
1
def self.inaccurate_mac_time?(stat)
-
# 'mac' means Modified/Accessed/Created
-
-
# Since precision depends on mounted FS (e.g. you can have a FAT partiion
-
# mounted on Linux), check for fields with a remainder to detect this
-
-
[stat.mtime, stat.ctime, stat.atime].map(&:usec).all?(&:zero?)
-
end
-
end
-
end
-
# Code copied from https://github.com/celluloid/celluloid-fsm
-
1
module Listen
-
1
module FSM
-
1
DEFAULT_STATE = :default # Default state name unless one is explicitly set
-
-
# Included hook to extend class methods
-
1
def self.included(klass)
-
1
klass.send :extend, ClassMethods
-
end
-
-
1
module ClassMethods
-
# Obtain or set the default state
-
# Passing a state name sets the default state
-
1
def default_state(new_default = nil)
-
1
if new_default
-
1
@default_state = new_default.to_sym
-
else
-
defined?(@default_state) ? @default_state : DEFAULT_STATE
-
end
-
end
-
-
# Obtain the valid states for this FSM
-
1
def states
-
6
@states ||= {}
-
end
-
-
# Declare an FSM state and optionally provide a callback block to fire
-
# Options:
-
# * to: a state or array of states this state can transition to
-
1
def state(*args, &block)
-
6
if args.last.is_a? Hash
-
# Stringify keys :/
-
12
options = args.pop.each_with_object({}) { |(k, v), h| h[k.to_s] = v }
-
else
-
options = {}
-
end
-
-
6
args.each do |name|
-
6
name = name.to_sym
-
6
default_state name if options['default']
-
6
states[name] = State.new(name, options['to'], &block)
-
end
-
end
-
end
-
-
# Be kind and call super if you must redefine initialize
-
1
def initialize
-
@state = self.class.default_state
-
end
-
-
# Obtain the current state of the FSM
-
1
attr_reader :state
-
-
1
def transition(state_name)
-
new_state = validate_and_sanitize_new_state(state_name)
-
return unless new_state
-
transition_with_callbacks!(new_state)
-
end
-
-
# Immediate state transition with no checks, or callbacks. "Dangerous!"
-
1
def transition!(state_name)
-
@state = state_name
-
end
-
-
1
protected
-
-
1
def validate_and_sanitize_new_state(state_name)
-
state_name = state_name.to_sym
-
-
return if current_state_name == state_name
-
-
if current_state && !current_state.valid_transition?(state_name)
-
valid = current_state.transitions.map(&:to_s).join(', ')
-
msg = "#{self.class} can't change state from '#{@state}'"\
-
" to '#{state_name}', only to: #{valid}"
-
fail ArgumentError, msg
-
end
-
-
new_state = states[state_name]
-
-
unless new_state
-
return if state_name == default_state
-
fail ArgumentError, "invalid state for #{self.class}: #{state_name}"
-
end
-
-
new_state
-
end
-
-
1
def transition_with_callbacks!(state_name)
-
transition! state_name.name
-
state_name.call(self)
-
end
-
-
1
def states
-
self.class.states
-
end
-
-
1
def default_state
-
self.class.default_state
-
end
-
-
1
def current_state
-
states[@state]
-
end
-
-
1
def current_state_name
-
current_state && current_state.name || ''
-
end
-
-
1
class State
-
1
attr_reader :name, :transitions
-
-
1
def initialize(name, transitions = nil, &block)
-
6
@name = name
-
6
@block = block
-
6
@transitions = nil
-
6
@transitions = Array(transitions).map(&:to_sym) if transitions
-
end
-
-
1
def call(obj)
-
obj.instance_eval(&@block) if @block
-
end
-
-
1
def valid_transition?(new_state)
-
# All transitions are allowed unless expressly
-
return true unless @transitions
-
-
@transitions.include? new_state.to_sym
-
end
-
end
-
end
-
end
-
1
module Listen
-
# @private api
-
1
module Internals
-
1
module ThreadPool
-
1
def self.add(&block)
-
Thread.new { block.call }.tap do |th|
-
(@threads ||= Queue.new) << th
-
end
-
end
-
-
1
def self.stop
-
return unless @threads ||= nil
-
return if @threads.empty? # return to avoid using possibly stubbed Queue
-
-
killed = Queue.new
-
# You can't kill a read on a descriptor in JRuby, so let's just
-
# ignore running threads (listen rb-inotify waiting for disk activity
-
# before closing) pray threads die faster than they are created...
-
limit = RUBY_ENGINE == 'jruby' ? [1] : []
-
-
killed << @threads.pop.kill until @threads.empty?
-
until killed.empty?
-
th = killed.pop
-
th.join(*limit) unless th[:listen_blocking_read_thread]
-
end
-
end
-
end
-
end
-
end
-
1
require 'English'
-
-
1
require 'listen/version'
-
-
1
require 'listen/backend'
-
-
1
require 'listen/silencer'
-
1
require 'listen/silencer/controller'
-
-
1
require 'listen/queue_optimizer'
-
-
1
require 'listen/fsm'
-
-
1
require 'listen/event/loop'
-
1
require 'listen/event/queue'
-
1
require 'listen/event/config'
-
-
1
require 'listen/listener/config'
-
-
1
module Listen
-
1
class Listener
-
# TODO: move the state machine's methods private
-
1
include Listen::FSM
-
-
# Initializes the directories listener.
-
#
-
# @param [String] directory the directories to listen to
-
# @param [Hash] options the listen options (see Listen::Listener::Options)
-
#
-
# @yield [modified, added, removed] the changed files
-
# @yieldparam [Array<String>] modified the list of modified files
-
# @yieldparam [Array<String>] added the list of added files
-
# @yieldparam [Array<String>] removed the list of removed files
-
#
-
1
def initialize(*dirs, &block)
-
options = dirs.last.is_a?(Hash) ? dirs.pop : {}
-
-
@config = Config.new(options)
-
-
eq_config = Event::Queue::Config.new(@config.relative?)
-
queue = Event::Queue.new(eq_config) { @processor.wakeup_on_event }
-
-
silencer = Silencer.new
-
rules = @config.silencer_rules
-
@silencer_controller = Silencer::Controller.new(silencer, rules)
-
-
@backend = Backend.new(dirs, queue, silencer, @config)
-
-
optimizer_config = QueueOptimizer::Config.new(@backend, silencer)
-
-
pconfig = Event::Config.new(
-
self,
-
queue,
-
QueueOptimizer.new(optimizer_config),
-
@backend.min_delay_between_events,
-
&block)
-
-
@processor = Event::Loop.new(pconfig)
-
-
super() # FSM
-
end
-
-
1
default_state :initializing
-
-
1
state :initializing, to: :backend_started
-
-
1
state :backend_started, to: [:frontend_ready, :stopped] do
-
backend.start
-
end
-
-
1
state :frontend_ready, to: [:processing_events, :stopped] do
-
processor.setup
-
end
-
-
1
state :processing_events, to: [:paused, :stopped] do
-
processor.resume
-
end
-
-
1
state :paused, to: [:processing_events, :stopped] do
-
processor.pause
-
end
-
-
1
state :stopped, to: [:backend_started] do
-
backend.stop # should be before processor.teardown to halt events ASAP
-
processor.teardown
-
end
-
-
# Starts processing events and starts adapters
-
# or resumes invoking callbacks if paused
-
1
def start
-
transition :backend_started if state == :initializing
-
transition :frontend_ready if state == :backend_started
-
transition :processing_events if state == :frontend_ready
-
transition :processing_events if state == :paused
-
end
-
-
# Stops both listening for events and processing them
-
1
def stop
-
transition :stopped
-
end
-
-
# Stops invoking callbacks (messages pile up)
-
1
def pause
-
transition :paused
-
end
-
-
# processing means callbacks are called
-
1
def processing?
-
state == :processing_events
-
end
-
-
1
def paused?
-
state == :paused
-
end
-
-
1
def ignore(regexps)
-
@silencer_controller.append_ignores(regexps)
-
end
-
-
1
def ignore!(regexps)
-
@silencer_controller.replace_with_bang_ignores(regexps)
-
end
-
-
1
def only(regexps)
-
@silencer_controller.replace_with_only(regexps)
-
end
-
-
1
private
-
-
1
attr_reader :processor
-
1
attr_reader :backend
-
end
-
end
-
1
module Listen
-
1
class Listener
-
1
class Config
-
1
DEFAULTS = {
-
# Listener options
-
debug: false, # TODO: is this broken?
-
wait_for_delay: nil, # NOTE: should be provided by adapter if possible
-
relative: false,
-
-
# Backend selecting options
-
force_polling: false,
-
polling_fallback_message: nil
-
}.freeze
-
-
1
def initialize(opts)
-
@options = DEFAULTS.merge(opts)
-
@relative = @options[:relative]
-
@min_delay_between_events = @options[:wait_for_delay]
-
@silencer_rules = @options # silencer will extract what it needs
-
end
-
-
1
def relative?
-
@relative
-
end
-
-
1
attr_reader :min_delay_between_events
-
-
1
attr_reader :silencer_rules
-
-
1
def adapter_instance_options(klass)
-
valid_keys = klass.const_get('DEFAULTS').keys
-
Hash[@options.select { |key, _| valid_keys.include?(key) }]
-
end
-
-
1
def adapter_select_options
-
valid_keys = %w(force_polling polling_fallback_message).map(&:to_sym)
-
Hash[@options.select { |key, _| valid_keys.include?(key) }]
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
def self.logger
-
6
@logger ||= nil
-
end
-
-
1
def self.logger=(logger)
-
1
@logger = logger
-
end
-
-
1
def self.setup_default_logger_if_unset
-
1
self.logger ||= ::Logger.new(STDERR).tap do |logger|
-
1
debugging = ENV['LISTEN_GEM_DEBUGGING']
-
1
logger.level =
-
case debugging.to_s
-
when /2/
-
::Logger::DEBUG
-
when /true|yes|1/i
-
::Logger::INFO
-
else
-
1
::Logger::ERROR
-
end
-
end
-
end
-
-
1
class Logger
-
1
[:fatal, :error, :warn, :info, :debug].each do |meth|
-
5
define_singleton_method(meth) do |*args, &block|
-
2
Listen.logger.public_send(meth, *args, &block) if Listen.logger
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
class Options
-
1
def initialize(opts, defaults)
-
@options = {}
-
given_options = opts.dup
-
defaults.keys.each do |key|
-
@options[key] = given_options.delete(key) || defaults[key]
-
end
-
-
return if given_options.empty?
-
-
msg = "Unknown options: #{given_options.inspect}"
-
Listen::Logger.warn msg
-
fail msg
-
end
-
-
1
def method_missing(name, *_)
-
return @options[name] if @options.key?(name)
-
msg = "Bad option: #{name.inspect} (valid:#{@options.keys.inspect})"
-
fail NameError, msg
-
end
-
end
-
end
-
1
module Listen
-
1
class QueueOptimizer
-
1
class Config
-
1
def initialize(adapter_class, silencer)
-
@adapter_class = adapter_class
-
@silencer = silencer
-
end
-
-
1
def exist?(path)
-
Pathname(path).exist?
-
end
-
-
1
def silenced?(path, type)
-
@silencer.silenced?(path, type)
-
end
-
-
1
def debug(*args, &block)
-
Listen.logger.debug(*args, &block)
-
end
-
end
-
-
1
def smoosh_changes(changes)
-
# TODO: adapter could be nil at this point (shutdown)
-
cookies = changes.group_by do |_, _, _, _, options|
-
(options || {})[:cookie]
-
end
-
_squash_changes(_reinterpret_related_changes(cookies))
-
end
-
-
1
def initialize(config)
-
@config = config
-
end
-
-
1
private
-
-
1
attr_reader :config
-
-
# groups changes into the expected structure expected by
-
# clients
-
1
def _squash_changes(changes)
-
# We combine here for backward compatibility
-
# Newer clients should receive dir and path separately
-
changes = changes.map { |change, dir, path| [change, dir + path] }
-
-
actions = changes.group_by(&:last).map do |path, action_list|
-
[_logical_action_for(path, action_list.map(&:first)), path.to_s]
-
end
-
-
config.debug("listen: raw changes: #{actions.inspect}")
-
-
{ modified: [], added: [], removed: [] }.tap do |squashed|
-
actions.each do |type, path|
-
squashed[type] << path unless type.nil?
-
end
-
config.debug("listen: final changes: #{squashed.inspect}")
-
end
-
end
-
-
1
def _logical_action_for(path, actions)
-
actions << :added if actions.delete(:moved_to)
-
actions << :removed if actions.delete(:moved_from)
-
-
modified = actions.detect { |x| x == :modified }
-
_calculate_add_remove_difference(actions, path, modified)
-
end
-
-
1
def _calculate_add_remove_difference(actions, path, default_if_exists)
-
added = actions.count { |x| x == :added }
-
removed = actions.count { |x| x == :removed }
-
diff = added - removed
-
-
# TODO: avoid checking if path exists and instead assume the events are
-
# in order (if last is :removed, it doesn't exist, etc.)
-
if config.exist?(path)
-
if diff > 0
-
:added
-
elsif diff.zero? && added > 0
-
:modified
-
else
-
default_if_exists
-
end
-
else
-
diff < 0 ? :removed : nil
-
end
-
end
-
-
# remove extraneous rb-inotify events, keeping them only if it's a possible
-
# editor rename() call (e.g. Kate and Sublime)
-
1
def _reinterpret_related_changes(cookies)
-
table = { moved_to: :added, moved_from: :removed }
-
cookies.flat_map do |_, changes|
-
data = _detect_possible_editor_save(changes)
-
if data
-
to_dir, to_file = data
-
[[:modified, to_dir, to_file]]
-
else
-
not_silenced = changes.reject do |type, _, _, path, _|
-
config.silenced?(Pathname(path), type)
-
end
-
not_silenced.map do |_, change, dir, path, _|
-
[table.fetch(change, change), dir, path]
-
end
-
end
-
end
-
end
-
-
1
def _detect_possible_editor_save(changes)
-
return unless changes.size == 2
-
-
from_type = from_change = from = nil
-
to_type = to_change = to_dir = to = nil
-
-
changes.each do |data|
-
case data[1]
-
when :moved_from
-
from_type, from_change, _, from, = data
-
when :moved_to
-
to_type, to_change, to_dir, to, = data
-
else
-
return nil
-
end
-
end
-
-
return unless from && to
-
-
# Expect an ignored moved_from and non-ignored moved_to
-
# to qualify as an "editor modify"
-
return unless config.silenced?(Pathname(from), from_type)
-
config.silenced?(Pathname(to), to_type) ? nil : [to_dir, to]
-
end
-
end
-
end
-
1
require 'thread'
-
1
require 'listen/record/entry'
-
1
require 'listen/record/symlink_detector'
-
-
1
module Listen
-
1
class Record
-
# TODO: one Record object per watched directory?
-
# TODO: deprecate
-
-
1
attr_reader :root
-
1
def initialize(directory)
-
@tree = _auto_hash
-
@root = directory.to_s
-
end
-
-
1
def add_dir(rel_path)
-
return if [nil, '', '.'].include? rel_path
-
@tree[rel_path] ||= {}
-
end
-
-
1
def update_file(rel_path, data)
-
dirname, basename = Pathname(rel_path).split.map(&:to_s)
-
_fast_update_file(dirname, basename, data)
-
end
-
-
1
def unset_path(rel_path)
-
dirname, basename = Pathname(rel_path).split.map(&:to_s)
-
_fast_unset_path(dirname, basename)
-
end
-
-
1
def file_data(rel_path)
-
dirname, basename = Pathname(rel_path).split.map(&:to_s)
-
if [nil, '', '.'].include? dirname
-
tree[basename] ||= {}
-
tree[basename].dup
-
else
-
tree[dirname] ||= {}
-
tree[dirname][basename] ||= {}
-
tree[dirname][basename].dup
-
end
-
end
-
-
1
def dir_entries(rel_path)
-
subtree =
-
if [nil, '', '.'].include? rel_path.to_s
-
tree
-
else
-
tree[rel_path.to_s] ||= _auto_hash
-
tree[rel_path.to_s]
-
end
-
-
result = {}
-
subtree.each do |key, values|
-
# only get data for file entries
-
result[key] = values.key?(:mtime) ? values : {}
-
end
-
result
-
end
-
-
1
def build
-
@tree = _auto_hash
-
# TODO: test with a file name given
-
# TODO: test other permissions
-
# TODO: test with mixed encoding
-
symlink_detector = SymlinkDetector.new
-
remaining = ::Queue.new
-
remaining << Entry.new(root, nil, nil)
-
_fast_build_dir(remaining, symlink_detector) until remaining.empty?
-
end
-
-
1
private
-
-
1
def _auto_hash
-
Hash.new { |h, k| h[k] = Hash.new }
-
end
-
-
1
attr_reader :tree
-
-
1
def _fast_update_file(dirname, basename, data)
-
if [nil, '', '.'].include? dirname
-
tree[basename] = (tree[basename] || {}).merge(data)
-
else
-
tree[dirname] ||= {}
-
tree[dirname][basename] = (tree[dirname][basename] || {}).merge(data)
-
end
-
end
-
-
1
def _fast_unset_path(dirname, basename)
-
# this may need to be reworked to properly remove
-
# entries from a tree, without adding non-existing dirs to the record
-
if [nil, '', '.'].include? dirname
-
return unless tree.key?(basename)
-
tree.delete(basename)
-
else
-
return unless tree.key?(dirname)
-
tree[dirname].delete(basename)
-
end
-
end
-
-
1
def _fast_build_dir(remaining, symlink_detector)
-
entry = remaining.pop
-
children = entry.children # NOTE: children() implicitly tests if dir
-
symlink_detector.verify_unwatched!(entry)
-
children.each { |child| remaining << child }
-
add_dir(entry.record_dir_key)
-
rescue Errno::ENOTDIR
-
_fast_try_file(entry)
-
rescue SystemCallError, SymlinkDetector::Error
-
_fast_unset_path(entry.relative, entry.name)
-
end
-
-
1
def _fast_try_file(entry)
-
_fast_update_file(entry.relative, entry.name, entry.meta)
-
rescue SystemCallError
-
_fast_unset_path(entry.relative, entry.name)
-
end
-
end
-
end
-
1
module Listen
-
# @private api
-
1
class Record
-
# Represents a directory entry (dir or file)
-
1
class Entry
-
# file: "/home/me/watched_dir", "app/models", "foo.rb"
-
# dir, "/home/me/watched_dir", "."
-
1
def initialize(root, relative, name = nil)
-
@root = root
-
@relative = relative
-
@name = name
-
end
-
-
1
attr_reader :root, :relative, :name
-
-
1
def children
-
child_relative = _join
-
(_entries(sys_path) - %w(. ..)).map do |name|
-
Entry.new(@root, child_relative, name)
-
end
-
end
-
-
1
def meta
-
lstat = ::File.lstat(sys_path)
-
{ mtime: lstat.mtime.to_f, mode: lstat.mode }
-
end
-
-
# record hash is e.g.
-
# if @record["/home/me/watched_dir"]["project/app/models"]["foo.rb"]
-
# if @record["/home/me/watched_dir"]["project/app"]["models"]
-
# record_dir_key is "project/app/models"
-
1
def record_dir_key
-
::File.join(*[@relative, @name].compact)
-
end
-
-
1
def sys_path
-
# Use full path in case someone uses chdir
-
::File.join(*[@root, @relative, @name].compact)
-
end
-
-
1
def real_path
-
@real_path ||= ::File.realpath(sys_path)
-
end
-
-
1
private
-
-
1
def _join
-
args = [@relative, @name].compact
-
args.empty? ? nil : ::File.join(*args)
-
end
-
-
1
def _entries(dir)
-
return Dir.entries(dir) unless RUBY_ENGINE == 'jruby'
-
-
# JRuby inconsistency workaround, see:
-
# https://github.com/jruby/jruby/issues/3840
-
exists = ::File.exist?(dir)
-
directory = ::File.directory?(dir)
-
return Dir.entries(dir) unless exists && !directory
-
raise Errno::ENOTDIR, dir
-
end
-
end
-
end
-
end
-
1
require 'set'
-
-
1
module Listen
-
# @private api
-
1
class Record
-
1
class SymlinkDetector
-
1
WIKI = 'https://github.com/guard/listen/wiki/Duplicate-directory-errors'.freeze
-
-
1
SYMLINK_LOOP_ERROR = <<-EOS.freeze
-
** ERROR: directory is already being watched! **
-
-
Directory: %s
-
-
is already being watched through: %s
-
-
MORE INFO: #{WIKI}
-
EOS
-
-
1
class Error < RuntimeError
-
end
-
-
1
def initialize
-
@real_dirs = Set.new
-
end
-
-
1
def verify_unwatched!(entry)
-
real_path = entry.real_path
-
@real_dirs.add?(real_path) || _fail(entry.sys_path, real_path)
-
end
-
-
1
private
-
-
1
def _fail(symlinked, real_path)
-
STDERR.puts format(SYMLINK_LOOP_ERROR, symlinked, real_path)
-
fail Error, 'Failed due to looped symlinks'
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
class Silencer
-
# The default list of directories that get ignored.
-
1
DEFAULT_IGNORED_DIRECTORIES = %r{^(?:
-
\.git
-
| \.svn
-
| \.hg
-
| \.rbx
-
| \.bundle
-
| bundle
-
| vendor/bundle
-
| log
-
| tmp
-
|vendor/ruby
-
)(/|$)}x
-
-
# The default list of files that get ignored.
-
1
DEFAULT_IGNORED_EXTENSIONS = %r{(?:
-
# Kate's tmp\/swp files
-
\..*\d+\.new
-
| \.kate-swp
-
-
# Gedit tmp files
-
| \.goutputstream-.{6}
-
-
# Intellij files
-
| ___jb_bak___
-
| ___jb_old___
-
-
# Vim swap files and write test
-
| \.sw[px]
-
| \.swpx
-
| ^4913
-
-
# Sed temporary files - but without actual words, like 'sedatives'
-
| (?:^
-
sed
-
-
(?:
-
[a-zA-Z0-9]{0}[A-Z]{1}[a-zA-Z0-9]{5} |
-
[a-zA-Z0-9]{1}[A-Z]{1}[a-zA-Z0-9]{4} |
-
[a-zA-Z0-9]{2}[A-Z]{1}[a-zA-Z0-9]{3} |
-
[a-zA-Z0-9]{3}[A-Z]{1}[a-zA-Z0-9]{2} |
-
[a-zA-Z0-9]{4}[A-Z]{1}[a-zA-Z0-9]{1} |
-
[a-zA-Z0-9]{5}[A-Z]{1}[a-zA-Z0-9]{0}
-
)
-
)
-
-
# other files
-
| \.DS_Store
-
| \.tmp
-
| ~
-
)$}x
-
-
1
attr_accessor :only_patterns, :ignore_patterns
-
-
1
def initialize
-
configure({})
-
end
-
-
1
def configure(options)
-
@only_patterns = options[:only] ? Array(options[:only]) : nil
-
@ignore_patterns = _init_ignores(options[:ignore], options[:ignore!])
-
end
-
-
# Note: relative_path is temporarily expected to be a relative Pathname to
-
# make refactoring easier (ideally, it would take a string)
-
-
# TODO: switch type and path places - and verify
-
1
def silenced?(relative_path, type)
-
path = relative_path.to_s
-
-
if only_patterns && type == :file
-
return true unless only_patterns.any? { |pattern| path =~ pattern }
-
end
-
-
ignore_patterns.any? { |pattern| path =~ pattern }
-
end
-
-
1
private
-
-
1
attr_reader :options
-
-
1
def _init_ignores(ignores, overrides)
-
patterns = []
-
unless overrides
-
patterns << DEFAULT_IGNORED_DIRECTORIES
-
patterns << DEFAULT_IGNORED_EXTENSIONS
-
end
-
-
patterns << ignores
-
patterns << overrides
-
-
patterns.compact.flatten
-
end
-
end
-
end
-
1
module Listen
-
1
class Silencer
-
1
class Controller
-
1
def initialize(silencer, default_options)
-
@silencer = silencer
-
-
opts = default_options
-
-
@prev_silencer_options = {}
-
rules = [:only, :ignore, :ignore!].map do |option|
-
[option, opts[option]] if opts.key? option
-
end
-
-
_reconfigure_silencer(Hash[rules.compact])
-
end
-
-
1
def append_ignores(*regexps)
-
prev_ignores = Array(@prev_silencer_options[:ignore])
-
_reconfigure_silencer(ignore: [prev_ignores + regexps])
-
end
-
-
1
def replace_with_bang_ignores(regexps)
-
_reconfigure_silencer(ignore!: regexps)
-
end
-
-
1
def replace_with_only(regexps)
-
_reconfigure_silencer(only: regexps)
-
end
-
-
1
private
-
-
1
def _reconfigure_silencer(extra_options)
-
opts = extra_options.dup
-
opts = opts.map do |key, value|
-
[key, Array(value).flatten.compact]
-
end
-
opts = Hash[opts]
-
-
if opts.key?(:ignore) && opts[:ignore].empty?
-
opts.delete(:ignore)
-
end
-
-
@prev_silencer_options = opts
-
@silencer.configure(@prev_silencer_options.dup.freeze)
-
end
-
end
-
end
-
end
-
1
module Listen
-
1
VERSION = '3.1.4'.freeze
-
end
-
1
require 'rbconfig'
-
1
require 'time'
-
1
require 'thread'
-
1
require 'securerandom'
-
-
1
module Lumberjack
-
1
LINE_SEPARATOR = (RbConfig::CONFIG['host_os'].match(/mswin/i) ? "\r\n" : "\n")
-
-
1
require File.expand_path("../lumberjack/severity.rb", __FILE__)
-
1
require File.expand_path("../lumberjack/log_entry.rb", __FILE__)
-
1
require File.expand_path("../lumberjack/formatter.rb", __FILE__)
-
1
require File.expand_path("../lumberjack/device.rb", __FILE__)
-
1
require File.expand_path("../lumberjack/logger.rb", __FILE__)
-
1
require File.expand_path("../lumberjack/template.rb", __FILE__)
-
1
require File.expand_path("../lumberjack/rack.rb", __FILE__)
-
-
1
class << self
-
# Define a unit of work within a block. Within the block supplied to this
-
# method, calling +unit_of_work_id+ will return the same value that can
-
# This can then be used for tying together log entries.
-
#
-
# You can specify the id for the unit of work if desired. If you don't supply
-
# it, a 12 digit hexidecimal number will be automatically generated for you.
-
#
-
# For the common use case of treating a single web request as a unit of work, see the
-
# Lumberjack::Rack::UnitOfWork class.
-
1
def unit_of_work(id = nil)
-
save_val = Thread.current[:lumberjack_logger_unit_of_work_id]
-
id ||= SecureRandom.hex(6)
-
Thread.current[:lumberjack_logger_unit_of_work_id] = id
-
begin
-
return yield
-
ensure
-
Thread.current[:lumberjack_logger_unit_of_work_id] = save_val
-
end
-
end
-
-
# Get the UniqueIdentifier for the current unit of work.
-
1
def unit_of_work_id
-
Thread.current[:lumberjack_logger_unit_of_work_id]
-
end
-
end
-
end
-
1
module Lumberjack
-
# This is an abstract class for logging devices. Subclasses must implement the +write+ method and
-
# may implement the +close+ and +flush+ methods if applicable.
-
1
class Device
-
1
require File.expand_path("../device/writer.rb", __FILE__)
-
1
require File.expand_path("../device/log_file.rb", __FILE__)
-
1
require File.expand_path("../device/rolling_log_file.rb", __FILE__)
-
1
require File.expand_path("../device/date_rolling_log_file.rb", __FILE__)
-
1
require File.expand_path("../device/size_rolling_log_file.rb", __FILE__)
-
1
require File.expand_path("../device/null.rb", __FILE__)
-
-
# Subclasses must implement this method to write a LogEntry.
-
1
def write(entry)
-
raise NotImplementedError
-
end
-
-
# Subclasses may implement this method to close the device.
-
1
def close
-
flush
-
end
-
-
# Subclasses may implement this method to flush any buffers used by the device.
-
1
def flush
-
end
-
end
-
end
-
1
require 'date'
-
-
1
module Lumberjack
-
1
class Device
-
# This log device will append entries to a file and roll the file periodically by date. Files
-
# are rolled at midnight and can be rolled daily, weekly, or monthly. Archive file names will
-
# have the date appended to them in the format ".YYYY-MM-DD" for daily, ".week-of-YYYY-MM-DD" for weekly
-
# and ".YYYY-MM" for monthly. It is not guaranteed that log messages will break exactly on the
-
# roll period as buffered entries will always be written to the same file.
-
1
class DateRollingLogFile < RollingLogFile
-
# Create a new logging device to the specified file. The period to roll the file is specified
-
# with the <tt>:roll</tt> option which may contain a value of <tt>:daily</tt>, <tt>:weekly</tt>,
-
# or <tt>:monthly</tt>.
-
1
def initialize(path, options = {})
-
@manual = options[:manual]
-
@file_date = Date.today
-
if options[:roll] && options[:roll].to_s.match(/(daily)|(weekly)|(monthly)/i)
-
@roll_period = $~[0].downcase.to_sym
-
options.delete(:roll)
-
else
-
raise ArgumentError.new("illegal value for :roll (#{options[:roll].inspect})")
-
end
-
super
-
end
-
-
1
def archive_file_suffix
-
case @roll_period
-
when :weekly
-
"#{@file_date.strftime('week-of-%Y-%m-%d')}"
-
when :monthly
-
"#{@file_date.strftime('%Y-%m')}"
-
else
-
"#{@file_date.strftime('%Y-%m-%d')}"
-
end
-
end
-
-
1
def roll_file?
-
if @manual
-
true
-
else
-
date = Date.today
-
if date.year > @file_date.year
-
true
-
elsif @roll_period == :daily && date.yday > @file_date.yday
-
true
-
elsif @roll_period == :weekly && date.cweek != @file_date.cweek
-
true
-
elsif @roll_period == :monthly && date.month > @file_date.month
-
true
-
else
-
false
-
end
-
end
-
end
-
-
1
protected
-
-
1
def after_roll
-
@file_date = Date.today
-
end
-
end
-
end
-
end
-
1
require 'fileutils'
-
-
1
module Lumberjack
-
1
class Device
-
# This is a logging device that appends log entries to a file.
-
1
class LogFile < Writer
-
1
EXTERNAL_ENCODING = "ascii-8bit"
-
-
# The absolute path of the file being logged to.
-
1
attr_reader :path
-
-
# Create a logger to the file at +path+. Options are passed through to the Writer constructor.
-
1
def initialize(path, options = {})
-
@path = File.expand_path(path)
-
FileUtils.mkdir_p(File.dirname(@path))
-
super(File.new(@path, 'a', :encoding => EXTERNAL_ENCODING), options)
-
end
-
end
-
end
-
end
-
1
require 'date'
-
-
1
module Lumberjack
-
1
class Device
-
# This is a logging device that produces no output. It can be useful in
-
# testing environments when log file output is not useful.
-
1
class Null < Device
-
1
def initialize(*args)
-
end
-
-
1
def write(entry)
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
1
class Device
-
# This is an abstract class for a device that appends entries to a file and periodically archives
-
# the existing file and starts a one. Subclasses must implement the roll_file? and archive_file_suffix
-
# methods.
-
#
-
# The <tt>:keep</tt> option can be used to specify a maximum number of rolled log files to keep.
-
# Older files will be deleted based on the time they were created. The default is to keep all files.
-
1
class RollingLogFile < LogFile
-
1
attr_reader :path
-
1
attr_accessor :keep
-
-
1
def initialize(path, options = {})
-
@path = File.expand_path(path)
-
@keep = options[:keep]
-
super(path, options)
-
@file_inode = stream.lstat.ino rescue nil
-
@@rolls = []
-
end
-
-
# Returns a suffix that will be appended to the file name when it is archived.. The suffix should
-
# change after it is time to roll the file. The log file will be renamed when it is rolled.
-
1
def archive_file_suffix
-
raise NotImplementedError
-
end
-
-
# Return +true+ if the file should be rolled.
-
1
def roll_file?
-
raise NotImplementedError
-
end
-
-
# Roll the log file by renaming it to the archive file name and then re-opening a stream to the log
-
# file path. Rolling a file is safe in multi-threaded or multi-process environments.
-
1
def roll_file! #:nodoc:
-
do_once(stream) do
-
archive_file = "#{path}.#{archive_file_suffix}"
-
stream.flush
-
current_inode = File.stat(path).ino rescue nil
-
if @file_inode && current_inode == @file_inode && !File.exist?(archive_file) && File.exist?(path)
-
begin
-
File.rename(path, archive_file)
-
after_roll
-
cleanup_files!
-
rescue SystemCallError
-
# Ignore rename errors since it indicates the file was already rolled
-
end
-
end
-
reopen_file
-
end
-
rescue => e
-
STDERR.write("Failed to roll file #{path}: #{e.inspect}\n#{e.backtrace.join("\n")}\n")
-
end
-
-
1
protected
-
-
# This method will be called after a file has been rolled. Subclasses can
-
# implement code to reset the state of the device. This method is thread safe.
-
1
def after_roll
-
end
-
-
# Handle rolling the file before flushing.
-
1
def before_flush # :nodoc:
-
path_inode = File.lstat(path).ino rescue nil
-
if path_inode != @file_inode
-
@file_inode = path_inode
-
reopen_file
-
else
-
roll_file! if roll_file?
-
end
-
end
-
-
1
private
-
-
1
def reopen_file
-
old_stream = stream
-
self.stream = File.open(path, 'a', encoding: EXTERNAL_ENCODING)
-
stream.sync = true
-
@file_inode = stream.lstat.ino rescue nil
-
old_stream.close
-
end
-
end
-
-
1
def cleanup_files!
-
if keep
-
files = Dir.glob("#{path}.*").collect{|f| [f, File.ctime(f)]}.sort{|a,b| b.last <=> a.last}.collect{|a| a.first}
-
if files.size > keep
-
files[keep, files.length].each do |f|
-
File.delete(f)
-
end
-
end
-
end
-
end
-
-
1
def do_once(file)
-
begin
-
file.flock(File::LOCK_EX)
-
rescue SystemCallError
-
# Most likely can't lock file because the stream is closed
-
return
-
end
-
begin
-
verify = file.lstat rescue nil
-
# Execute only if the file we locked is still the same one that needed to be rolled
-
yield if verify && verify.ino == @file_inode && verify.size > 0
-
ensure
-
file.flock(File::LOCK_UN) rescue nil
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
1
class Device
-
# This is a log device that appends entries to a file and rolls the file when it reaches a specified
-
# size threshold. When a file is rolled, it will have an number extension appended to the file name.
-
# For example, if the log file is named production.log, the first time it is rolled it will be renamed
-
# production.log.1, then production.log.2, etc.
-
1
class SizeRollingLogFile < RollingLogFile
-
1
attr_reader :max_size
-
-
# Create an new log device to the specified file. The maximum size of the log file is specified with
-
# the <tt>:max_size</tt> option. The unit can also be specified: "32K", "100M", "2G" are all valid.
-
1
def initialize(path, options = {})
-
@manual = options[:manual]
-
@max_size = options[:max_size]
-
if @max_size.is_a?(String)
-
if @max_size.match(/^(\d+(\.\d+)?)([KMG])?$/i)
-
@max_size = $~[1].to_f
-
units = $~[3].to_s.upcase
-
case units
-
when "K"
-
@max_size *= 1024
-
when "M"
-
@max_size *= 1024 ** 2
-
when "G"
-
@max_size *= 1024 ** 3
-
end
-
@max_size = @max_size.round
-
else
-
raise ArgumentError.new("illegal value for :max_size (#{@max_size})")
-
end
-
end
-
-
super
-
end
-
-
1
def archive_file_suffix
-
next_archive_number.to_s
-
end
-
-
1
def roll_file?
-
@manual || stream.stat.size > @max_size
-
rescue SystemCallError
-
false
-
end
-
-
1
protected
-
-
# Calculate the next archive file name extension.
-
1
def next_archive_number # :nodoc:
-
max = 0
-
Dir.glob("#{path}.*").each do |filename|
-
if filename.match(/\.\d+$/)
-
suffix = filename.split('.').last.to_i
-
max = suffix if suffix > max
-
end
-
end
-
max + 1
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
1
class Device
-
# This logging device writes log entries as strings to an IO stream. By default, messages will be buffered
-
# and written to the stream in a batch when the buffer is full or when +flush+ is called.
-
1
class Writer < Device
-
1
DEFAULT_FIRST_LINE_TEMPLATE = "[:time :severity :progname(:pid) #:unit_of_work_id] :message".freeze
-
1
DEFAULT_ADDITIONAL_LINES_TEMPLATE = "#{Lumberjack::LINE_SEPARATOR}> [#:unit_of_work_id] :message".freeze
-
-
# The size of the internal buffer. Defaults to 32K.
-
1
attr_reader :buffer_size
-
-
# Internal buffer to batch writes to the stream.
-
1
class Buffer # :nodoc:
-
1
attr_reader :size
-
-
1
def initialize
-
1
@values = []
-
1
@size = 0
-
end
-
-
1
def <<(string)
-
@values << string.encode("UTF-8".freeze, invalid: :replace, undef: :replace)
-
@size += string.size
-
end
-
-
1
def empty?
-
@values.empty?
-
end
-
-
1
def join(delimiter)
-
@values.join(delimiter)
-
end
-
-
1
def clear
-
@values = []
-
@size = 0
-
end
-
end
-
-
# Create a new device to write log entries to a stream. Entries are converted to strings
-
# using a Template. The template can be specified using the <tt>:template</tt> option. This can
-
# either be a Proc or a string that will compile into a Template object.
-
#
-
# If the template is a Proc, it should accept an LogEntry as its only argument and output a string.
-
#
-
# If the template is a template string, it will be used to create a Template. The
-
# <tt>:additional_lines</tt> and <tt>:time_format</tt> options will be passed through to the
-
# Template constuctor.
-
#
-
# The default template is <tt>"[:time :severity :progname(:pid) #:unit_of_work_id] :message"</tt>
-
# with additional lines formatted as <tt>"\n [#:unit_of_work_id] :message"</tt>. The unit of
-
# work id will only appear if it is present.
-
#
-
# The size of the internal buffer in bytes can be set by providing <tt>:buffer_size</tt> (defaults to 32K).
-
1
def initialize(stream, options = {})
-
1
@lock = Mutex.new
-
1
@stream = stream
-
1
@stream.sync = true if @stream.respond_to?(:sync=)
-
1
@buffer = Buffer.new
-
1
@buffer_size = (options[:buffer_size] || 0)
-
1
template = (options[:template] || DEFAULT_FIRST_LINE_TEMPLATE)
-
1
if template.respond_to?(:call)
-
@template = template
-
else
-
1
additional_lines = (options[:additional_lines] || DEFAULT_ADDITIONAL_LINES_TEMPLATE)
-
1
@template = Template.new(template, :additional_lines => additional_lines, :time_format => options[:time_format])
-
end
-
end
-
-
# Set the buffer size in bytes. The device will only be physically written to when the buffer size
-
# is exceeded.
-
1
def buffer_size=(value)
-
@buffer_size = value
-
flush
-
end
-
-
# Write an entry to the stream. The entry will be converted into a string using the defined template.
-
1
def write(entry)
-
string = @template.call(entry)
-
@lock.synchronize do
-
@buffer << string
-
end
-
flush if @buffer.size >= buffer_size
-
end
-
-
# Close the underlying stream.
-
1
def close
-
flush
-
stream.close
-
end
-
-
# Flush the underlying stream.
-
1
def flush
-
@lock.synchronize do
-
before_flush
-
unless @buffer.empty?
-
out = @buffer.join(Lumberjack::LINE_SEPARATOR) << Lumberjack::LINE_SEPARATOR
-
begin
-
stream.write(out)
-
stream.flush
-
rescue => e
-
$stderr.write("#{e.class.name}: #{e.message}#{' at ' + e.backtrace.first if e.backtrace}")
-
$stderr.write(out)
-
$stderr.flush
-
end
-
@buffer.clear
-
end
-
end
-
end
-
-
1
protected
-
-
# Callback method that will be executed before data is written to the stream. Subclasses
-
# can override this method if needed.
-
1
def before_flush
-
end
-
-
# Set the underlying stream.
-
1
def stream=(stream)
-
@stream = stream
-
end
-
-
# Get the underlying stream.
-
1
def stream
-
@stream
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
# This class controls the conversion of log entry messages into strings. This allows you
-
# to log any object you want and have the logging system worry about converting it into a string.
-
#
-
# Formats are added to a Formatter by associating them with a class using the +add+ method. Formats
-
# are any object that responds to the +call+ method.
-
#
-
# By default, all object will be converted to strings using their inspect method except for Strings
-
# and Exceptions. Strings are not converted and Exceptions are converted using the ExceptionFormatter.
-
1
class Formatter
-
1
require File.expand_path("../formatter/exception_formatter.rb", __FILE__)
-
1
require File.expand_path("../formatter/inspect_formatter.rb", __FILE__)
-
1
require File.expand_path("../formatter/pretty_print_formatter.rb", __FILE__)
-
1
require File.expand_path("../formatter/string_formatter.rb", __FILE__)
-
-
1
def initialize
-
1
@class_formatters = {}
-
1
@_default_formatter = InspectFormatter.new
-
1
add(Object, @_default_formatter)
-
1
add(String, :string)
-
1
add(Exception, :exception)
-
end
-
-
# Add a formatter for a class. The formatter can be specified as either an object
-
# that responds to the +call+ method or as a symbol representing one of the predefined
-
# formatters, or as a block to the method call.
-
#
-
# The predefined formatters are: <tt>:inspect</tt>, <tt>:string</tt>, <tt>:exception</tt>, and <tt>:pretty_print</tt>.
-
#
-
# === Examples
-
#
-
# # Use a predefined formatter
-
# formatter.add(MyClass, :pretty_print)
-
#
-
# # Pass in a formatter object
-
# formatter.add(MyClass, Lumberjack::Formatter::PrettyPrintFormatter.new)
-
#
-
# # Use a block
-
# formatter.add(MyClass){|obj| obj.humanize}
-
#
-
# # Add statements can be chained together
-
# formatter.add(MyClass, :pretty_print).add(YourClass){|obj| obj.humanize}
-
1
def add(klass, formatter = nil, &block)
-
3
formatter ||= block
-
3
if formatter.is_a?(Symbol)
-
4
formatter_class_name = "#{formatter.to_s.gsub(/(^|_)([a-z])/){|m| $~[2].upcase}}Formatter"
-
2
formatter = Formatter.const_get(formatter_class_name).new
-
end
-
3
@class_formatters[klass] = formatter
-
3
self
-
end
-
-
# Remove the formatter associated with a class. Remove statements can be chained together.
-
1
def remove(klass)
-
@class_formatters.delete(klass)
-
self
-
end
-
-
# Format a message object as a string.
-
1
def format(message)
-
formatter_for(message.class).call(message)
-
end
-
-
# Hack for compatibility with Logger::Formatter
-
1
def call(severity, timestamp, progname, msg)
-
"#{format(msg)}\n"
-
end
-
-
1
private
-
-
# Find the formatter for a class by looking it up using the class hierarchy.
-
1
def formatter_for(klass) #:nodoc:
-
while klass != nil do
-
formatter = @class_formatters[klass]
-
return formatter if formatter
-
klass = klass.superclass
-
end
-
@_default_formatter
-
end
-
end
-
end
-
1
module Lumberjack
-
1
class Formatter
-
# Format an exception including the backtrace.
-
1
class ExceptionFormatter
-
1
def call(exception)
-
message = "#{exception.class.name}: #{exception.message}"
-
message << "#{Lumberjack::LINE_SEPARATOR} #{exception.backtrace.join("#{Lumberjack::LINE_SEPARATOR} ")}" if exception.backtrace
-
message
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
1
class Formatter
-
# Format an object by calling +inspect+ on it.
-
1
class InspectFormatter
-
1
def call(obj)
-
obj.inspect
-
end
-
end
-
end
-
end
-
1
require 'pp'
-
1
require 'stringio'
-
-
1
module Lumberjack
-
1
class Formatter
-
# Format an object with it's pretty print method.
-
1
class PrettyPrintFormatter
-
1
attr_accessor :width
-
-
# Create a new formatter. The maximum width of the message can be specified with the width
-
# parameter (defaults to 79 characters).
-
1
def initialize(width = 79)
-
@width = width
-
end
-
-
1
def call(obj)
-
s = StringIO.new
-
PP.pp(obj, s)
-
s.string.chomp
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
1
class Formatter
-
# Format an object by calling +to_s+ on it.
-
1
class StringFormatter
-
1
def call(obj)
-
obj.to_s
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
# An entry in a log is a data structure that captures the log message as well as
-
# information about the system that logged the message.
-
1
class LogEntry
-
1
attr_accessor :time, :message, :severity, :progname, :pid, :unit_of_work_id
-
-
1
TIME_FORMAT = "%Y-%m-%dT%H:%M:%S".freeze
-
-
1
def initialize(time, severity, message, progname, pid, unit_of_work_id)
-
@time = time
-
@severity = (severity.is_a?(Fixnum) ? severity : Severity.label_to_level(severity))
-
@message = message
-
@progname = progname
-
@pid = pid
-
@unit_of_work_id = unit_of_work_id
-
end
-
-
1
def severity_label
-
Severity.level_to_label(severity)
-
end
-
-
1
def to_s
-
buf = "[#{time.strftime(TIME_FORMAT)}.#{(time.usec / 1000.0).round.to_s.rjust(3, '0')} #{severity_label} #{progname}(#{pid})"
-
if unit_of_work_id
-
buf << " #"
-
buf << unit_of_work_id
-
end
-
buf << "] "
-
buf << message
-
end
-
-
1
def inspect
-
to_s
-
end
-
end
-
end
-
1
module Lumberjack
-
# Logger is a thread safe logging object. It has a compatible API with the Ruby
-
# standard library Logger class, the Log4r gem, and ActiveSupport::BufferedLogger.
-
#
-
# === Example
-
#
-
# logger = Lumberjack::Logger.new
-
# logger.info("Starting processing")
-
# logger.debug("Processing options #{options.inspect}")
-
# logger.fatal("OMG the application is on fire!")
-
#
-
# Log entries are written to a logging Device if their severity meets or exceeds the log level.
-
#
-
# Devices may use buffers internally and the log entries are not guaranteed to be written until you call
-
# the +flush+ method. Sometimes this can result in problems when trying to track down extraordinarily
-
# long running sections of code since it is likely that none of the messages logged before the long
-
# running code will appear in the log until the entire process finishes. You can set the +:flush_seconds+
-
# option on the constructor to force the device to be flushed periodically. This will create a new
-
# monitoring thread, but its use is highly recommended.
-
#
-
# Each log entry records the log message and severity along with the time it was logged, the
-
# program name, process id, and unit of work id. The message will be converted to a string, but
-
# otherwise, it is up to the device how these values are recorded. Messages are converted to strings
-
# using a Formatter associated with the logger.
-
1
class Logger
-
1
include Severity
-
-
# The time that the device was last flushed.
-
1
attr_reader :last_flushed_at
-
-
# The name of the program associated with log messages.
-
1
attr_writer :progname
-
-
# The device being written to.
-
1
attr_reader :device
-
-
# Set +silencer+ to false to disable silencing the log.
-
1
attr_accessor :silencer
-
-
# Create a new logger to log to a Device.
-
#
-
# The +device+ argument can be in any one of several formats.
-
#
-
# If it is a Device object, that object will be used.
-
# If it has a +write+ method, it will be wrapped in a Device::Writer class.
-
# If it is <tt>:null</tt>, it will be a Null device that won't record any output.
-
# Otherwise, it will be assumed to be file path and wrapped in a Device::LogFile class.
-
#
-
# This method can take the following options:
-
#
-
# * <tt>:level</tt> - The logging level below which messages will be ignored.
-
# * <tt>:progname</tt> - The name of the program that will be recorded with each log entry.
-
# * <tt>:flush_seconds</tt> - The maximum number of seconds between flush calls.
-
# * <tt>:roll</tt> - If the log device is a file path, it will be a Device::DateRollingLogFile if this is set.
-
# * <tt>:max_size</tt> - If the log device is a file path, it will be a Device::SizeRollingLogFile if this is set.
-
#
-
# All other options are passed to the device constuctor.
-
1
def initialize(device = STDOUT, options = {})
-
1
@thread_settings = {}
-
-
1
options = options.dup
-
1
self.level = options.delete(:level) || INFO
-
1
self.progname = options.delete(:progname)
-
1
max_flush_seconds = options.delete(:flush_seconds).to_f
-
-
1
@device = open_device(device, options)
-
1
@_formatter = Formatter.new
-
1
@lock = Mutex.new
-
1
@last_flushed_at = Time.now
-
1
@silencer = true
-
-
1
create_flusher_thread(max_flush_seconds) if max_flush_seconds > 0
-
end
-
-
# Get the Formatter object used to convert messages into strings.
-
1
def formatter
-
@_formatter
-
end
-
-
# Get the level of severity of entries that are logged. Entries with a lower
-
# severity level will be ignored.
-
1
def level
-
10
thread_local_value(:lumberjack_logger_level) || @level
-
end
-
-
# Add a message to the log with a given severity. The message can be either
-
# passed in the +message+ argument or supplied with a block. This method
-
# is not normally called. Instead call one of the helper functions
-
# +fatal+, +error+, +warn+, +info+, or +debug+.
-
#
-
# The severity can be passed in either as one of the Severity constants,
-
# or as a Severity label.
-
#
-
# === Example
-
#
-
# logger.add(Lumberjack::Severity::ERROR, exception)
-
# logger.add(Lumberjack::Severity::INFO, "Request completed")
-
# logger.add(:warn, "Request took a long time")
-
# logger.add(Lumberjack::Severity::DEBUG){"Start processing with options #{options.inspect}"}
-
1
def add(severity, message = nil, progname = nil)
-
10
severity = Severity.label_to_level(severity) if severity.is_a?(String) || severity.is_a?(Symbol)
-
-
10
return unless severity && severity >= level
-
-
time = Time.now
-
if message.nil?
-
if block_given?
-
message = yield
-
else
-
message = progname
-
progname = nil
-
end
-
end
-
-
message = @_formatter.format(message)
-
progname ||= self.progname
-
entry = LogEntry.new(time, severity, message, progname, $$, Lumberjack.unit_of_work_id)
-
begin
-
device.write(entry)
-
rescue => e
-
$stderr.puts("#{e.class.name}: #{e.message}#{' at ' + e.backtrace.first if e.backtrace}")
-
$stderr.puts(entry.to_s)
-
end
-
-
nil
-
end
-
-
1
alias_method :log, :add
-
-
# Flush the logging device. Messages are not guaranteed to be written until this method is called.
-
1
def flush
-
device.flush
-
@last_flushed_at = Time.now
-
nil
-
end
-
-
# Close the logging device.
-
1
def close
-
flush
-
@device.close if @device.respond_to?(:close)
-
end
-
-
# Log a +FATAL+ message. The message can be passed in either the +message+ argument or in a block.
-
1
def fatal(message = nil, progname = nil, &block)
-
add(FATAL, message, progname, &block)
-
end
-
-
# Return +true+ if +FATAL+ messages are being logged.
-
1
def fatal?
-
level <= FATAL
-
end
-
-
# Log an +ERROR+ message. The message can be passed in either the +message+ argument or in a block.
-
1
def error(message = nil, progname = nil, &block)
-
add(ERROR, message, progname, &block)
-
end
-
-
# Return +true+ if +ERROR+ messages are being logged.
-
1
def error?
-
level <= ERROR
-
end
-
-
# Log a +WARN+ message. The message can be passed in either the +message+ argument or in a block.
-
1
def warn(message = nil, progname = nil, &block)
-
add(WARN, message, progname, &block)
-
end
-
-
# Return +true+ if +WARN+ messages are being logged.
-
1
def warn?
-
level <= WARN
-
end
-
-
# Log an +INFO+ message. The message can be passed in either the +message+ argument or in a block.
-
1
def info(message = nil, progname = nil, &block)
-
add(INFO, message, progname, &block)
-
end
-
-
# Return +true+ if +INFO+ messages are being logged.
-
1
def info?
-
level <= INFO
-
end
-
-
# Log a +DEBUG+ message. The message can be passed in either the +message+ argument or in a block.
-
1
def debug(message = nil, progname = nil, &block)
-
10
add(DEBUG, message, progname, &block)
-
end
-
-
# Return +true+ if +DEBUG+ messages are being logged.
-
1
def debug?
-
level <= DEBUG
-
end
-
-
# Log a message when the severity is not known. Unknown messages will always appear in the log.
-
# The message can be passed in either the +message+ argument or in a block.
-
1
def unknown(message = nil, progname = nil, &block)
-
add(UNKNOWN, message, progname, &block)
-
end
-
-
1
alias_method :<<, :unknown
-
-
# Set the minimum level of severity of messages to log.
-
1
def level=(severity)
-
1
if severity.is_a?(Fixnum)
-
@level = severity
-
else
-
1
@level = Severity.label_to_level(severity)
-
end
-
end
-
-
# Silence the logger by setting a new log level inside a block. By default, only +ERROR+ or +FATAL+
-
# messages will be logged.
-
#
-
# === Example
-
#
-
# logger.level = Lumberjack::Severity::INFO
-
# logger.silence do
-
# do_something # Log level inside the block is +ERROR+
-
# end
-
1
def silence(temporary_level = ERROR, &block)
-
if silencer
-
push_thread_local_value(:lumberjack_logger_level, temporary_level, &block)
-
else
-
yield
-
end
-
end
-
-
# Set the program name that is associated with log messages. If a block
-
# is given, the program name will be valid only within the block.
-
1
def set_progname(value, &block)
-
if block
-
push_thread_local_value(:lumberjack_logger_progname, value, &block)
-
else
-
self.progname = value
-
end
-
end
-
-
# Get the program name associated with log messages.
-
1
def progname
-
thread_local_value(:lumberjack_logger_progname) || @progname
-
end
-
-
1
private
-
-
# Set a local value for a thread tied to this object.
-
1
def set_thread_local_value(name, value) #:nodoc:
-
values = Thread.current[name]
-
unless values
-
values = {}
-
Thread.current[name] = values
-
end
-
if value.nil?
-
values.delete(self)
-
Thread.current[name] = nil if values.empty?
-
else
-
values[self] = value
-
end
-
end
-
-
# Get a local value for a thread tied to this object.
-
1
def thread_local_value(name) #:nodoc:
-
10
values = Thread.current[name]
-
10
values[self] if values
-
end
-
-
# Set a local value for a thread tied to this object within a block.
-
1
def push_thread_local_value(name, value) #:nodoc:
-
save_val = thread_local_value(name)
-
set_thread_local_value(name, value)
-
begin
-
yield
-
ensure
-
set_thread_local_value(name, save_val)
-
end
-
end
-
-
# Open a logging device.
-
1
def open_device(device, options) #:nodoc:
-
1
if device.is_a?(Device)
-
device
-
1
elsif device.respond_to?(:write) && device.respond_to?(:flush)
-
1
Device::Writer.new(device, options)
-
elsif device == :null
-
Device::Null.new
-
else
-
device = device.to_s
-
if options[:roll]
-
Device::DateRollingLogFile.new(device, options)
-
elsif options[:max_size]
-
Device::SizeRollingLogFile.new(device, options)
-
else
-
Device::LogFile.new(device, options)
-
end
-
end
-
end
-
-
# Create a thread that will periodically call flush.
-
1
def create_flusher_thread(flush_seconds) #:nodoc:
-
if flush_seconds > 0
-
begin
-
logger = self
-
Thread.new do
-
loop do
-
begin
-
sleep(flush_seconds)
-
logger.flush if Time.now - logger.last_flushed_at >= flush_seconds
-
rescue => e
-
STDERR.puts("Error flushing log: #{e.inspect}")
-
end
-
end
-
end
-
end
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
1
module Rack
-
1
require File.expand_path("../rack/unit_of_work.rb", __FILE__)
-
end
-
end
-
1
module Lumberjack
-
1
module Rack
-
1
class UnitOfWork
-
1
def initialize(app)
-
@app = app
-
end
-
-
1
def call(env)
-
Lumberjack.unit_of_work do
-
@app.call(env)
-
end
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
# The standard severity levels for logging messages.
-
1
module Severity
-
1
UNKNOWN = 5
-
1
FATAL = 4
-
1
ERROR = 3
-
1
WARN = 2
-
1
INFO = 1
-
1
DEBUG = 0
-
-
1
SEVERITY_LABELS = %w(DEBUG INFO WARN ERROR FATAL UNKNOWN).freeze
-
-
1
class << self
-
1
def level_to_label(severity)
-
SEVERITY_LABELS[severity] || SEVERITY_LABELS.last
-
end
-
-
1
def label_to_level(label)
-
1
SEVERITY_LABELS.index(label.to_s.upcase) || UNKNOWN
-
end
-
end
-
end
-
end
-
1
module Lumberjack
-
# A template converts entries to strings. Templates can contain the following place holders to
-
# reference log entry values:
-
#
-
# * <tt>:time</tt>
-
# * <tt>:severity</tt>
-
# * <tt>:progname</tt>
-
# * <tt>:unit_of_work_id</tt>
-
# * <tt>:message</tt>
-
1
class Template
-
1
TEMPLATE_ARGUMENT_ORDER = %w(:time :severity :progname :pid :unit_of_work_id :message).freeze
-
1
DEFAULT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S."
-
1
MILLISECOND_FORMAT = "%03d"
-
1
MICROSECOND_FORMAT = "%06d"
-
-
# Create a new template from the markup. The +first_line+ argument is used to format only the first
-
# line of a message. Additional lines will be added to the message unformatted. If you wish to format
-
# the additional lines, use the <tt>:additional_lines</tt> options to specify a template. Note that you'll need
-
# to provide the line separator character in this template if you want to keep the message on multiple lines.
-
#
-
# The time will be formatted as YYYY-MM-DDTHH:MM:SSS.SSS by default. If you wish to change the format, you
-
# can specify the <tt>:time_format</tt> option which can be either a time format template as documented in
-
# +Time#strftime+ or the values +:milliseconds+ or +:microseconds+ to use the standard format with the
-
# specified precision.
-
#
-
# Messages will have white space stripped from both ends.
-
1
def initialize(first_line, options = {})
-
1
@first_line_template = compile(first_line)
-
1
additional_lines = options[:additional_lines] || "#{Lumberjack::LINE_SEPARATOR}:message"
-
1
@additional_line_template = compile(additional_lines)
-
# Formatting the time is relatively expensive, so only do it if it will be used
-
1
@template_include_time = first_line.include?(":time") || additional_lines.include?(":time")
-
1
@time_format = options[:time_format] || :milliseconds
-
end
-
-
# Convert an entry into a string using the template.
-
1
def call(entry)
-
lines = entry.message.strip.split(Lumberjack::LINE_SEPARATOR)
-
formatted_time = format_time(entry.time) if @template_include_time
-
message = @first_line_template % [formatted_time, entry.severity_label, entry.progname, entry.pid, entry.unit_of_work_id, lines.shift]
-
lines.each do |line|
-
message << @additional_line_template % [formatted_time, entry.severity_label, entry.progname, entry.pid, entry.unit_of_work_id, line]
-
end
-
message
-
end
-
-
1
private
-
-
1
def format_time(time) #:nodoc:
-
if @time_format.is_a?(String)
-
time.strftime(@time_format)
-
elsif @time_format == :milliseconds
-
time.strftime(DEFAULT_TIME_FORMAT) << MILLISECOND_FORMAT % (time.usec / 1000.0).round
-
else
-
time.strftime(DEFAULT_TIME_FORMAT) << MICROSECOND_FORMAT % time.usec
-
end
-
end
-
-
# Compile the template string into a value that can be used with sprintf.
-
1
def compile(template) #:nodoc:
-
2
template.gsub(/:[a-z0-9_]+/) do |match|
-
5
position = TEMPLATE_ARGUMENT_ORDER.index(match)
-
5
if position
-
5
"%#{position + 1}$s"
-
else
-
match
-
end
-
end
-
end
-
end
-
end
-
# encoding: utf-8
-
# frozen_string_literal: true
-
1
module Mail
-
1
class Address
-
-
1
include Mail::Utilities
-
-
# Mail::Address handles all email addresses in Mail. It takes an email address string
-
# and parses it, breaking it down into its component parts and allowing you to get the
-
# address, comments, display name, name, local part, domain part and fully formatted
-
# address.
-
#
-
# Mail::Address requires a correctly formatted email address per RFC2822 or RFC822. It
-
# handles all obsolete versions including obsolete domain routing on the local part.
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.format #=> 'Mikel Lindsaar <mikel@test.lindsaar.net> (My email address)'
-
# a.address #=> 'mikel@test.lindsaar.net'
-
# a.display_name #=> 'Mikel Lindsaar'
-
# a.local #=> 'mikel'
-
# a.domain #=> 'test.lindsaar.net'
-
# a.comments #=> ['My email address']
-
# a.to_s #=> 'Mikel Lindsaar <mikel@test.lindsaar.net> (My email address)'
-
1
def initialize(value = nil)
-
6
@output_type = :decode
-
6
if value.nil?
-
@parsed = false
-
@data = nil
-
else
-
6
parse(value)
-
end
-
end
-
-
# Returns the raw input of the passed in string, this is before it is passed
-
# by the parser.
-
1
def raw
-
@data.raw
-
end
-
-
# Returns a correctly formatted address for the email going out. If given
-
# an incorrectly formatted address as input, Mail::Address will do its best
-
# to format it correctly. This includes quoting display names as needed and
-
# putting the address in angle brackets etc.
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.format #=> 'Mikel Lindsaar <mikel@test.lindsaar.net> (My email address)'
-
1
def format
-
8
parse unless @parsed
-
8
if @data.nil?
-
EMPTY
-
8
elsif display_name
-
[quote_phrase(display_name), "<#{address}>", format_comments].compact.join(SPACE)
-
8
elsif address
-
8
[address, format_comments].compact.join(SPACE)
-
else
-
raw
-
end
-
end
-
-
# Returns the address that is in the address itself. That is, the
-
# local@domain string, without any angle brackets or the like.
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.address #=> 'mikel@test.lindsaar.net'
-
1
def address
-
28
parse unless @parsed
-
28
domain ? "#{local}@#{domain}" : local
-
end
-
-
# Provides a way to assign an address to an already made Mail::Address object.
-
#
-
# a = Address.new
-
# a.address = 'Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>'
-
# a.address #=> 'mikel@test.lindsaar.net'
-
1
def address=(value)
-
parse(value)
-
end
-
-
# Returns the display name of the email address passed in.
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.display_name #=> 'Mikel Lindsaar'
-
1
def display_name
-
8
parse unless @parsed
-
8
@display_name ||= get_display_name
-
8
Encodings.decode_encode(@display_name.to_s, @output_type) if @display_name
-
end
-
-
# Provides a way to assign a display name to an already made Mail::Address object.
-
#
-
# a = Address.new
-
# a.address = 'mikel@test.lindsaar.net'
-
# a.display_name = 'Mikel Lindsaar'
-
# a.format #=> 'Mikel Lindsaar <mikel@test.lindsaar.net>'
-
1
def display_name=( str )
-
@display_name = str.dup # in case frozen
-
end
-
-
# Returns the local part (the left hand side of the @ sign in the email address) of
-
# the address
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.local #=> 'mikel'
-
1
def local
-
32
parse unless @parsed
-
32
Encodings.decode_encode("#{@data.obs_domain_list}#{get_local.strip}", @output_type) if get_local
-
end
-
-
# Returns the domain part (the right hand side of the @ sign in the email address) of
-
# the address
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.domain #=> 'test.lindsaar.net'
-
1
def domain
-
60
parse unless @parsed
-
60
Encodings.decode_encode(strip_all_comments(get_domain), @output_type) if get_domain
-
end
-
-
# Returns an array of comments that are in the email, or an empty array if there
-
# are no comments
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.comments #=> ['My email address']
-
1
def comments
-
83
parse unless @parsed
-
83
get_comments.map { |c| c.squeeze(SPACE) } unless get_comments.empty?
-
end
-
-
# Sometimes an address will not have a display name, but might have the name
-
# as a comment field after the address. This returns that name if it exists.
-
#
-
# a = Address.new('mikel@test.lindsaar.net (Mikel Lindsaar)')
-
# a.name #=> 'Mikel Lindsaar'
-
1
def name
-
parse unless @parsed
-
get_name
-
end
-
-
# Returns the format of the address, or returns nothing
-
#
-
# a = Address.new('Mikel Lindsaar (My email address) <mikel@test.lindsaar.net>')
-
# a.format #=> 'Mikel Lindsaar <mikel@test.lindsaar.net> (My email address)'
-
1
def to_s
-
parse unless @parsed
-
format
-
end
-
-
# Shows the Address object basic details, including the Address
-
# a = Address.new('Mikel (My email) <mikel@test.lindsaar.net>')
-
# a.inspect #=> "#<Mail::Address:14184910 Address: |Mikel <mikel@test.lindsaar.net> (My email)| >"
-
1
def inspect
-
parse unless @parsed
-
"#<#{self.class}:#{self.object_id} Address: |#{to_s}| >"
-
end
-
-
1
def encoded
-
8
@output_type = :encode
-
8
format
-
end
-
-
1
def decoded
-
@output_type = :decode
-
format
-
end
-
-
1
def group
-
8
@data && @data.group
-
end
-
-
1
private
-
-
1
def parse(value = nil)
-
6
@parsed = true
-
6
@data = nil
-
-
6
case value
-
when Mail::Parsers::AddressStruct
-
2
@data = value
-
when String
-
4
unless Utilities.blank?(value)
-
4
address_list = Mail::Parsers::AddressListsParser.new.parse(value)
-
4
@data = address_list.addresses.first
-
end
-
end
-
end
-
-
1
def strip_all_comments(string)
-
59
unless Utilities.blank?(comments)
-
comments.each do |comment|
-
string = string.gsub("(#{comment})", EMPTY)
-
end
-
end
-
59
string.strip
-
end
-
-
1
def strip_domain_comments(value)
-
8
unless Utilities.blank?(comments)
-
comments.each do |comment|
-
if @data.domain && @data.domain.include?("(#{comment})")
-
value = value.gsub("(#{comment})", EMPTY)
-
end
-
end
-
end
-
8
value.to_s.strip
-
end
-
-
1
def get_display_name
-
8
if @data.display_name
-
str = strip_all_comments(@data.display_name.to_s)
-
elsif @data.comments && @data.domain
-
8
str = strip_domain_comments(format_comments)
-
end
-
8
str unless Utilities.blank?(str)
-
end
-
-
1
def get_name
-
if display_name
-
str = display_name
-
elsif comments
-
str = "(#{comments.join(SPACE).squeeze(SPACE)})"
-
end
-
-
unparen(str) unless Utilities.blank?(str)
-
end
-
-
1
def format_comments
-
16
if comments
-
comment_text = comments.map {|c| escape_paren(c) }.join(SPACE).squeeze(SPACE)
-
@format_comments ||= "(#{comment_text})"
-
else
-
nil
-
end
-
end
-
-
1
def get_local
-
64
@data && @data.local
-
end
-
-
1
def get_domain
-
119
@data && @data.domain
-
end
-
-
1
def get_comments
-
83
@data && @data.comments
-
end
-
end
-
end
-
# encoding: utf-8
-
# frozen_string_literal: true
-
1
module Mail
-
1
class AddressList # :nodoc:
-
-
# Mail::AddressList is the class that parses To, From and other address fields from
-
# emails passed into Mail.
-
#
-
# AddressList provides a way to query the groups and mailbox lists of the passed in
-
# string.
-
#
-
# It can supply all addresses in an array, or return each address as an address object.
-
#
-
# Mail::AddressList requires a correctly formatted group or mailbox list per RFC2822 or
-
# RFC822. It also handles all obsolete versions in those RFCs.
-
#
-
# list = 'ada@test.lindsaar.net, My Group: mikel@test.lindsaar.net, Bob <bob@test.lindsaar.net>;'
-
# a = AddressList.new(list)
-
# a.addresses #=> [#<Mail::Address:14943130 Address: |ada@test.lindsaar.net...
-
# a.group_names #=> ["My Group"]
-
1
def initialize(string)
-
2
@addresses_grouped_by_group = nil
-
2
@address_list = Parsers::AddressListsParser.new.parse(string)
-
end
-
-
# Returns a list of address objects from the parsed line
-
1
def addresses
-
@addresses ||= @address_list.addresses.map do |address_data|
-
2
Mail::Address.new(address_data)
-
24
end
-
end
-
-
1
def addresses_grouped_by_group
-
8
addresses.select(&:group).group_by(&:group)
-
end
-
-
# Returns the names as an array of strings of all groups
-
1
def group_names # :nodoc:
-
@address_list.group_names
-
end
-
end
-
end
-
# encoding: utf-8
-
# frozen_string_literal: true
-
1
module Mail
-
1
class ContentTransferEncodingElement
-
-
1
include Mail::Utilities
-
-
1
def initialize(string)
-
2
content_transfer_encoding = Mail::Parsers::ContentTransferEncodingParser.new.parse(string)
-
2
@encoding = content_transfer_encoding.encoding
-
end
-
-
1
def encoding
-
4
@encoding
-
end
-
-
end
-
end
-
# encoding: utf-8
-
# frozen_string_literal: true
-
1
module Mail
-
1
class ContentTypeElement # :nodoc:
-
-
1
include Mail::Utilities
-
-
1
def initialize( string )
-
3
content_type = Mail::Parsers::ContentTypeParser.new.parse(cleaned(string))
-
3
@main_type = content_type.main_type
-
3
@sub_type = content_type.sub_type
-
3
@parameters = content_type.parameters
-
end
-
-
1
def main_type
-
2
@main_type
-
end
-
-
1
def sub_type
-
2
@sub_type
-
end
-
-
1
def parameters
-
2
@parameters
-
end
-
-
1
def cleaned(string)
-
3
string =~ /(.+);\s*$/ ? $1 : string
-
end
-
-
end
-
end
-
# encoding: utf-8
-
# frozen_string_literal: true
-
1
module Mail
-
1
class MessageIdsElement
-
-
1
include Mail::Utilities
-
-
1
def initialize(string)
-
1
raise Mail::Field::ParseError.new(Mail::MessageIdsElement, string, 'nil is invalid') if string.nil?
-
2
@message_ids = Mail::Parsers::MessageIdsParser.new.parse(string).message_ids.map { |msg_id| clean_msg_id(msg_id) }
-
end
-
-
1
def message_ids
-
@message_ids
-
end
-
-
1
def message_id
-
4
@message_ids.first
-
end
-
-
1
def clean_msg_id( val )
-
1
val =~ /.*<(.*)>.*/ ; $1
-
end
-
-
end
-
end
-
# encoding: utf-8
-
# frozen_string_literal: true
-
1
module Mail
-
1
class MimeVersionElement
-
-
1
include Mail::Utilities
-
-
1
def initialize( string )
-
1
mime_version = Mail::Parsers::MimeVersionParser.new.parse(string)
-
1
@major = mime_version.major
-
1
@minor = mime_version.minor
-
end
-
-
1
def major
-
2
@major
-
end
-
-
1
def minor
-
2
@minor
-
end
-
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail
-
1
module Parsers
-
-
# Low-level ragel based parsers
-
1
require 'mail/parsers/ragel'
-
-
1
AddressListStruct = Struct.new(:addresses, :group_names, :error)
-
1
AddressStruct = Struct.new(:raw, :domain, :comments, :local,
-
:obs_domain_list, :display_name, :group, :error)
-
1
ContentDispositionStruct = Struct.new(:disposition_type, :parameters, :error)
-
1
ContentLocationStruct = Struct.new(:location, :error)
-
1
ContentTransferEncodingStruct = Struct.new(:encoding, :error)
-
1
ContentTypeStruct = Struct.new(:main_type, :sub_type, :parameters, :error)
-
1
DateTimeStruct = Struct.new(:date_string, :time_string, :error)
-
1
EnvelopeFromStruct = Struct.new(:address, :ctime_date, :error)
-
1
MessageIdsStruct = Struct.new(:message_ids, :error)
-
1
MimeVersionStruct = Struct.new(:major, :minor, :error)
-
1
PhraseListsStruct = Struct.new(:phrases, :error)
-
1
ReceivedStruct = Struct.new(:date, :time, :info, :error)
-
-
1
require 'mail/parsers/ragel/parser_info'
-
1
Ragel::FIELD_PARSERS.each do |field_parser|
-
11
require "mail/parsers/#{field_parser}_parser"
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class AddressListsParser
-
1
include Mail::Utilities
-
-
1
def parse(s)
-
6
address_list = AddressListStruct.new([],[])
-
-
6
if Mail::Utilities.blank?(s)
-
return address_list
-
end
-
-
6
actions, error = Ragel.parse(:address_lists, s)
-
6
if error
-
raise Mail::Field::ParseError.new(Mail::AddressList, s, error)
-
end
-
-
-
6
phrase_s = phrase_e = qstr_s = qstr = comment_s = nil
-
6
group_name_s = domain_s = group_name = nil
-
6
local_dot_atom_s = local_dot_atom_e = nil
-
6
local_dot_atom_pre_comment_e = nil
-
6
obs_domain_list_s = nil
-
-
6
address_s = 0
-
6
address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
-
6
actions.each_slice(2) do |action_id, p|
-
52
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
52
case action
-
-
# Phrase
-
6
when :phrase_s then phrase_s = p
-
when :phrase_e then phrase_e = p-1
-
-
# Quoted String.
-
when :qstr_s then qstr_s = p
-
when :qstr_e then qstr = s[qstr_s..(p-1)]
-
-
# Comment
-
when :comment_s
-
comment_s = p unless comment_s
-
when :comment_e
-
if address
-
address.comments << s[comment_s..(p-2)]
-
end
-
comment_s = nil
-
-
# Group Name
-
6
when :group_name_s then group_name_s = p
-
when :group_name_e
-
if qstr
-
group = qstr
-
qstr = nil
-
else
-
group = s[group_name_s..(p-1)]
-
group_name_s = nil
-
end
-
address_list.group_names << group
-
group_name = group
-
-
# Start next address
-
address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
-
address_s = p
-
address.group = group_name
-
-
# Address
-
when :address_s
-
6
address_s = p
-
when :address_e
-
# Ignore address end events if they don't have
-
# a matching address start event.
-
6
next if address_s.nil?
-
6
if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
-
6
if address.domain
-
5
address.local = s[local_dot_atom_s..local_dot_atom_e] if address
-
else
-
1
address.local = s[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
-
end
-
end
-
6
address.raw = s[address_s..(p-1)]
-
6
address_list.addresses << address if address
-
-
# Start next address
-
6
address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
-
6
address.group = group_name
-
6
address_s = nil
-
-
# Don't set the display name until the
-
# address has actually started. This allows
-
# us to choose quoted_s version if it
-
# exists and always use the 'full' phrase
-
# version.
-
when :angle_addr_s
-
if qstr
-
address.display_name = qstr
-
qstr = nil
-
elsif phrase_e
-
address.display_name = s[phrase_s..phrase_e].strip
-
phrase_e = phrase_s = nil
-
end
-
-
# Domain
-
when :domain_s
-
5
domain_s = p
-
when :domain_e
-
5
address.domain = s[domain_s..(p-1)].rstrip if address
-
-
# Local
-
6
when :local_dot_atom_s then local_dot_atom_s = p
-
6
when :local_dot_atom_e then local_dot_atom_e = p-1
-
when :local_dot_atom_pre_comment_e
-
6
local_dot_atom_pre_comment_e = p-1
-
when :local_quoted_string_e
-
address.local = '"' + qstr + '"' if address
-
-
# obs_domain_list
-
when :obs_domain_list_s then obs_domain_list_s = p
-
when :obs_domain_list_e
-
address.obs_domain_list = s[obs_domain_list_s..(p-1)]
-
-
else
-
raise Mail::Field::ParseError.new(Mail::AddressList, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
-
6
if address_list.addresses.empty? && address_list.group_names.empty?
-
raise Mail::Field::ParseError.new(Mail::AddressList, s, "Didn't find any addresses or groups")
-
end
-
-
6
address_list
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class ContentDispositionParser
-
1
include Mail::Utilities
-
-
1
def parse(s)
-
content_disposition = ContentDispositionStruct.new("", nil)
-
if Mail::Utilities.blank?(s)
-
return content_disposition
-
end
-
-
actions, error = Ragel.parse(:content_disposition, s)
-
if error
-
raise Mail::Field::ParseError.new(Mail::ContentDispositionElement, s, error)
-
end
-
-
content_disposition.parameters = []
-
-
disp_type_s = param_attr_s = param_attr = qstr_s = qstr = param_val_s = nil
-
actions.each_slice(2) do |action_id, p|
-
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
case action
-
-
# Disposition Type
-
when :disp_type_s then disp_type_s = p
-
when :disp_type_e
-
content_disposition.disposition_type = s[disp_type_s..(p-1)].downcase
-
-
# Parameter Attribute
-
when :param_attr_s then param_attr_s = p
-
when :param_attr_e then param_attr = s[param_attr_s..(p-1)]
-
-
# Quoted String.
-
when :qstr_s then qstr_s = p
-
when :qstr_e then qstr = s[qstr_s..(p-1)]
-
-
# Parameter Value
-
when :param_val_s then param_val_s = p
-
when :param_val_e
-
if param_attr.nil?
-
raise Mail::Field::ParseError.new(Mail::ContentDispositionElement, s, "no attribute for value")
-
end
-
-
# Use quoted string value if one exists, otherwise use parameter value
-
if qstr
-
value = qstr
-
else
-
value = s[param_val_s..(p-1)]
-
end
-
-
content_disposition.parameters << { param_attr => value }
-
param_attr = nil
-
qstr = nil
-
-
else
-
raise Mail::Field::ParseError.new(Mail::ContentDispositionElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
-
content_disposition
-
end
-
-
1
private
-
1
def cleaned(string)
-
string =~ /(.+);\s*$/ ? $1 : string
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class ContentLocationParser
-
1
def parse(s)
-
content_location = ContentLocationStruct.new(nil)
-
if Mail::Utilities.blank?(s)
-
return content_location
-
end
-
-
actions, error = Ragel.parse(:content_location, s)
-
if error
-
raise Mail::Field::ParseError.new(Mail::ContentLocationElement, s, error)
-
end
-
-
qstr_s = token_string_s = nil
-
actions.each_slice(2) do |action_id, p|
-
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
case action
-
-
# Quoted String.
-
when :qstr_s then qstr_s = p
-
when :qstr_e then content_location.location = s[qstr_s..(p-1)]
-
-
# Token String
-
when :token_string_s then token_string_s = p
-
when :token_string_e
-
content_location.location = s[token_string_s..(p-1)]
-
-
else
-
raise Mail::Field::ParseError.new(Mail::ContentLocationElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
content_location
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class ContentTransferEncodingParser
-
-
1
def parse(s)
-
2
content_transfer_encoding = ContentTransferEncodingStruct.new("")
-
2
if Mail::Utilities.blank?(s)
-
return content_transfer_encoding
-
end
-
-
2
actions, error = Ragel.parse(:content_transfer_encoding, s)
-
2
if error
-
raise Mail::Field::ParseError.new(Mail::ContentTransferEncodingElement, s, error)
-
end
-
-
2
encoding_s = nil
-
2
actions.each_slice(2) do |action_id, p|
-
4
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
4
case action
-
-
# Encoding
-
2
when :encoding_s then encoding_s = p
-
when :encoding_e
-
2
content_transfer_encoding.encoding = s[encoding_s..(p-1)].downcase
-
-
else
-
raise Mail::Field::ParseError.new(Mail::ContentTransferEncodingElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
-
2
content_transfer_encoding
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class ContentTypeParser
-
1
include Mail::Utilities
-
-
1
def parse(s)
-
3
actions, error = Ragel.parse(:content_type, s)
-
3
if error
-
raise Mail::Field::ParseError.new(Mail::ContentTypeElement, s, error)
-
end
-
-
3
content_type = ContentTypeStruct.new(nil,nil,[])
-
-
3
content_type.parameters = []
-
-
3
main_type_s = sub_type_s = param_attr_s = param_attr = nil
-
3
qstr_s = qstr = param_val_s = nil
-
3
actions.each_slice(2) do |action_id, p|
-
16
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
16
case action
-
-
# Main Type
-
3
when :main_type_s then main_type_s = p
-
when :main_type_e then
-
3
content_type.main_type = s[main_type_s..(p-1)]
-
3
content_type.main_type.downcase!
-
-
# Sub Type
-
3
when :sub_type_s then sub_type_s = p
-
when :sub_type_e
-
3
content_type.sub_type = s[sub_type_s..(p-1)]
-
3
content_type.sub_type.downcase!
-
-
# Parameter Attribute
-
1
when :param_attr_s then param_attr_s = p
-
1
when :param_attr_e then param_attr = s[param_attr_s..(p-1)]
-
-
# Quoted String.
-
when :qstr_s then qstr_s = p
-
when :qstr_e then qstr = s[qstr_s..(p-1)]
-
-
# Parameter Value
-
1
when :param_val_s then param_val_s = p
-
when :param_val_e
-
1
if param_attr.nil?
-
raise Mail::Field::ParseError.new(Mail::ContentTypeElement, s, "no attribute for value")
-
end
-
-
# Use quoted s value if one exists, otherwise use parameter value
-
1
if qstr
-
value = qstr
-
else
-
1
value = s[param_val_s..(p-1)]
-
end
-
-
1
content_type.parameters << { param_attr => value }
-
1
param_attr = nil
-
1
qstr = nil
-
-
else
-
raise Mail::Field::ParseError.new(Mail::ContentTypeElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
3
content_type
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class DateTimeParser
-
1
include Mail::Utilities
-
-
1
def parse(s)
-
raise Mail::Field::ParseError.new(Mail::DateTimeElement, s, "nil is an invalid DateTime") if s.nil?
-
-
date_time = DateTimeStruct.new([])
-
-
actions, error = Ragel.parse(:date_time, s)
-
if error
-
raise Mail::Field::ParseError.new(Mail::DateTimeElement, s, error)
-
end
-
-
date_s = time_s = nil
-
actions.each_slice(2) do |action_id, p|
-
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
case action
-
-
# Date
-
when :date_s then date_s = p
-
when :date_e
-
date_time.date_string = s[date_s..(p-1)]
-
-
# Time
-
when :time_s then time_s = p
-
when :time_e
-
date_time.time_string = s[time_s..(p-1)]
-
-
else
-
raise Mail::Field::ParseError.new(Mail::DateTimeElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
-
date_time
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class EnvelopeFromParser
-
1
def parse(s)
-
envelope_from = EnvelopeFromStruct.new
-
if Mail::Utilities.blank?(s)
-
return envelope_from
-
end
-
-
actions, error = Ragel.parse(:envelope_from, s)
-
if error
-
raise Mail::Field::ParseError.new(Mail::EnvelopeFromElement, s, error)
-
end
-
-
address_s = ctime_date_s = nil
-
envelope_from = EnvelopeFromStruct.new
-
actions.each_slice(2) do |action_id, p|
-
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
case action
-
-
# Address
-
when :address_s then address_s = p
-
when :address_e
-
envelope_from.address = s[address_s..(p-1)].rstrip
-
-
# ctime_date
-
when :ctime_date_s then ctime_date_s = p
-
when :ctime_date_e
-
envelope_from.ctime_date = s[ctime_date_s..(p-1)]
-
-
# ignored actions
-
when :angle_addr_s, :comment_e, :comment_s,
-
:domain_e, :domain_s, :local_dot_atom_e,
-
:local_dot_atom_pre_comment_e,
-
:local_dot_atom_pre_comment_s,
-
:local_dot_atom_s, :qstr_e, :qstr_s
-
nil
-
-
else
-
raise Mail::Field::ParseError.new(Mail::EnvelopeFromElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
envelope_from
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class MessageIdsParser
-
1
def parse(s)
-
1
if Mail::Utilities.blank?(s)
-
return MessageIdsStruct.new
-
end
-
-
1
message_ids = MessageIdsStruct.new([])
-
-
1
actions, error = Ragel.parse(:message_ids, s)
-
1
if error
-
raise Mail::Field::ParseError.new(Mail::MessageIdsElement, s, error)
-
end
-
-
1
msg_id_s = nil
-
1
actions.each_slice(2) do |action_id, p|
-
7
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
7
case action
-
-
# Message Ids
-
1
when :msg_id_s then msg_id_s = p
-
when :msg_id_e
-
1
message_ids.message_ids << s[msg_id_s..(p-1)].rstrip
-
-
when :domain_e, :domain_s, :local_dot_atom_e,
-
:local_dot_atom_pre_comment_e,
-
:local_dot_atom_pre_comment_s,
-
:local_dot_atom_s
-
-
# ignored actions
-
-
else
-
raise Mail::Field::ParseError.new(Mail::MessageIdsElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
1
message_ids
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class MimeVersionParser
-
1
include Mail::Utilities
-
-
1
def parse(s)
-
1
if Mail::Utilities.blank?(s)
-
return MimeVersionStruct.new("", nil)
-
end
-
-
1
mime_version = MimeVersionStruct.new
-
-
1
actions, error = Ragel.parse(:mime_version, s)
-
1
if error
-
raise Mail::Field::ParseError.new(Mail::MimeVersionElement, s, error)
-
end
-
-
1
major_digits_s = minor_digits_s = nil
-
1
actions.each_slice(2) do |action_id, p|
-
4
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
4
case action
-
-
# Major Digits
-
1
when :major_digits_s then major_digits_s = p
-
when :major_digits_e
-
1
mime_version.major = s[major_digits_s..(p-1)]
-
-
# Minor Digits
-
1
when :minor_digits_s then minor_digits_s = p
-
when :minor_digits_e
-
1
mime_version.minor = s[minor_digits_s..(p-1)]
-
-
when :comment_e, :comment_s then nil
-
-
else
-
raise Mail::Field::ParseError.new(Mail::MimeVersionElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
1
mime_version
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class PhraseListsParser
-
-
1
def parse(s)
-
raise Mail::Field::ParseError.new(Mail::PhraseList, s, 'nil is invalid') if s.nil?
-
-
actions, error = Ragel.parse(:phrase_lists, s)
-
if error
-
raise Mail::Field::ParseError.new(Mail::PhraseList, s, error)
-
end
-
-
phrase_lists = PhraseListsStruct.new([])
-
-
phrase_s = nil
-
actions.each_slice(2) do |action_id, p|
-
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
case action
-
-
# Phrase
-
when :phrase_s then phrase_s = p
-
when :phrase_e
-
phrase_lists.phrases << s[phrase_s..(p-1)] if phrase_s
-
phrase_s = nil
-
-
when :comment_e, :comment_s, :qstr_s, :qstr_e then nil
-
-
else
-
raise Mail::Field::ParseError.new(Mail::PhraseList, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
-
phrase_lists
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
require 'mail/parsers/ragel/parser_info'
-
1
require "mail/parsers/ragel/ruby"
-
-
1
def self.parse(machine, string)
-
13
@machine_module ||= Ruby
-
13
@machine_module.parse(machine, string)
-
end
-
-
1
def self.machine_module=(m)
-
@machine_module = m
-
end
-
end
-
end
-
end
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
ACTIONS = [
-
:addr_spec,
-
:address_e,
-
:address_s,
-
:angle_addr_s,
-
:comment_e,
-
:comment_s,
-
:ctime_date_e,
-
:ctime_date_s,
-
:date_e,
-
:date_s,
-
:disp_type_e,
-
:disp_type_s,
-
:domain_e,
-
:domain_s,
-
:encoding_e,
-
:encoding_s,
-
:group_name_e,
-
:group_name_s,
-
:local_dot_atom_e,
-
:local_dot_atom_pre_comment_e,
-
:local_dot_atom_s,
-
:local_quoted_string_e,
-
:main_type_e,
-
:main_type_s,
-
:major_digits_e,
-
:major_digits_s,
-
:minor_digits_e,
-
:minor_digits_s,
-
:msg_id_e,
-
:msg_id_s,
-
:obs_domain_list_e,
-
:obs_domain_list_s,
-
:param_attr_e,
-
:param_attr_s,
-
:param_val_e,
-
:param_val_s,
-
:phrase_e,
-
:phrase_s,
-
:qstr_e,
-
:qstr_s,
-
:received_tokens_e,
-
:received_tokens_s,
-
:sub_type_e,
-
:sub_type_s,
-
:time_e,
-
:time_s,
-
:token_string_e,
-
:token_string_s
-
]
-
-
1
FIELD_PARSERS = %w[ address_lists phrase_lists
-
date_time received message_ids envelope_from
-
mime_version content_type content_disposition
-
content_transfer_encoding content_location ]
-
end
-
end
-
end
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module Ruby
-
1
def self.silence_warnings
-
1
old, $VERBOSE = $VERBOSE, nil
-
1
yield
-
ensure
-
1
$VERBOSE = old
-
end
-
-
# Ragel-generated parsers give a lot of warnings
-
# and may cause logs to balloon in size
-
1
silence_warnings do
-
1
Mail::Parsers::Ragel::FIELD_PARSERS.each do |field_parser|
-
11
require "mail/parsers/ragel/ruby/machines/#{field_parser}_machine"
-
end
-
end
-
-
1
MACHINE_LIST = {
-
:address_lists => AddressListsMachine,
-
:phrase_lists => PhraseListsMachine,
-
:date_time => DateTimeMachine,
-
:received => ReceivedMachine,
-
:message_ids => MessageIdsMachine,
-
:envelope_from => EnvelopeFromMachine,
-
:mime_version => MimeVersionMachine,
-
:content_type => ContentTypeMachine,
-
:content_disposition => ContentDispositionMachine,
-
:content_transfer_encoding => ContentTransferEncodingMachine,
-
:content_location => ContentLocationMachine
-
}
-
-
1
def self.parse(machine, string)
-
13
MACHINE_LIST[machine].parse(string)
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module AddressListsMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb"
-
1
class << self
-
1
attr_accessor :_address_lists_trans_keys
-
1
private :_address_lists_trans_keys, :_address_lists_trans_keys=
-
end
-
1
self._address_lists_trans_keys = [
-
0, 0, 9, 126, 10, 10,
-
9, 32, 10, 10, 9,
-
32, 9, 126, 10, 10,
-
9, 32, 1, 127, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 10,
-
10, 9, 32, 10, 10,
-
9, 32, 10, 10, 9, 32,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 10, 10,
-
9, 32, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 9, 126, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
9, 59, 10, 10, 9, 32,
-
9, 59, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 10, 10, 9, 32,
-
1, 127, 1, 127, 10,
-
10, 9, 32, -128, -1,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 64, 10, 10, 9,
-
32, 9, 64, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 64, 10, 10, 9,
-
32, 9, 64, 9, 59,
-
10, 10, 9, 32, 9, 59,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 0, 127,
-
1, 127, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
33, 126, 9, 126, 9, 59,
-
10, 10, 9, 32, 9,
-
59, 1, 127, 1, 127,
-
10, 10, 9, 32, 0, 127,
-
10, 10, 9, 32, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 1, 127, 1, 127,
-
10, 10, 9, 32, 0,
-
127, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 59, 10, 10,
-
9, 32, 9, 59, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 0, 127, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 33, 126, 9, 126,
-
9, 64, 10, 10, 9,
-
32, 9, 64, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
-128, -1, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 62, 10,
-
10, 9, 32, 9, 62,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 62,
-
10, 10, 9, 32, 9,
-
62, 33, 126, 0, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 10,
-
10, 9, 32, -128, -1,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 0, 127, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 64, 10, 10, 9,
-
32, 9, 64, 0, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, -128, -1, 1,
-
127, 10, 10, 9, 32,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
64, 10, 10, 9, 32,
-
9, 64, 0, 127, 1, 127,
-
10, 10, 9, 32, 9,
-
64, 10, 10, 9, 32,
-
9, 64, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 58, 10, 10, 9,
-
32, 9, 58, 9, 64,
-
10, 10, 9, 32, 9, 64,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
33, 126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 58, 10, 10, 9,
-
32, 9, 58, 33, 126,
-
-128, -1, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, -128, -1,
-
1, 127, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
33, 126, 9, 126, 9, 59,
-
10, 10, 9, 32, 9,
-
59, 1, 127, 1, 127,
-
10, 10, 9, 32, -128, -1,
-
10, 10, 9, 32, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 1, 127, 1, 127,
-
10, 10, 9, 32, 0,
-
127, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 59, 10, 10,
-
9, 32, 9, 59, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 0, 127, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 10, 10,
-
9, 32, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 9, 126, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
9, 59, 10, 10, 9, 32,
-
9, 59, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 62, 10, 10, 9,
-
32, 9, 62, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
9, 126, 9, 62, 10, 10,
-
9, 32, 9, 62, 33,
-
126, -128, -1, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
1, 127, 10, 10, 9,
-
32, -128, -1, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
-128, -1, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 0, 127, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
0, 127, 1, 127, 10,
-
10, 9, 32, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 58,
-
10, 10, 9, 32, 9,
-
58, 9, 64, 10, 10,
-
9, 32, 9, 64, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 33, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 58,
-
10, 10, 9, 32, 9,
-
58, 33, 126, 0, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 10,
-
10, 9, 32, 0, 127,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
-128, -1, 1, 127, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 33, 126, 9, 126,
-
9, 59, 10, 10, 9,
-
32, 9, 59, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
0, 127, 10, 10, 9,
-
32, 1, 127, 10, 10,
-
9, 32, -128, -1, 1, 127,
-
1, 127, 10, 10, 9,
-
32, -128, -1, 9, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 59, 10, 10, 9,
-
32, 9, 59, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 9, 126, 9,
-
126, -128, -1, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, -128, -1, 1,
-
127, 10, 10, 9, 32,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, -128, -1, 1, 127,
-
10, 10, 9, 32, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 126, 33, 126,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
1, 127, 1, 127, 10, 10,
-
9, 32, -128, -1, 10,
-
10, 9, 32, 9, 126,
-
33, 126, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 1, 127, 1, 127,
-
10, 10, 9, 32, 0, 127,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 62, 10, 10, 9,
-
32, 9, 62, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
9, 126, 9, 62, 10, 10,
-
9, 32, 9, 62, 33,
-
126, -128, -1, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
1, 127, 10, 10, 9,
-
32, -128, -1, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
-128, -1, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, -128, -1, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
-128, -1, 1, 127, 10,
-
10, 9, 32, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
0, 127, 1, 127, 10, 10,
-
9, 32, 9, 64, 10,
-
10, 9, 32, 9, 64,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 58,
-
10, 10, 9, 32, 9,
-
58, 9, 64, 10, 10,
-
9, 32, 9, 64, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 33, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 58,
-
10, 10, 9, 32, 9,
-
58, 33, 126, -128, -1,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 10,
-
10, 9, 32, 0, 127,
-
9, 126, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
10, 10, 9, 32, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 1, 127, 1, 127,
-
10, 10, 9, 32, 10,
-
10, 9, 32, 9, 126,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 33, 126, 10, 10,
-
9, 32, 1, 127, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 10, 10, 9, 32,
-
1, 127, 10, 10, 9, 32,
-
0, 127, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 9, 126, 1, 127,
-
1, 127, 10, 10, 9,
-
32, 10, 10, 9, 32,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 10, 10, 9, 32,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 9,
-
126, -128, -1, 1, 127,
-
10, 10, 9, 32, 10, 10,
-
9, 32, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
10, 10, 9, 32, -128, -1,
-
1, 127, 10, 10, 9,
-
32, 10, 10, 9, 32,
-
9, 126, 9, 126, 10, 10,
-
9, 32, 33, 126, 10,
-
10, 9, 32, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
-128, -1, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 62, 10,
-
10, 9, 32, 9, 62,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 62,
-
10, 10, 9, 32, 9,
-
62, 33, 126, 0, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 10,
-
10, 9, 32, -128, -1,
-
1, 127, 1, 127, 10, 10,
-
9, 32, -128, -1, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 64, 10, 10, 9,
-
32, 9, 64, -128, -1,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, 0, 127, 1,
-
127, 10, 10, 9, 32,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
64, 10, 10, 9, 32,
-
9, 64, 0, 127, 1, 127,
-
10, 10, 9, 32, 9,
-
64, 10, 10, 9, 32,
-
9, 64, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 58, 10, 10, 9,
-
32, 9, 58, 9, 64,
-
10, 10, 9, 32, 9, 64,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
33, 126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 58, 10, 10, 9,
-
32, 9, 58, 33, 126,
-
0, 127, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 9, 126, 9, 126,
-
10, 10, 9, 32, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 33, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 0, 127, 10, 10,
-
9, 32, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
-128, -1, 9, 126, 1, 127,
-
1, 127, 10, 10, 9,
-
32, 10, 10, 9, 32,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 126,
-
-128, -1, 1, 127, 10, 10,
-
9, 32, 10, 10, 9,
-
32, 1, 127, 1, 127,
-
10, 10, 9, 32, -128, -1,
-
1, 127, 10, 10, 9,
-
32, 1, 127, 1, 127,
-
10, 10, 9, 32, 10, 10,
-
9, 32, -128, -1, 1,
-
127, 10, 10, 9, 32,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 33, 126, 10, 10,
-
9, 32, 1, 127, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 10, 10, 9, 32,
-
9, 126, 1, 127, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 9, 126, 9, 126,
-
9, 126, 9, 59, 9, 59,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
59, 9, 59, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 59,
-
9, 59, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 126,
-
9, 59, 9, 59, 9, 126,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
64, 9, 64, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
64, 9, 64, 0, 0,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :_address_lists_key_spans
-
1
private :_address_lists_key_spans, :_address_lists_key_spans=
-
end
-
1
self._address_lists_key_spans = [
-
0, 118, 1, 24, 1, 24, 118, 1,
-
24, 127, 127, 1, 24, 128, 118, 118,
-
118, 1, 24, 118, 118, 118, 1, 24,
-
118, 56, 1, 24, 56, 118, 1, 24,
-
118, 56, 1, 24, 56, 1, 24, 1,
-
24, 1, 24, 118, 118, 1, 24, 1,
-
24, 118, 118, 1, 24, 118, 118, 1,
-
24, 118, 1, 24, 127, 127, 1, 24,
-
128, 118, 118, 118, 1, 24, 118, 118,
-
118, 1, 24, 118, 56, 1, 24, 56,
-
118, 1, 24, 118, 56, 1, 24, 56,
-
51, 1, 24, 51, 118, 118, 1, 24,
-
127, 127, 1, 24, 118, 118, 1, 24,
-
118, 118, 118, 1, 24, 118, 118, 1,
-
24, 118, 1, 24, 118, 118, 1, 24,
-
118, 1, 24, 127, 127, 1, 24, 128,
-
118, 118, 118, 1, 24, 118, 118, 118,
-
1, 24, 118, 56, 1, 24, 56, 118,
-
1, 24, 118, 56, 1, 24, 56, 51,
-
1, 24, 51, 118, 118, 1, 24, 127,
-
127, 1, 24, 118, 118, 1, 24, 118,
-
118, 118, 1, 24, 118, 118, 1, 24,
-
118, 118, 118, 1, 24, 118, 118, 1,
-
24, 118, 118, 118, 1, 24, 118, 118,
-
127, 127, 1, 24, 118, 118, 1, 24,
-
118, 118, 128, 127, 1, 24, 118, 118,
-
94, 118, 51, 1, 24, 51, 127, 127,
-
1, 24, 128, 1, 24, 127, 1, 24,
-
128, 127, 127, 1, 24, 128, 118, 118,
-
118, 1, 24, 118, 127, 127, 1, 24,
-
128, 127, 1, 24, 118, 118, 1, 24,
-
118, 118, 118, 1, 24, 118, 51, 1,
-
24, 51, 118, 1, 24, 118, 118, 118,
-
118, 118, 118, 1, 24, 118, 127, 127,
-
1, 24, 118, 118, 128, 127, 1, 24,
-
128, 127, 1, 24, 118, 1, 24, 118,
-
118, 94, 118, 56, 1, 24, 56, 127,
-
127, 1, 24, 128, 1, 24, 118, 118,
-
118, 1, 24, 118, 54, 1, 24, 54,
-
118, 1, 24, 118, 118, 127, 127, 1,
-
24, 118, 54, 1, 24, 54, 94, 128,
-
1, 24, 118, 118, 127, 1, 24, 128,
-
127, 127, 1, 24, 128, 118, 127, 127,
-
1, 24, 118, 56, 1, 24, 56, 128,
-
1, 24, 118, 118, 1, 24, 118, 127,
-
127, 1, 24, 118, 128, 127, 1, 24,
-
127, 127, 1, 24, 118, 56, 1, 24,
-
56, 128, 127, 1, 24, 56, 1, 24,
-
56, 118, 56, 1, 24, 56, 118, 118,
-
1, 24, 118, 50, 1, 24, 50, 56,
-
1, 24, 56, 118, 118, 1, 24, 118,
-
94, 118, 1, 24, 118, 118, 127, 127,
-
1, 24, 118, 50, 1, 24, 50, 94,
-
128, 1, 24, 118, 118, 127, 1, 24,
-
128, 118, 118, 1, 24, 118, 118, 1,
-
24, 118, 118, 118, 1, 24, 118, 118,
-
127, 127, 1, 24, 118, 118, 1, 24,
-
118, 118, 128, 127, 1, 24, 118, 118,
-
94, 118, 51, 1, 24, 51, 127, 127,
-
1, 24, 128, 1, 24, 127, 1, 24,
-
128, 127, 127, 1, 24, 128, 118, 118,
-
118, 1, 24, 118, 127, 127, 1, 24,
-
128, 127, 1, 24, 118, 118, 1, 24,
-
118, 118, 118, 1, 24, 118, 51, 1,
-
24, 51, 118, 1, 24, 118, 118, 118,
-
118, 118, 118, 1, 24, 118, 127, 127,
-
1, 24, 118, 118, 128, 127, 1, 24,
-
128, 127, 1, 24, 118, 1, 24, 118,
-
118, 118, 118, 1, 24, 118, 118, 1,
-
24, 118, 1, 24, 127, 127, 1, 24,
-
128, 118, 118, 118, 1, 24, 118, 118,
-
118, 1, 24, 118, 56, 1, 24, 56,
-
118, 1, 24, 118, 56, 1, 24, 56,
-
51, 1, 24, 51, 1, 24, 118, 118,
-
1, 24, 118, 54, 1, 24, 54, 118,
-
1, 24, 118, 118, 127, 127, 1, 24,
-
118, 54, 1, 24, 54, 94, 128, 1,
-
24, 118, 118, 127, 1, 24, 128, 127,
-
127, 1, 24, 128, 118, 127, 127, 1,
-
24, 118, 56, 1, 24, 56, 128, 1,
-
24, 118, 118, 1, 24, 118, 127, 127,
-
1, 24, 118, 128, 127, 1, 24, 127,
-
127, 1, 24, 118, 56, 1, 24, 56,
-
128, 127, 1, 24, 56, 1, 24, 56,
-
118, 56, 1, 24, 56, 118, 118, 1,
-
24, 118, 50, 1, 24, 50, 56, 1,
-
24, 56, 118, 118, 1, 24, 118, 94,
-
118, 1, 24, 118, 118, 127, 127, 1,
-
24, 118, 50, 1, 24, 50, 94, 128,
-
1, 24, 118, 118, 127, 1, 24, 128,
-
118, 118, 118, 1, 24, 118, 118, 1,
-
24, 118, 118, 118, 1, 24, 118, 118,
-
1, 24, 118, 118, 118, 1, 24, 118,
-
118, 127, 127, 1, 24, 118, 118, 1,
-
24, 118, 118, 128, 127, 1, 24, 118,
-
118, 94, 118, 51, 1, 24, 51, 127,
-
127, 1, 24, 128, 1, 24, 127, 1,
-
24, 128, 127, 127, 1, 24, 128, 118,
-
127, 127, 1, 24, 118, 118, 1, 24,
-
118, 118, 118, 1, 24, 118, 118, 118,
-
1, 24, 118, 51, 1, 24, 51, 118,
-
1, 24, 118, 118, 118, 118, 128, 127,
-
1, 24, 118, 118, 1, 24, 118, 127,
-
127, 1, 24, 118, 128, 127, 1, 24,
-
127, 127, 1, 24, 118, 118, 1, 24,
-
118, 128, 127, 1, 24, 118, 1, 24,
-
118, 118, 94, 118, 56, 1, 24, 56,
-
127, 127, 1, 24, 128, 1, 24, 118,
-
94, 118, 56, 1, 24, 56, 127, 127,
-
1, 24, 128, 1, 24, 118, 118, 118,
-
1, 24, 118, 54, 1, 24, 54, 118,
-
1, 24, 118, 118, 127, 127, 1, 24,
-
118, 54, 1, 24, 54, 94, 128, 1,
-
24, 118, 118, 127, 1, 24, 128, 127,
-
127, 1, 24, 128, 118, 127, 127, 1,
-
24, 118, 56, 1, 24, 56, 128, 1,
-
24, 118, 118, 1, 24, 118, 127, 127,
-
1, 24, 118, 128, 127, 1, 24, 127,
-
127, 1, 24, 118, 56, 1, 24, 56,
-
128, 127, 1, 24, 56, 1, 24, 56,
-
118, 56, 1, 24, 56, 118, 118, 1,
-
24, 118, 50, 1, 24, 50, 56, 1,
-
24, 56, 118, 118, 1, 24, 118, 94,
-
118, 1, 24, 118, 118, 127, 127, 1,
-
24, 118, 50, 1, 24, 50, 94, 128,
-
1, 24, 118, 118, 127, 1, 24, 128,
-
118, 118, 118, 1, 24, 118, 118, 118,
-
1, 24, 1, 24, 118, 118, 1, 24,
-
118, 127, 127, 1, 24, 1, 24, 118,
-
128, 127, 1, 24, 118, 118, 94, 1,
-
24, 127, 127, 1, 24, 128, 1, 24,
-
127, 1, 24, 128, 127, 127, 1, 24,
-
128, 118, 127, 127, 1, 24, 1, 24,
-
1, 24, 118, 118, 1, 24, 1, 24,
-
118, 1, 24, 118, 118, 118, 128, 127,
-
1, 24, 1, 24, 127, 127, 1, 24,
-
128, 127, 1, 24, 127, 127, 1, 24,
-
1, 24, 128, 127, 1, 24, 1, 24,
-
118, 118, 1, 24, 94, 1, 24, 127,
-
127, 1, 24, 128, 1, 24, 118, 118,
-
118, 1, 24, 118, 54, 1, 24, 54,
-
118, 1, 24, 118, 118, 127, 127, 1,
-
24, 118, 54, 1, 24, 54, 94, 128,
-
1, 24, 118, 118, 127, 1, 24, 128,
-
127, 127, 1, 24, 128, 118, 127, 127,
-
1, 24, 118, 56, 1, 24, 56, 128,
-
1, 24, 118, 118, 1, 24, 118, 127,
-
127, 1, 24, 118, 128, 127, 1, 24,
-
127, 127, 1, 24, 118, 56, 1, 24,
-
56, 128, 127, 1, 24, 56, 1, 24,
-
56, 118, 56, 1, 24, 56, 118, 118,
-
1, 24, 118, 50, 1, 24, 50, 56,
-
1, 24, 56, 118, 118, 1, 24, 118,
-
94, 118, 1, 24, 118, 118, 127, 127,
-
1, 24, 118, 50, 1, 24, 50, 94,
-
128, 1, 24, 118, 118, 127, 1, 24,
-
128, 118, 118, 1, 24, 1, 24, 118,
-
118, 1, 24, 118, 94, 127, 127, 1,
-
24, 128, 1, 24, 127, 127, 1, 24,
-
128, 118, 127, 127, 1, 24, 1, 24,
-
1, 24, 118, 118, 1, 24, 118, 118,
-
128, 127, 1, 24, 1, 24, 127, 127,
-
1, 24, 128, 127, 1, 24, 127, 127,
-
1, 24, 1, 24, 128, 127, 1, 24,
-
1, 24, 118, 118, 1, 24, 94, 1,
-
24, 127, 127, 1, 24, 128, 1, 24,
-
118, 127, 127, 1, 24, 128, 118, 118,
-
118, 51, 51, 118, 118, 118, 118, 118,
-
118, 118, 118, 118, 118, 51, 51, 118,
-
118, 118, 118, 118, 118, 118, 118, 51,
-
51, 118, 118, 118, 118, 118, 118, 118,
-
51, 51, 118, 118, 118, 118, 118, 118,
-
118, 118, 118, 118, 118, 56, 56, 118,
-
118, 118, 118, 118, 118, 118, 118, 118,
-
118, 118, 118, 118, 118, 118, 118, 118,
-
118, 118, 118, 118, 118, 56, 56, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_address_lists_index_offsets
-
1
private :_address_lists_index_offsets, :_address_lists_index_offsets=
-
end
-
1
self._address_lists_index_offsets = [
-
0, 0, 119, 121, 146, 148, 173, 292,
-
294, 319, 447, 575, 577, 602, 731, 850,
-
969, 1088, 1090, 1115, 1234, 1353, 1472, 1474,
-
1499, 1618, 1675, 1677, 1702, 1759, 1878, 1880,
-
1905, 2024, 2081, 2083, 2108, 2165, 2167, 2192,
-
2194, 2219, 2221, 2246, 2365, 2484, 2486, 2511,
-
2513, 2538, 2657, 2776, 2778, 2803, 2922, 3041,
-
3043, 3068, 3187, 3189, 3214, 3342, 3470, 3472,
-
3497, 3626, 3745, 3864, 3983, 3985, 4010, 4129,
-
4248, 4367, 4369, 4394, 4513, 4570, 4572, 4597,
-
4654, 4773, 4775, 4800, 4919, 4976, 4978, 5003,
-
5060, 5112, 5114, 5139, 5191, 5310, 5429, 5431,
-
5456, 5584, 5712, 5714, 5739, 5858, 5977, 5979,
-
6004, 6123, 6242, 6361, 6363, 6388, 6507, 6626,
-
6628, 6653, 6772, 6774, 6799, 6918, 7037, 7039,
-
7064, 7183, 7185, 7210, 7338, 7466, 7468, 7493,
-
7622, 7741, 7860, 7979, 7981, 8006, 8125, 8244,
-
8363, 8365, 8390, 8509, 8566, 8568, 8593, 8650,
-
8769, 8771, 8796, 8915, 8972, 8974, 8999, 9056,
-
9108, 9110, 9135, 9187, 9306, 9425, 9427, 9452,
-
9580, 9708, 9710, 9735, 9854, 9973, 9975, 10000,
-
10119, 10238, 10357, 10359, 10384, 10503, 10622, 10624,
-
10649, 10768, 10887, 11006, 11008, 11033, 11152, 11271,
-
11273, 11298, 11417, 11536, 11655, 11657, 11682, 11801,
-
11920, 12048, 12176, 12178, 12203, 12322, 12441, 12443,
-
12468, 12587, 12706, 12835, 12963, 12965, 12990, 13109,
-
13228, 13323, 13442, 13494, 13496, 13521, 13573, 13701,
-
13829, 13831, 13856, 13985, 13987, 14012, 14140, 14142,
-
14167, 14296, 14424, 14552, 14554, 14579, 14708, 14827,
-
14946, 15065, 15067, 15092, 15211, 15339, 15467, 15469,
-
15494, 15623, 15751, 15753, 15778, 15897, 16016, 16018,
-
16043, 16162, 16281, 16400, 16402, 16427, 16546, 16598,
-
16600, 16625, 16677, 16796, 16798, 16823, 16942, 17061,
-
17180, 17299, 17418, 17537, 17539, 17564, 17683, 17811,
-
17939, 17941, 17966, 18085, 18204, 18333, 18461, 18463,
-
18488, 18617, 18745, 18747, 18772, 18891, 18893, 18918,
-
19037, 19156, 19251, 19370, 19427, 19429, 19454, 19511,
-
19639, 19767, 19769, 19794, 19923, 19925, 19950, 20069,
-
20188, 20307, 20309, 20334, 20453, 20508, 20510, 20535,
-
20590, 20709, 20711, 20736, 20855, 20974, 21102, 21230,
-
21232, 21257, 21376, 21431, 21433, 21458, 21513, 21608,
-
21737, 21739, 21764, 21883, 22002, 22130, 22132, 22157,
-
22286, 22414, 22542, 22544, 22569, 22698, 22817, 22945,
-
23073, 23075, 23100, 23219, 23276, 23278, 23303, 23360,
-
23489, 23491, 23516, 23635, 23754, 23756, 23781, 23900,
-
24028, 24156, 24158, 24183, 24302, 24431, 24559, 24561,
-
24586, 24714, 24842, 24844, 24869, 24988, 25045, 25047,
-
25072, 25129, 25258, 25386, 25388, 25413, 25470, 25472,
-
25497, 25554, 25673, 25730, 25732, 25757, 25814, 25933,
-
26052, 26054, 26079, 26198, 26249, 26251, 26276, 26327,
-
26384, 26386, 26411, 26468, 26587, 26706, 26708, 26733,
-
26852, 26947, 27066, 27068, 27093, 27212, 27331, 27459,
-
27587, 27589, 27614, 27733, 27784, 27786, 27811, 27862,
-
27957, 28086, 28088, 28113, 28232, 28351, 28479, 28481,
-
28506, 28635, 28754, 28873, 28875, 28900, 29019, 29138,
-
29140, 29165, 29284, 29403, 29522, 29524, 29549, 29668,
-
29787, 29915, 30043, 30045, 30070, 30189, 30308, 30310,
-
30335, 30454, 30573, 30702, 30830, 30832, 30857, 30976,
-
31095, 31190, 31309, 31361, 31363, 31388, 31440, 31568,
-
31696, 31698, 31723, 31852, 31854, 31879, 32007, 32009,
-
32034, 32163, 32291, 32419, 32421, 32446, 32575, 32694,
-
32813, 32932, 32934, 32959, 33078, 33206, 33334, 33336,
-
33361, 33490, 33618, 33620, 33645, 33764, 33883, 33885,
-
33910, 34029, 34148, 34267, 34269, 34294, 34413, 34465,
-
34467, 34492, 34544, 34663, 34665, 34690, 34809, 34928,
-
35047, 35166, 35285, 35404, 35406, 35431, 35550, 35678,
-
35806, 35808, 35833, 35952, 36071, 36200, 36328, 36330,
-
36355, 36484, 36612, 36614, 36639, 36758, 36760, 36785,
-
36904, 37023, 37142, 37261, 37263, 37288, 37407, 37526,
-
37528, 37553, 37672, 37674, 37699, 37827, 37955, 37957,
-
37982, 38111, 38230, 38349, 38468, 38470, 38495, 38614,
-
38733, 38852, 38854, 38879, 38998, 39055, 39057, 39082,
-
39139, 39258, 39260, 39285, 39404, 39461, 39463, 39488,
-
39545, 39597, 39599, 39624, 39676, 39678, 39703, 39822,
-
39941, 39943, 39968, 40087, 40142, 40144, 40169, 40224,
-
40343, 40345, 40370, 40489, 40608, 40736, 40864, 40866,
-
40891, 41010, 41065, 41067, 41092, 41147, 41242, 41371,
-
41373, 41398, 41517, 41636, 41764, 41766, 41791, 41920,
-
42048, 42176, 42178, 42203, 42332, 42451, 42579, 42707,
-
42709, 42734, 42853, 42910, 42912, 42937, 42994, 43123,
-
43125, 43150, 43269, 43388, 43390, 43415, 43534, 43662,
-
43790, 43792, 43817, 43936, 44065, 44193, 44195, 44220,
-
44348, 44476, 44478, 44503, 44622, 44679, 44681, 44706,
-
44763, 44892, 45020, 45022, 45047, 45104, 45106, 45131,
-
45188, 45307, 45364, 45366, 45391, 45448, 45567, 45686,
-
45688, 45713, 45832, 45883, 45885, 45910, 45961, 46018,
-
46020, 46045, 46102, 46221, 46340, 46342, 46367, 46486,
-
46581, 46700, 46702, 46727, 46846, 46965, 47093, 47221,
-
47223, 47248, 47367, 47418, 47420, 47445, 47496, 47591,
-
47720, 47722, 47747, 47866, 47985, 48113, 48115, 48140,
-
48269, 48388, 48507, 48626, 48628, 48653, 48772, 48891,
-
48893, 48918, 49037, 49156, 49275, 49277, 49302, 49421,
-
49540, 49542, 49567, 49686, 49805, 49924, 49926, 49951,
-
50070, 50189, 50317, 50445, 50447, 50472, 50591, 50710,
-
50712, 50737, 50856, 50975, 51104, 51232, 51234, 51259,
-
51378, 51497, 51592, 51711, 51763, 51765, 51790, 51842,
-
51970, 52098, 52100, 52125, 52254, 52256, 52281, 52409,
-
52411, 52436, 52565, 52693, 52821, 52823, 52848, 52977,
-
53096, 53224, 53352, 53354, 53379, 53498, 53617, 53619,
-
53644, 53763, 53882, 54001, 54003, 54028, 54147, 54266,
-
54385, 54387, 54412, 54531, 54583, 54585, 54610, 54662,
-
54781, 54783, 54808, 54927, 55046, 55165, 55284, 55413,
-
55541, 55543, 55568, 55687, 55806, 55808, 55833, 55952,
-
56080, 56208, 56210, 56235, 56354, 56483, 56611, 56613,
-
56638, 56766, 56894, 56896, 56921, 57040, 57159, 57161,
-
57186, 57305, 57434, 57562, 57564, 57589, 57708, 57710,
-
57735, 57854, 57973, 58068, 58187, 58244, 58246, 58271,
-
58328, 58456, 58584, 58586, 58611, 58740, 58742, 58767,
-
58886, 58981, 59100, 59157, 59159, 59184, 59241, 59369,
-
59497, 59499, 59524, 59653, 59655, 59680, 59799, 59918,
-
60037, 60039, 60064, 60183, 60238, 60240, 60265, 60320,
-
60439, 60441, 60466, 60585, 60704, 60832, 60960, 60962,
-
60987, 61106, 61161, 61163, 61188, 61243, 61338, 61467,
-
61469, 61494, 61613, 61732, 61860, 61862, 61887, 62016,
-
62144, 62272, 62274, 62299, 62428, 62547, 62675, 62803,
-
62805, 62830, 62949, 63006, 63008, 63033, 63090, 63219,
-
63221, 63246, 63365, 63484, 63486, 63511, 63630, 63758,
-
63886, 63888, 63913, 64032, 64161, 64289, 64291, 64316,
-
64444, 64572, 64574, 64599, 64718, 64775, 64777, 64802,
-
64859, 64988, 65116, 65118, 65143, 65200, 65202, 65227,
-
65284, 65403, 65460, 65462, 65487, 65544, 65663, 65782,
-
65784, 65809, 65928, 65979, 65981, 66006, 66057, 66114,
-
66116, 66141, 66198, 66317, 66436, 66438, 66463, 66582,
-
66677, 66796, 66798, 66823, 66942, 67061, 67189, 67317,
-
67319, 67344, 67463, 67514, 67516, 67541, 67592, 67687,
-
67816, 67818, 67843, 67962, 68081, 68209, 68211, 68236,
-
68365, 68484, 68603, 68722, 68724, 68749, 68868, 68987,
-
69106, 69108, 69133, 69135, 69160, 69279, 69398, 69400,
-
69425, 69544, 69672, 69800, 69802, 69827, 69829, 69854,
-
69973, 70102, 70230, 70232, 70257, 70376, 70495, 70590,
-
70592, 70617, 70745, 70873, 70875, 70900, 71029, 71031,
-
71056, 71184, 71186, 71211, 71340, 71468, 71596, 71598,
-
71623, 71752, 71871, 71999, 72127, 72129, 72154, 72156,
-
72181, 72183, 72208, 72327, 72446, 72448, 72473, 72475,
-
72500, 72619, 72621, 72646, 72765, 72884, 73003, 73132,
-
73260, 73262, 73287, 73289, 73314, 73442, 73570, 73572,
-
73597, 73726, 73854, 73856, 73881, 74009, 74137, 74139,
-
74164, 74166, 74191, 74320, 74448, 74450, 74475, 74477,
-
74502, 74621, 74740, 74742, 74767, 74862, 74864, 74889,
-
75017, 75145, 75147, 75172, 75301, 75303, 75328, 75447,
-
75566, 75685, 75687, 75712, 75831, 75886, 75888, 75913,
-
75968, 76087, 76089, 76114, 76233, 76352, 76480, 76608,
-
76610, 76635, 76754, 76809, 76811, 76836, 76891, 76986,
-
77115, 77117, 77142, 77261, 77380, 77508, 77510, 77535,
-
77664, 77792, 77920, 77922, 77947, 78076, 78195, 78323,
-
78451, 78453, 78478, 78597, 78654, 78656, 78681, 78738,
-
78867, 78869, 78894, 79013, 79132, 79134, 79159, 79278,
-
79406, 79534, 79536, 79561, 79680, 79809, 79937, 79939,
-
79964, 80092, 80220, 80222, 80247, 80366, 80423, 80425,
-
80450, 80507, 80636, 80764, 80766, 80791, 80848, 80850,
-
80875, 80932, 81051, 81108, 81110, 81135, 81192, 81311,
-
81430, 81432, 81457, 81576, 81627, 81629, 81654, 81705,
-
81762, 81764, 81789, 81846, 81965, 82084, 82086, 82111,
-
82230, 82325, 82444, 82446, 82471, 82590, 82709, 82837,
-
82965, 82967, 82992, 83111, 83162, 83164, 83189, 83240,
-
83335, 83464, 83466, 83491, 83610, 83729, 83857, 83859,
-
83884, 84013, 84132, 84251, 84253, 84278, 84280, 84305,
-
84424, 84543, 84545, 84570, 84689, 84784, 84912, 85040,
-
85042, 85067, 85196, 85198, 85223, 85351, 85479, 85481,
-
85506, 85635, 85754, 85882, 86010, 86012, 86037, 86039,
-
86064, 86066, 86091, 86210, 86329, 86331, 86356, 86475,
-
86594, 86723, 86851, 86853, 86878, 86880, 86905, 87033,
-
87161, 87163, 87188, 87317, 87445, 87447, 87472, 87600,
-
87728, 87730, 87755, 87757, 87782, 87911, 88039, 88041,
-
88066, 88068, 88093, 88212, 88331, 88333, 88358, 88453,
-
88455, 88480, 88608, 88736, 88738, 88763, 88892, 88894,
-
88919, 89038, 89166, 89294, 89296, 89321, 89450, 89569,
-
89688, 89807, 89859, 89911, 90030, 90149, 90268, 90387,
-
90506, 90625, 90744, 90863, 90982, 91101, 91153, 91205,
-
91324, 91443, 91562, 91681, 91800, 91919, 92038, 92157,
-
92209, 92261, 92380, 92499, 92618, 92737, 92856, 92975,
-
93094, 93146, 93198, 93317, 93436, 93555, 93674, 93793,
-
93912, 94031, 94150, 94269, 94388, 94507, 94564, 94621,
-
94740, 94859, 94978, 95097, 95216, 95335, 95454, 95573,
-
95692, 95811, 95930, 96049, 96168, 96287, 96406, 96525,
-
96644, 96763, 96882, 97001, 97120, 97239, 97296, 97353
-
]
-
-
1
class << self
-
1
attr_accessor :_address_lists_indicies
-
1
private :_address_lists_indicies, :_address_lists_indicies=
-
end
-
1
self._address_lists_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
3, 4, 3, 3, 3, 3, 3, 5,
-
1, 3, 3, 6, 3, 7, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 6, 8, 3, 1, 3, 1,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 9,
-
1, 0, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
0, 1, 10, 1, 11, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 11, 1, 12, 1, 1,
-
1, 13, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 12, 14, 15, 14,
-
14, 14, 14, 14, 16, 1, 14, 14,
-
1, 14, 17, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 18, 1,
-
19, 14, 1, 14, 17, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 1,
-
1, 1, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 1, 20, 1, 14, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 14, 1, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
1, 21, 21, 22, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
23, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 24, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 1, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
1, 25, 25, 26, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
27, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 28, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 25, 25,
-
25, 25, 25, 25, 25, 25, 1, 29,
-
1, 25, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
25, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 25, 30, 1, 1, 1, 31,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 30, 32, 33, 32, 32, 32,
-
32, 32, 34, 1, 32, 32, 1, 32,
-
35, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 36, 1, 37, 32,
-
1, 32, 35, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 1, 1,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 38, 1, 1, 1, 39, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 38, 14, 15, 14, 14, 14, 14,
-
14, 40, 1, 14, 14, 1, 14, 17,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 18, 1, 19, 14, 1,
-
14, 17, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 1, 1, 1, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
1, 41, 1, 1, 1, 42, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
41, 14, 15, 14, 14, 14, 14, 14,
-
43, 1, 14, 14, 1, 14, 1, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 1, 8, 14, 1, 14,
-
1, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 1, 1, 1, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 1,
-
44, 1, 41, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 41, 1, 45, 1, 1, 1, 46,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 45, 32, 33, 32, 32, 32,
-
32, 32, 47, 1, 32, 32, 1, 32,
-
1, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 1, 1, 48, 32,
-
1, 32, 1, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 1, 1,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 49, 1, 1, 1, 50, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 49, 51, 52, 51, 51, 51, 51,
-
51, 53, 1, 51, 51, 54, 51, 55,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 1, 1, 1, 51, 1,
-
51, 56, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 1, 1, 1, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
1, 57, 1, 1, 1, 58, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
57, 51, 52, 51, 51, 51, 51, 51,
-
59, 1, 51, 51, 60, 51, 55, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 1, 1, 1, 51, 1, 51,
-
61, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 1, 1, 1, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 1,
-
62, 1, 57, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 57, 1, 63, 1, 1, 1, 64,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 63, 65, 66, 65, 65, 65,
-
65, 65, 67, 1, 65, 65, 1, 65,
-
68, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 1, 1, 1, 65,
-
69, 65, 70, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 1, 1, 1,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 1, 71, 1, 1, 1, 72, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 71, 1, 1, 1, 1, 1, 1,
-
1, 73, 1, 1, 1, 1, 1, 74,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 75,
-
1, 76, 1, 77, 1, 71, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 71, 1, 78, 1,
-
1, 1, 79, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 78, 1, 1,
-
1, 1, 1, 1, 1, 80, 1, 1,
-
1, 1, 1, 81, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 82, 1, 83, 1, 74,
-
1, 1, 1, 84, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 74, 85,
-
86, 85, 85, 85, 85, 85, 87, 1,
-
85, 85, 1, 85, 1, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
1, 1, 1, 85, 1, 85, 1, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 1, 1, 1, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 1, 88, 1,
-
74, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 74,
-
1, 89, 1, 1, 1, 90, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
89, 85, 1, 85, 85, 85, 85, 85,
-
91, 1, 85, 85, 1, 85, 74, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 1, 1, 1, 85, 75, 85,
-
92, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 1, 1, 1, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 1,
-
89, 1, 1, 1, 90, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 89,
-
1, 1, 1, 1, 1, 1, 1, 91,
-
1, 1, 1, 1, 1, 74, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 75, 1, 92,
-
1, 93, 1, 89, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 89, 1, 94, 1, 1, 1,
-
95, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 94, 1, 1, 1, 1,
-
1, 1, 1, 96, 1, 1, 1, 1,
-
1, 81, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 82, 1, 97, 1, 98, 1, 75,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 75, 1,
-
99, 1, 6, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 6, 1, 100, 1, 101, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 101, 1, 102, 1,
-
1, 1, 103, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 102, 104, 105,
-
104, 104, 104, 104, 104, 106, 1, 104,
-
104, 1, 104, 17, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 18,
-
1, 19, 104, 1, 104, 17, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
1, 1, 1, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 1, 107, 1, 1,
-
1, 108, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 107, 104, 105, 104,
-
104, 104, 104, 104, 109, 1, 104, 104,
-
1, 104, 1, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 1, 1,
-
8, 104, 1, 104, 1, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 1,
-
1, 1, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 1, 110, 1, 107, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 107, 1, 111,
-
1, 112, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
112, 1, 113, 1, 1, 1, 114, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 113, 115, 116, 115, 115, 115, 115,
-
115, 117, 1, 115, 115, 118, 115, 119,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 1, 120, 121, 115, 1,
-
115, 122, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 1, 1, 1, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
1, 123, 1, 1, 1, 124, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
123, 125, 126, 125, 125, 125, 125, 125,
-
127, 1, 125, 125, 118, 125, 128, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 1, 120, 129, 125, 1, 125,
-
1, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 1, 1, 1, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 1,
-
130, 1, 123, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 123, 1, 131, 1, 1, 1, 132,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 131, 133, 134, 133, 133, 133,
-
133, 133, 135, 1, 133, 133, 136, 133,
-
137, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 1, 138, 139, 133,
-
1, 133, 140, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 1, 1, 1,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 1, 141, 1, 1, 1, 142, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 141, 143, 144, 143, 143, 143, 143,
-
143, 145, 1, 143, 143, 146, 143, 147,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 1, 148, 139, 143, 1,
-
143, 149, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 1, 1, 1, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
1, 150, 1, 151, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 151, 1, 152, 1, 1, 1,
-
153, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 152, 143, 144, 143, 143,
-
143, 143, 143, 154, 1, 143, 143, 1,
-
143, 155, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 1, 1, 139,
-
143, 1, 143, 155, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 1, 1,
-
1, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 1, 156, 1, 143, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 143, 1, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 1,
-
157, 157, 158, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 159,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 160, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 1, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 1,
-
161, 161, 162, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 163,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 164, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 1, 165, 1,
-
161, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 161,
-
1, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 161, 161, 161, 161, 161,
-
161, 1, 166, 1, 1, 1, 167, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 166, 168, 169, 168, 168, 168, 168,
-
168, 170, 1, 168, 168, 1, 168, 171,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 1, 1, 172, 168, 1,
-
168, 171, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 1, 1, 1, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
1, 173, 1, 1, 1, 174, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
173, 143, 144, 143, 143, 143, 143, 143,
-
175, 1, 143, 143, 1, 143, 155, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 1, 1, 139, 143, 1, 143,
-
155, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 1, 1, 1, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 1,
-
176, 1, 1, 1, 177, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 176,
-
143, 144, 143, 143, 143, 143, 143, 178,
-
1, 143, 143, 1, 143, 1, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 1, 1, 129, 143, 1, 143, 1,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 1, 1, 1, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 1, 179,
-
1, 176, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
176, 1, 180, 1, 1, 1, 181, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 180, 168, 169, 168, 168, 168, 168,
-
168, 182, 1, 168, 168, 1, 168, 1,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 1, 1, 183, 168, 1,
-
168, 1, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 1, 1, 1, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
1, 184, 1, 1, 1, 185, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
184, 186, 187, 186, 186, 186, 186, 186,
-
188, 1, 186, 186, 189, 186, 190, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 1, 1, 1, 186, 1, 186,
-
191, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 1, 1, 1, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 1,
-
192, 1, 1, 1, 193, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 192,
-
186, 187, 186, 186, 186, 186, 186, 194,
-
1, 186, 186, 195, 186, 190, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 1, 1, 1, 186, 1, 186, 196,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 1, 1, 1, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 1, 197,
-
1, 192, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
192, 1, 198, 1, 1, 1, 199, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 198, 200, 201, 200, 200, 200, 200,
-
200, 202, 1, 200, 200, 1, 200, 203,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 1, 1, 1, 200, 204,
-
200, 205, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 1, 1, 1, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
1, 206, 1, 1, 1, 207, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
206, 1, 1, 1, 1, 1, 1, 1,
-
208, 1, 1, 1, 1, 1, 209, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 210, 1,
-
211, 1, 212, 1, 206, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 206, 1, 213, 1, 1,
-
1, 214, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 213, 1, 1, 1,
-
1, 1, 1, 1, 215, 1, 1, 1,
-
1, 1, 216, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 217, 1, 218, 1, 209, 1,
-
1, 1, 219, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 209, 220, 221,
-
220, 220, 220, 220, 220, 222, 1, 220,
-
220, 1, 220, 1, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 1,
-
1, 1, 220, 1, 220, 1, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
1, 1, 1, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 1, 223, 1, 209,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 209, 1,
-
224, 1, 1, 1, 225, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 224,
-
220, 1, 220, 220, 220, 220, 220, 226,
-
1, 220, 220, 1, 220, 209, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 1, 1, 1, 220, 210, 220, 227,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 1, 1, 1, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 1, 224,
-
1, 1, 1, 225, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 224, 1,
-
1, 1, 1, 1, 1, 1, 226, 1,
-
1, 1, 1, 1, 209, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 210, 1, 227, 1,
-
228, 1, 224, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 224, 1, 229, 1, 1, 1, 230,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 229, 1, 1, 1, 1, 1,
-
1, 1, 231, 1, 1, 1, 1, 1,
-
216, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
217, 1, 232, 1, 210, 1, 1, 1,
-
233, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 210, 1, 1, 1, 1,
-
1, 1, 1, 234, 1, 1, 1, 235,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 236, 1,
-
237, 1, 210, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 210, 1, 217, 1, 1, 1, 238,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 217, 1, 1, 1, 1, 1,
-
1, 1, 239, 1, 1, 1, 240, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 241, 1, 242,
-
1, 1, 1, 243, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 242, 115,
-
116, 115, 115, 115, 115, 115, 244, 1,
-
115, 115, 245, 115, 119, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
1, 120, 121, 115, 1, 115, 122, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 1, 1, 1, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 1, 246, 1,
-
1, 1, 247, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 246, 125, 126,
-
125, 125, 125, 125, 125, 248, 1, 125,
-
125, 245, 125, 128, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 1,
-
120, 129, 125, 1, 125, 1, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
1, 1, 1, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 125, 125, 125, 125,
-
125, 125, 125, 125, 1, 249, 1, 246,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 246, 1,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
251, 1, 250, 250, 252, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 251,
-
250, 253, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 254, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 250,
-
250, 250, 250, 250, 250, 250, 250, 1,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 1, 255, 255, 256, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 257, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 258, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 1,
-
259, 1, 255, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 255, 1, 260, 1, 1, 1, 261,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 260, 262, 134, 262, 262, 262,
-
262, 262, 263, 1, 262, 262, 264, 262,
-
137, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 1, 265, 139, 262,
-
1, 262, 266, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 1, 1, 1,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 1, 267, 1, 1, 1, 268, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 267, 143, 144, 143, 143, 143, 143,
-
143, 269, 1, 143, 143, 270, 143, 147,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 1, 271, 139, 143, 1,
-
143, 272, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 1, 1, 1, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
1, 273, 1, 274, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 274, 1, 275, 1, 1, 1,
-
276, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 275, 168, 169, 168, 168,
-
168, 168, 168, 277, 1, 168, 168, 278,
-
168, 279, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 1, 280, 172,
-
168, 1, 168, 281, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 1, 1,
-
1, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 1, 282, 1, 1, 1, 283,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 282, 284, 285, 284, 284, 284,
-
284, 284, 286, 1, 284, 284, 1, 284,
-
155, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 1, 1, 139, 284,
-
1, 284, 155, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 1, 1, 1,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 1, 287, 1, 1, 1, 288, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 287, 284, 285, 284, 284, 284, 284,
-
284, 289, 1, 284, 284, 1, 284, 1,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 1, 1, 129, 284, 1,
-
284, 1, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 1, 1, 1, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
1, 290, 1, 287, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 287, 1, 291, 1, 1, 1,
-
292, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 291, 284, 144, 284, 284,
-
284, 284, 284, 293, 1, 284, 284, 235,
-
284, 147, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 1, 236, 139,
-
284, 1, 284, 294, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 1, 1,
-
1, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 1, 291, 1, 1, 1, 292,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 291, 143, 144, 143, 143, 143,
-
143, 143, 293, 1, 143, 143, 235, 143,
-
147, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 1, 236, 139, 143,
-
1, 143, 294, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 1, 1, 1,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 1, 295, 1, 296, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 296, 1, 297, 1, 1,
-
1, 298, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 297, 168, 169, 168,
-
168, 168, 168, 168, 299, 1, 168, 168,
-
240, 168, 279, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 1, 241,
-
172, 168, 1, 168, 300, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 1,
-
1, 1, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 1, 301, 1, 302, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 302, 1, 303,
-
1, 1, 1, 304, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 303, 305,
-
306, 305, 305, 305, 305, 305, 307, 1,
-
305, 305, 308, 305, 309, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
1, 138, 310, 305, 1, 305, 311, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 1, 1, 1, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 1, 312, 1,
-
1, 1, 313, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 312, 314, 315,
-
314, 314, 314, 314, 314, 316, 1, 314,
-
314, 317, 314, 318, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 1,
-
148, 310, 314, 1, 314, 319, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
1, 1, 1, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 1, 320, 1, 321,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 321, 1,
-
322, 1, 1, 1, 323, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 322,
-
314, 315, 314, 314, 314, 314, 314, 324,
-
1, 314, 314, 1, 314, 325, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 1, 1, 310, 314, 1, 314, 325,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 1, 1, 1, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 1, 326,
-
1, 314, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
314, 1, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 1, 327, 327, 328, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 329, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 330, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 327, 327, 327, 327, 327, 327, 327,
-
327, 1, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 1, 331, 331, 332, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 333, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 334, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 331, 331, 331, 331, 331, 331, 331,
-
331, 1, 335, 1, 331, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 331, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 331, 336, 1,
-
1, 1, 337, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 336, 338, 339,
-
338, 338, 338, 338, 338, 340, 1, 338,
-
338, 1, 338, 341, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 1,
-
1, 342, 338, 1, 338, 341, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
1, 1, 1, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 1, 343, 1, 1,
-
1, 344, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 343, 314, 315, 314,
-
314, 314, 314, 314, 345, 1, 314, 314,
-
1, 314, 325, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 1, 1,
-
310, 314, 1, 314, 325, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 1,
-
1, 1, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 1, 346, 1, 1, 1,
-
347, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 346, 314, 315, 314, 314,
-
314, 314, 314, 348, 1, 314, 314, 1,
-
314, 1, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 1, 1, 349,
-
314, 1, 314, 1, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 1, 1,
-
1, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 1, 350, 1, 346, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 346, 1, 351, 1,
-
1, 1, 352, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 351, 338, 339,
-
338, 338, 338, 338, 338, 353, 1, 338,
-
338, 1, 338, 1, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 1,
-
1, 354, 338, 1, 338, 1, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
1, 1, 1, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 1, 355, 1, 1,
-
1, 356, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 355, 357, 358, 357,
-
357, 357, 357, 357, 359, 1, 357, 357,
-
360, 357, 361, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 1, 1,
-
1, 357, 1, 357, 362, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 1,
-
1, 1, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 1, 363, 1, 1, 1,
-
364, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 363, 357, 358, 357, 357,
-
357, 357, 357, 365, 1, 357, 357, 366,
-
357, 361, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 1, 1, 1,
-
357, 1, 357, 367, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 1, 1,
-
1, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 1, 368, 1, 363, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 363, 1, 369, 1,
-
1, 1, 370, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 369, 371, 372,
-
371, 371, 371, 371, 371, 373, 1, 371,
-
371, 1, 371, 374, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 1,
-
1, 1, 371, 375, 371, 376, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
1, 1, 1, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 1, 377, 1, 1,
-
1, 378, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 377, 1, 1, 1,
-
1, 1, 1, 1, 379, 1, 1, 1,
-
1, 1, 380, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 381, 1, 382, 1, 383, 1,
-
377, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 377,
-
1, 384, 1, 1, 1, 385, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
384, 1, 1, 1, 1, 1, 1, 1,
-
386, 1, 1, 1, 1, 1, 387, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 388, 1,
-
389, 1, 380, 1, 1, 1, 390, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 380, 391, 392, 391, 391, 391, 391,
-
391, 393, 1, 391, 391, 1, 391, 1,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 1, 1, 1, 391, 1,
-
391, 1, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 1, 1, 1, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
1, 394, 1, 380, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 380, 1, 395, 1, 1, 1,
-
396, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 395, 391, 1, 391, 391,
-
391, 391, 391, 397, 1, 391, 391, 1,
-
391, 380, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 1, 1, 1,
-
391, 381, 391, 398, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 1, 1,
-
1, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 1, 395, 1, 1, 1, 396,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 395, 1, 1, 1, 1, 1,
-
1, 1, 397, 1, 1, 1, 1, 1,
-
380, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
381, 1, 398, 1, 399, 1, 395, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 395, 1, 400,
-
1, 1, 1, 401, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 400, 1,
-
1, 1, 1, 1, 1, 1, 402, 1,
-
1, 1, 1, 1, 387, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 388, 1, 403, 1,
-
381, 1, 1, 1, 404, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 381,
-
1, 1, 1, 1, 1, 1, 1, 405,
-
1, 1, 1, 406, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 236, 1, 407, 1, 381, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 381, 1, 388,
-
1, 1, 1, 408, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 388, 1,
-
1, 1, 1, 1, 1, 1, 409, 1,
-
1, 1, 410, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 241, 1, 411, 1, 1, 1, 412,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 411, 413, 414, 413, 413, 413,
-
413, 413, 415, 1, 413, 413, 1, 413,
-
416, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 1, 1, 417, 413,
-
1, 413, 418, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 1, 1, 1,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 1, 419, 1, 1, 1, 420, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 419, 421, 422, 421, 421, 421, 421,
-
421, 423, 1, 421, 421, 1, 421, 424,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 1, 1, 349, 421, 1,
-
421, 1, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 1, 1, 1, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
1, 425, 1, 419, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 419, 1, 426, 426, 426, 426,
-
426, 426, 426, 426, 427, 1, 426, 426,
-
428, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 427, 426, 429, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 430,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 426, 426, 426, 426, 426,
-
426, 426, 426, 1, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 1, 431, 431,
-
432, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 433, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 434,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 1, 435, 1, 431, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 431, 1, 436,
-
1, 1, 1, 437, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 436, 438,
-
306, 438, 438, 438, 438, 438, 439, 1,
-
438, 438, 440, 438, 309, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
1, 265, 310, 438, 1, 438, 441, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 1, 1, 1, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 1, 442, 1,
-
1, 1, 443, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 442, 314, 315,
-
314, 314, 314, 314, 314, 444, 1, 314,
-
314, 445, 314, 318, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 1,
-
271, 310, 314, 1, 314, 446, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
1, 1, 1, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 1, 447, 1, 448,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 448, 1,
-
449, 1, 1, 1, 450, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 449,
-
338, 339, 338, 338, 338, 338, 338, 451,
-
1, 338, 338, 452, 338, 453, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 1, 280, 342, 338, 1, 338, 454,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 1, 1, 1, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 1, 455,
-
1, 1, 1, 456, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 455, 457,
-
458, 457, 457, 457, 457, 457, 459, 1,
-
457, 457, 1, 457, 325, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
1, 1, 310, 457, 1, 457, 325, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 1, 1, 1, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 1, 460, 1,
-
1, 1, 461, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 460, 457, 458,
-
457, 457, 457, 457, 457, 462, 1, 457,
-
457, 1, 457, 1, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 1,
-
1, 349, 457, 1, 457, 1, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
1, 1, 1, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 1, 463, 1, 460,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 460, 1,
-
464, 1, 1, 1, 465, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 464,
-
457, 315, 457, 457, 457, 457, 457, 466,
-
1, 457, 457, 406, 457, 318, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 1, 236, 310, 457, 1, 457, 467,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 1, 1, 1, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 1, 464,
-
1, 1, 1, 465, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 464, 314,
-
315, 314, 314, 314, 314, 314, 466, 1,
-
314, 314, 406, 314, 318, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
1, 236, 310, 314, 1, 314, 467, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 1, 1, 1, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 1, 468, 1,
-
469, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 469,
-
1, 470, 1, 1, 1, 471, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
470, 338, 339, 338, 338, 338, 338, 338,
-
472, 1, 338, 338, 410, 338, 453, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 1, 241, 342, 338, 1, 338,
-
473, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 1, 1, 1, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 1,
-
474, 1, 1, 1, 475, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 474,
-
476, 477, 476, 476, 476, 476, 476, 478,
-
1, 476, 476, 1, 476, 479, 476, 476,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 1, 1, 310, 476, 1, 476, 325,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 476, 480, 1, 1, 476, 476, 476,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 476, 476, 476, 476, 476, 476, 476,
-
476, 476, 476, 476, 476, 476, 1, 481,
-
1, 1, 1, 482, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 481, 483,
-
484, 483, 483, 483, 483, 483, 485, 1,
-
483, 483, 1, 483, 486, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
1, 1, 349, 483, 1, 483, 1, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 487, 1, 1, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 1, 488, 1,
-
481, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 481,
-
1, 489, 1, 1, 1, 490, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
489, 483, 484, 483, 483, 483, 483, 483,
-
491, 1, 483, 483, 492, 483, 493, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 1, 494, 310, 483, 1, 483,
-
325, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 1, 1, 1, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 1,
-
489, 1, 1, 1, 490, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 489,
-
314, 315, 314, 314, 314, 314, 314, 491,
-
1, 314, 314, 492, 314, 495, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 1, 494, 310, 314, 1, 314, 325,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 1, 1, 1, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 1, 496,
-
1, 497, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
497, 1, 498, 1, 1, 1, 499, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 498, 338, 339, 338, 338, 338, 338,
-
338, 500, 1, 338, 338, 501, 338, 502,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 1, 503, 342, 338, 1,
-
338, 341, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 1, 1, 1, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
1, 504, 1, 1, 1, 505, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
504, 506, 315, 506, 506, 506, 506, 506,
-
507, 1, 506, 506, 1, 506, 325, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 1, 1, 310, 506, 1, 506,
-
325, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 1, 1, 1, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 1,
-
508, 1, 1, 1, 509, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 508,
-
506, 315, 506, 506, 506, 506, 506, 510,
-
1, 506, 506, 1, 506, 1, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 1, 1, 349, 506, 1, 506, 1,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 1, 1, 1, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 1, 511,
-
1, 508, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
508, 1, 489, 1, 1, 1, 490, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 489, 506, 315, 506, 506, 506, 506,
-
506, 491, 1, 506, 506, 492, 506, 495,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 1, 494, 310, 506, 1,
-
506, 325, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 1, 1, 1, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
506, 506, 506, 506, 506, 506, 506, 506,
-
1, 512, 1, 1, 1, 513, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
512, 514, 339, 514, 514, 514, 514, 514,
-
515, 1, 514, 514, 1, 514, 1, 514,
-
514, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 1, 1, 354, 514, 1, 514,
-
1, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 514, 1, 1, 1, 514, 514,
-
514, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 514, 514, 514, 514, 514, 514,
-
514, 514, 514, 514, 514, 514, 514, 1,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
517, 1, 516, 516, 518, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 517,
-
516, 329, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 519, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 516,
-
516, 516, 516, 516, 516, 516, 516, 1,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 1, 520, 520, 521, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 522, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 523, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 1,
-
524, 1, 520, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 520, 1, 525, 1, 1, 1, 526,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 525, 527, 484, 527, 527, 527,
-
527, 527, 528, 1, 527, 527, 492, 527,
-
529, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 1, 494, 310, 527,
-
1, 527, 325, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 1, 1, 1,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 1, 525, 1, 1, 1, 526, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 525, 314, 315, 314, 314, 314, 314,
-
314, 528, 1, 314, 314, 492, 314, 325,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 1, 494, 310, 314, 1,
-
314, 325, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 1, 1, 1, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
1, 530, 1, 531, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 531, 1, 532, 1, 1, 1,
-
533, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 532, 338, 339, 338, 338,
-
338, 338, 338, 534, 1, 338, 338, 501,
-
338, 341, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 1, 503, 342,
-
338, 1, 338, 341, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 1, 1,
-
1, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 1, 343, 1, 1, 1, 344,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 343, 527, 484, 527, 527, 527,
-
527, 527, 345, 1, 527, 527, 1, 527,
-
529, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 1, 1, 310, 527,
-
1, 527, 325, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 1, 1, 1,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 527, 527, 527, 527, 527, 527, 527,
-
527, 1, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 1, 520, 520, 520, 520, 520,
-
520, 520, 520, 535, 1, 520, 520, 536,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 535, 520, 333, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 523, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 520, 520, 520, 520, 520, 520,
-
520, 520, 1, 537, 1, 535, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 535, 1, 504, 1,
-
1, 1, 505, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 504, 483, 484,
-
483, 483, 483, 483, 483, 507, 1, 483,
-
483, 1, 483, 529, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 1,
-
1, 310, 483, 1, 483, 325, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
1, 1, 1, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 483, 483, 483, 483,
-
483, 483, 483, 483, 1, 538, 1, 1,
-
1, 539, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 538, 540, 541, 540,
-
540, 540, 540, 540, 542, 1, 540, 540,
-
1, 540, 543, 540, 540, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 1, 1,
-
354, 540, 1, 540, 1, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 540, 544,
-
1, 1, 540, 540, 540, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 540, 540,
-
540, 540, 540, 540, 540, 540, 540, 540,
-
540, 540, 540, 1, 545, 546, 545, 545,
-
545, 545, 545, 1, 1, 545, 545, 1,
-
545, 486, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 1, 1, 1,
-
545, 1, 545, 1, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 1, 1,
-
1, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 1, 547, 1, 1, 1, 548,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 547, 545, 546, 545, 545, 545,
-
545, 545, 549, 1, 545, 545, 492, 545,
-
486, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 1, 494, 1, 545,
-
1, 545, 1, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 1, 1, 1,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 545, 545, 545, 545, 545, 545, 545,
-
545, 1, 547, 1, 1, 1, 548, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 547, 1, 1, 1, 1, 1, 1,
-
1, 549, 1, 1, 1, 492, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 494, 1, 550, 1,
-
547, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 547,
-
1, 551, 1, 1, 1, 552, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
551, 1, 1, 1, 1, 1, 1, 1,
-
553, 1, 1, 1, 501, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 503, 1, 554, 554, 554,
-
554, 554, 554, 554, 554, 546, 1, 554,
-
554, 555, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 546, 554, 1, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
556, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 1, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 1, 554,
-
554, 557, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 545, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
556, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 1, 558, 1, 554,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 554, 1,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
1, 559, 1, 546, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 546, 1, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 1, 487, 487,
-
560, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 1, 561,
-
547, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 487, 487, 487, 487, 487,
-
487, 487, 487, 1, 562, 1, 487, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 487, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 487,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 1, 563, 563, 564, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 565, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 566, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 563,
-
563, 563, 563, 563, 563, 563, 563, 1,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 1, 567, 567, 568, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 569, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 570, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 1,
-
571, 1, 567, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 567, 1, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 567, 567, 567, 567, 567,
-
567, 567, 567, 1, 572, 1, 1, 1,
-
573, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 572, 574, 575, 574, 574,
-
574, 574, 574, 576, 1, 574, 574, 1,
-
574, 1, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 1, 1, 354,
-
574, 1, 574, 1, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 1, 1,
-
1, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 1, 577, 1, 1, 1, 578,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 577, 438, 306, 438, 438, 438,
-
438, 438, 579, 1, 438, 438, 308, 438,
-
580, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 1, 138, 310, 438,
-
1, 438, 311, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 1, 1, 1,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 1, 581, 1, 1, 1, 582, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 581, 314, 315, 314, 314, 314, 314,
-
314, 583, 1, 314, 314, 317, 314, 325,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 1, 148, 310, 314, 1,
-
314, 319, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 1, 1, 1, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
1, 584, 1, 585, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 585, 1, 586, 1, 1, 1,
-
587, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 586, 338, 339, 338, 338,
-
338, 338, 338, 588, 1, 338, 338, 589,
-
338, 341, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 1, 590, 342,
-
338, 1, 338, 591, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 1, 1,
-
1, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 1, 592, 592, 592, 592, 592,
-
592, 592, 592, 593, 1, 592, 592, 594,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 593, 592, 329, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 595, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 1, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 1, 596, 596, 597,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 598, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 599, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 1, 600, 1, 596, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 596, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 601,
-
1, 596, 596, 602, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 601, 596,
-
333, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 599, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 596, 596,
-
596, 596, 596, 596, 596, 596, 1, 603,
-
1, 601, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
601, 1, 604, 1, 1, 1, 605, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 604, 438, 306, 438, 438, 438, 438,
-
438, 606, 1, 438, 438, 308, 438, 580,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 1, 138, 310, 438, 1,
-
438, 311, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 1, 1, 1, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
1, 607, 1, 1, 1, 608, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
607, 314, 315, 314, 314, 314, 314, 314,
-
609, 1, 314, 314, 317, 314, 1, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 1, 148, 349, 314, 1, 314,
-
610, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 1, 1, 1, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 1,
-
611, 1, 607, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 607, 1, 612, 1, 1, 1, 613,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 612, 338, 339, 338, 338, 338,
-
338, 338, 614, 1, 338, 338, 589, 338,
-
1, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 1, 590, 354, 338,
-
1, 338, 615, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 1, 1, 1,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 1, 616, 1, 1, 1, 617, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 616, 618, 619, 618, 618, 618, 618,
-
618, 620, 1, 618, 618, 1, 618, 621,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 1, 1, 1, 618, 1,
-
618, 1, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 618, 480, 1, 1, 618,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
618, 618, 618, 618, 618, 618, 618, 618,
-
1, 622, 1, 1, 1, 623, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
622, 624, 546, 624, 624, 624, 624, 624,
-
625, 1, 624, 624, 1, 624, 486, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 1, 1, 1, 624, 1, 624,
-
1, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 487, 1, 1, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 1,
-
626, 1, 622, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 622, 1, 627, 1, 1, 1, 628,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 627, 624, 546, 624, 624, 624,
-
624, 624, 629, 1, 624, 624, 492, 624,
-
630, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 1, 494, 1, 624,
-
1, 624, 1, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 1, 1, 1,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 1, 627, 1, 1, 1, 628, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 627, 1, 1, 1, 1, 1, 1,
-
1, 629, 1, 1, 1, 492, 1, 631,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 494, 1, 632, 1,
-
627, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 627,
-
1, 633, 1, 1, 1, 634, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
633, 1, 1, 1, 1, 1, 1, 1,
-
635, 1, 1, 1, 501, 1, 636, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 503, 1, 631, 1, 1,
-
1, 637, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 631, 638, 1, 638,
-
638, 638, 638, 638, 639, 1, 638, 638,
-
1, 638, 1, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 1, 1,
-
1, 638, 1, 638, 1, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 1,
-
1, 1, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 1, 640, 1, 631, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 631, 1, 627,
-
1, 1, 1, 628, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 627, 638,
-
1, 638, 638, 638, 638, 638, 629, 1,
-
638, 638, 492, 638, 631, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
1, 494, 1, 638, 1, 638, 1, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 1, 1, 1, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 638, 638, 638,
-
638, 638, 638, 638, 638, 1, 636, 1,
-
1, 1, 641, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 636, 642, 1,
-
642, 642, 642, 642, 642, 643, 1, 642,
-
642, 1, 642, 1, 642, 642, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 1,
-
1, 1, 642, 1, 642, 1, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 642,
-
1, 1, 1, 642, 642, 642, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 642,
-
642, 642, 642, 642, 642, 642, 642, 642,
-
642, 642, 642, 642, 1, 631, 1, 1,
-
1, 637, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 631, 624, 546, 624,
-
624, 624, 624, 624, 639, 1, 624, 624,
-
1, 624, 486, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 1, 1,
-
1, 624, 1, 624, 1, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 1,
-
1, 1, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 624, 624, 624, 624, 624,
-
624, 624, 624, 1, 644, 1, 1, 1,
-
645, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 644, 646, 647, 646, 646,
-
646, 646, 646, 648, 1, 646, 646, 1,
-
646, 543, 646, 646, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 1, 1, 1,
-
646, 1, 646, 1, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 646, 544, 1,
-
1, 646, 646, 646, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 646, 646, 646,
-
646, 646, 646, 646, 646, 646, 646, 646,
-
646, 646, 1, 649, 1, 1, 1, 650,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 649, 305, 651, 305, 305, 305,
-
305, 305, 652, 1, 305, 305, 308, 305,
-
580, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 1, 138, 310, 305,
-
1, 305, 311, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 1, 1, 1,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 305, 305, 305, 305, 305, 305, 305,
-
305, 1, 653, 1, 1, 1, 654, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 653, 457, 458, 457, 457, 457, 457,
-
457, 655, 1, 457, 457, 317, 457, 1,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 1, 148, 349, 457, 1,
-
457, 610, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 1, 1, 1, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
457, 457, 457, 457, 457, 457, 457, 457,
-
1, 656, 1, 653, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 653, 1, 657, 1, 1, 1,
-
658, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 657, 574, 575, 574, 574,
-
574, 574, 574, 659, 1, 574, 574, 589,
-
574, 1, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 1, 590, 354,
-
574, 1, 574, 615, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 1, 1,
-
1, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 574, 574, 574, 574, 574, 574,
-
574, 574, 1, 660, 660, 660, 660, 660,
-
660, 660, 660, 661, 1, 660, 660, 662,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 661, 660, 565, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 663, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 660, 660, 660, 660, 660, 660,
-
660, 660, 1, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 1, 664, 664, 665,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 666, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 667, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 1, 668, 1, 664, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 664, 1, 303, 1,
-
1, 1, 304, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 303, 438, 306,
-
438, 438, 438, 438, 438, 307, 1, 438,
-
438, 308, 438, 309, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 1,
-
138, 310, 438, 1, 438, 311, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
1, 1, 1, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 1, 669, 1, 1,
-
1, 670, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 669, 338, 339, 338,
-
338, 338, 338, 338, 671, 1, 338, 338,
-
589, 338, 453, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 1, 590,
-
342, 338, 1, 338, 591, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 1,
-
1, 1, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 1, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 1, 664, 664, 664,
-
664, 664, 664, 664, 664, 672, 1, 664,
-
664, 673, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 672, 664, 569, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
667, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 664, 664, 664, 664,
-
664, 664, 664, 664, 1, 674, 1, 672,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 672, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 675, 1, 431, 431, 676, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
675, 431, 677, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 434, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
431, 431, 431, 431, 431, 431, 431, 431,
-
1, 678, 1, 675, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 675, 1, 679, 1, 1, 1,
-
680, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 679, 314, 315, 314, 314,
-
314, 314, 314, 681, 1, 314, 314, 682,
-
314, 318, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 1, 683, 310,
-
314, 1, 314, 684, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 1, 1,
-
1, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 314, 314, 314, 314, 314, 314,
-
314, 314, 1, 685, 1, 686, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 686, 1, 687, 1,
-
1, 1, 688, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 687, 338, 339,
-
338, 338, 338, 338, 338, 689, 1, 338,
-
338, 690, 338, 453, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 1,
-
691, 342, 338, 1, 338, 692, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
1, 1, 1, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 338, 338, 338, 338,
-
338, 338, 338, 338, 1, 693, 1, 1,
-
1, 694, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 693, 695, 696, 695,
-
695, 695, 695, 695, 697, 1, 695, 695,
-
1, 695, 698, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 1, 1,
-
354, 695, 1, 695, 1, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 1,
-
1, 1, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 1, 699, 700, 699, 699,
-
699, 699, 699, 1, 1, 699, 699, 1,
-
699, 701, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 1, 1, 1,
-
699, 1, 699, 1, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 1, 1,
-
1, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 1, 702, 1, 1, 1, 703,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 702, 699, 700, 699, 699, 699,
-
699, 699, 704, 1, 699, 699, 308, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 1, 138, 1, 699,
-
1, 699, 705, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 1, 1, 1,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 699, 699, 699, 699, 699, 699, 699,
-
699, 1, 706, 1, 1, 1, 707, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 706, 1, 1, 1, 1, 1, 1,
-
1, 708, 1, 1, 1, 317, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 148, 1, 1, 1,
-
1, 610, 1, 709, 1, 706, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 706, 1, 710, 1,
-
1, 1, 711, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 710, 1, 1,
-
1, 1, 1, 1, 1, 712, 1, 1,
-
1, 589, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
590, 1, 1, 1, 1, 615, 1, 713,
-
713, 713, 713, 713, 713, 713, 713, 700,
-
1, 713, 713, 714, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 700, 713,
-
1, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 715, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 1, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
1, 713, 713, 716, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
699, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 715, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 713, 713,
-
713, 713, 713, 713, 713, 713, 1, 717,
-
1, 713, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
713, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 713, 718, 1, 700, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 700, 1, 343, 1,
-
1, 1, 344, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 343, 438, 306,
-
438, 438, 438, 438, 438, 345, 1, 438,
-
438, 1, 438, 719, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 1,
-
1, 310, 438, 1, 438, 325, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
1, 1, 1, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 438, 438, 438, 438,
-
438, 438, 438, 438, 1, 720, 1, 1,
-
1, 721, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 720, 722, 723, 722,
-
722, 722, 722, 722, 724, 1, 722, 722,
-
1, 722, 725, 722, 722, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 1, 1,
-
1, 722, 1, 722, 1, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 722, 726,
-
1, 1, 722, 722, 722, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 722, 722,
-
722, 722, 722, 722, 722, 722, 722, 722,
-
722, 722, 722, 1, 727, 1, 1, 1,
-
728, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 727, 729, 730, 729, 729,
-
729, 729, 729, 731, 1, 729, 729, 1,
-
729, 732, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 1, 1, 1,
-
729, 1, 729, 1, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 733, 1,
-
1, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 1, 734, 1, 727, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 727, 1, 735, 1,
-
1, 1, 736, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 735, 729, 730,
-
729, 729, 729, 729, 729, 737, 1, 729,
-
729, 1, 729, 738, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 1,
-
1, 1, 729, 739, 729, 1, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
1, 1, 1, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 1, 735, 1, 1,
-
1, 736, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 735, 1, 1, 1,
-
1, 1, 1, 1, 737, 1, 1, 1,
-
1, 1, 740, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 739, 1, 741, 1, 735, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 735, 1, 742,
-
1, 1, 1, 743, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 742, 1,
-
1, 1, 1, 1, 1, 1, 744, 1,
-
1, 1, 1, 1, 745, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 746, 1, 740, 1,
-
1, 1, 747, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 740, 748, 1,
-
748, 748, 748, 748, 748, 749, 1, 748,
-
748, 1, 748, 1, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 1,
-
1, 1, 748, 1, 748, 1, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
1, 1, 1, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 1, 750, 1, 740,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 740, 1,
-
735, 1, 1, 1, 736, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 735,
-
748, 1, 748, 748, 748, 748, 748, 737,
-
1, 748, 748, 1, 748, 740, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 1, 1, 1, 748, 739, 748, 1,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 1, 1, 1, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 748, 748,
-
748, 748, 748, 748, 748, 748, 1, 745,
-
1, 1, 1, 751, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 745, 752,
-
1, 752, 752, 752, 752, 752, 753, 1,
-
752, 752, 1, 752, 1, 752, 752, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
1, 1, 1, 752, 1, 752, 1, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
752, 1, 1, 1, 752, 752, 752, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
752, 752, 752, 752, 752, 752, 752, 752,
-
752, 752, 752, 752, 752, 1, 754, 754,
-
754, 754, 754, 754, 754, 754, 730, 1,
-
754, 754, 755, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 730, 754, 1,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 756, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 1, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 1,
-
754, 754, 757, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 758,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 756, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 1, 759, 1,
-
754, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 754,
-
1, 760, 1, 1, 1, 761, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
760, 758, 730, 758, 758, 758, 758, 758,
-
762, 1, 758, 758, 1, 758, 732, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 1, 1, 1, 758, 739, 758,
-
1, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 1, 1, 1, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 1,
-
760, 1, 1, 1, 761, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 760,
-
1, 1, 1, 1, 1, 1, 1, 762,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 739, 1, 763,
-
1, 760, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
760, 1, 764, 1, 1, 1, 765, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 764, 1, 1, 1, 1, 1, 1,
-
1, 766, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 746,
-
1, 758, 730, 758, 758, 758, 758, 758,
-
1, 1, 758, 758, 1, 758, 732, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 1, 1, 1, 758, 1, 758,
-
1, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 1, 1, 1, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 758,
-
758, 758, 758, 758, 758, 758, 758, 1,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
754, 754, 754, 754, 754, 754, 754, 754,
-
1, 767, 1, 730, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 730, 1, 740, 1, 1, 1,
-
747, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 740, 729, 730, 729, 729,
-
729, 729, 729, 749, 1, 729, 729, 1,
-
729, 732, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 1, 1, 1,
-
729, 1, 729, 1, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 1, 1,
-
1, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 729, 729, 729, 729, 729, 729,
-
729, 729, 1, 768, 1, 1, 1, 769,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 768, 770, 771, 770, 770, 770,
-
770, 770, 772, 1, 770, 770, 1, 770,
-
773, 770, 770, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 1, 1, 1, 770,
-
1, 770, 1, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 770, 774, 1, 1,
-
770, 770, 770, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 770, 770, 770, 770,
-
770, 770, 770, 770, 770, 770, 770, 770,
-
770, 1, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 1, 733, 733, 775, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 1, 776, 760, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 733, 733, 733, 733, 733, 733, 733,
-
733, 1, 777, 1, 733, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 733, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 733, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 1,
-
778, 778, 779, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 780,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 781, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 778, 778, 778,
-
778, 778, 778, 778, 778, 1, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 1,
-
782, 782, 783, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 784,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 785, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 1, 786, 1,
-
782, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 782,
-
1, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 782, 782, 782, 782, 782, 782, 782,
-
782, 1, 387, 1, 1, 1, 787, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 387, 788, 789, 788, 788, 788, 788,
-
788, 790, 1, 788, 788, 1, 788, 1,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 1, 1, 1, 788, 1,
-
788, 1, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 1, 1, 1, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
1, 791, 791, 791, 791, 791, 791, 791,
-
791, 372, 1, 791, 791, 792, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
372, 791, 1, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 793, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
1, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 1, 791, 791, 794, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 795, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 793, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
1, 796, 1, 791, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 791, 1, 797, 1, 1, 1,
-
798, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 797, 795, 372, 795, 795,
-
795, 795, 795, 799, 1, 795, 795, 1,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 1, 1, 1,
-
795, 375, 795, 376, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 1, 1,
-
1, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 1, 800, 1, 1, 1, 801,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 800, 1, 1, 1, 1, 1,
-
1, 1, 802, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
381, 1, 382, 1, 803, 1, 800, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 800, 1, 804,
-
1, 1, 1, 805, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 804, 1,
-
1, 1, 1, 1, 1, 1, 806, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 388, 1, 389, 1,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
791, 791, 791, 791, 791, 791, 791, 791,
-
1, 807, 1, 372, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 372, 1, 808, 1, 1, 1,
-
809, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 808, 371, 810, 371, 371,
-
371, 371, 371, 811, 1, 371, 371, 1,
-
371, 795, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 1, 1, 1,
-
371, 375, 371, 376, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 1, 1,
-
1, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 1, 812, 1, 1, 1, 813,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 812, 391, 392, 391, 391, 391,
-
391, 391, 814, 1, 391, 391, 1, 391,
-
1, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 1, 1, 1, 391,
-
381, 391, 382, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 1, 1, 1,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 391, 391, 391, 391, 391, 391, 391,
-
391, 1, 815, 1, 812, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 812, 1, 816, 1, 1,
-
1, 817, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 816, 788, 789, 788,
-
788, 788, 788, 788, 818, 1, 788, 788,
-
1, 788, 1, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 1, 1,
-
1, 788, 388, 788, 389, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 1,
-
1, 1, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 788, 788, 788, 788, 788,
-
788, 788, 788, 1, 819, 819, 819, 819,
-
819, 819, 819, 819, 820, 1, 819, 819,
-
821, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 820, 819, 780, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 822,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 1, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 1, 823, 823,
-
824, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 825, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 826,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 1, 827, 1, 823, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 823, 1, 369,
-
1, 1, 1, 370, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 369, 795,
-
372, 795, 795, 795, 795, 795, 373, 1,
-
795, 795, 1, 795, 374, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
1, 1, 1, 795, 375, 795, 376, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 1, 1, 1, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 828,
-
1, 823, 823, 829, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 828, 823,
-
784, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 826, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 823, 823,
-
823, 823, 823, 823, 823, 823, 1, 830,
-
1, 828, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
828, 1, 831, 831, 831, 831, 831, 831,
-
831, 831, 832, 1, 831, 831, 833, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 832, 831, 834, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 835, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 831, 831, 831, 831, 831, 831, 831,
-
831, 1, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 1, 836, 836, 837, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 838, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 839, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 1, 840, 1, 836, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 836, 1, 841, 1, 1,
-
1, 842, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 841, 795, 372, 795,
-
795, 795, 795, 795, 843, 1, 795, 795,
-
1, 795, 374, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 1, 1,
-
1, 795, 375, 795, 844, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 1,
-
1, 1, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 1, 845, 1, 1, 1,
-
846, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 845, 1, 1, 1, 1,
-
1, 1, 1, 847, 1, 1, 1, 1,
-
1, 380, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 381, 1, 848, 1, 849, 1, 845,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 845, 1,
-
850, 1, 1, 1, 851, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 850,
-
1, 1, 1, 1, 1, 1, 1, 852,
-
1, 1, 1, 1, 1, 387, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 388, 1, 853,
-
1, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 1, 836, 836, 836, 836, 836, 836,
-
836, 836, 854, 1, 836, 836, 855, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 854, 836, 856, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 839, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 836, 836, 836, 836, 836, 836, 836,
-
836, 1, 857, 1, 854, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 854, 1, 858, 1, 1,
-
1, 859, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 858, 1, 1, 1,
-
1, 1, 1, 1, 860, 1, 1, 1,
-
1, 1, 380, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 381, 1, 861, 1, 862, 1,
-
858, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 858,
-
1, 863, 1, 1, 1, 864, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
863, 1, 1, 1, 1, 1, 1, 1,
-
865, 1, 1, 1, 1, 1, 387, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 388, 1,
-
866, 1, 867, 1, 1, 1, 868, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 867, 869, 870, 869, 869, 869, 869,
-
869, 871, 1, 869, 869, 872, 869, 873,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 1, 1, 1, 869, 1,
-
869, 874, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 1, 1, 1, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
1, 366, 1, 1, 1, 875, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
366, 1, 1, 1, 1, 1, 1, 1,
-
876, 1, 1, 1, 366, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
367, 1, 877, 1, 366, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 366, 1, 872, 1, 1,
-
1, 878, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 872, 1, 1, 1,
-
1, 1, 1, 1, 879, 1, 1, 1,
-
872, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 874, 1, 880, 1,
-
1, 1, 881, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 880, 882, 883,
-
882, 882, 882, 882, 882, 884, 1, 882,
-
882, 1, 882, 885, 882, 882, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 1,
-
1, 1, 882, 1, 882, 1, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 882,
-
886, 1, 1, 882, 882, 882, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 882,
-
882, 882, 882, 882, 882, 882, 882, 882,
-
882, 882, 882, 882, 1, 887, 1, 1,
-
1, 888, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 887, 889, 890, 889,
-
889, 889, 889, 889, 891, 1, 889, 889,
-
1, 889, 892, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 1, 1,
-
1, 889, 1, 889, 1, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 893,
-
1, 1, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 1, 894, 1, 887, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 887, 1, 895,
-
1, 1, 1, 896, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 895, 889,
-
890, 889, 889, 889, 889, 889, 897, 1,
-
889, 889, 898, 889, 899, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
900, 1, 1, 889, 1, 889, 1, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 1, 1, 1, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 1, 895, 1,
-
1, 1, 896, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 895, 1, 1,
-
1, 1, 1, 1, 1, 897, 1, 1,
-
1, 898, 1, 901, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 900,
-
1, 902, 1, 895, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 895, 1, 903, 1, 1, 1,
-
904, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 903, 1, 1, 1, 1,
-
1, 1, 1, 905, 1, 1, 1, 906,
-
1, 907, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 908, 1, 909,
-
1, 1, 1, 910, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 909, 1,
-
1, 1, 1, 1, 1, 1, 911, 1,
-
1, 1, 909, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
912, 1, 1, 1, 1, 1, 367, 1,
-
913, 1, 909, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 909, 1, 914, 1, 1, 1, 915,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 914, 1, 1, 1, 1, 1,
-
1, 1, 916, 1, 1, 1, 914, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 917, 1, 1, 1,
-
1, 1, 874, 1, 918, 1, 1, 1,
-
919, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 918, 920, 921, 920, 920,
-
920, 920, 920, 922, 1, 920, 920, 1,
-
920, 923, 920, 920, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 1, 1, 1,
-
920, 1, 920, 1, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 920, 1, 1,
-
1, 920, 920, 920, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 920, 920, 920,
-
920, 920, 920, 920, 920, 920, 920, 920,
-
920, 920, 1, 924, 1, 1, 1, 925,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 924, 357, 358, 357, 357, 357,
-
357, 357, 926, 1, 357, 357, 1, 357,
-
361, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 1, 1, 1, 357,
-
1, 357, 1, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 1, 1, 1,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 357, 357, 357, 357, 357, 357, 357,
-
357, 1, 927, 1, 924, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 924, 1, 928, 1, 1,
-
1, 929, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 928, 869, 870, 869,
-
869, 869, 869, 869, 930, 1, 869, 869,
-
1, 869, 873, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 1, 1,
-
1, 869, 1, 869, 1, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 1,
-
1, 1, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 869, 869, 869, 869, 869,
-
869, 869, 869, 1, 795, 372, 795, 795,
-
795, 795, 795, 1, 1, 795, 795, 1,
-
795, 931, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 1, 1, 1,
-
795, 1, 795, 1, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 1, 1,
-
1, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 795, 795, 795, 795, 795, 795,
-
795, 795, 1, 901, 1, 1, 1, 932,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 901, 933, 1, 933, 933, 933,
-
933, 933, 934, 1, 933, 933, 1, 933,
-
1, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 1, 1, 1, 933,
-
1, 933, 1, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 1, 1, 1,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 1, 935, 1, 901, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 901, 1, 895, 1, 1,
-
1, 896, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 895, 933, 1, 933,
-
933, 933, 933, 933, 897, 1, 933, 933,
-
898, 933, 901, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 900, 1,
-
1, 933, 1, 933, 1, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 1,
-
1, 1, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 933, 933, 933, 933, 933,
-
933, 933, 933, 1, 907, 1, 1, 1,
-
936, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 907, 937, 1, 937, 937,
-
937, 937, 937, 938, 1, 937, 937, 1,
-
937, 1, 937, 937, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 1, 1, 1,
-
937, 1, 937, 1, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 937, 1, 1,
-
1, 937, 937, 937, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 937, 937, 937,
-
937, 937, 937, 937, 937, 937, 937, 937,
-
937, 937, 1, 939, 939, 939, 939, 939,
-
939, 939, 939, 890, 1, 939, 939, 940,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 890, 939, 1, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 941, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 1, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 1, 939, 939, 942,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 943, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 941, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 939, 939, 939, 939, 939, 939,
-
939, 939, 1, 944, 1, 939, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 939, 1, 945, 1,
-
1, 1, 946, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 945, 943, 890,
-
943, 943, 943, 943, 943, 947, 1, 943,
-
943, 898, 943, 892, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 900,
-
1, 1, 943, 1, 943, 1, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
1, 1, 1, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 1, 945, 1, 1,
-
1, 946, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 945, 1, 1, 1,
-
1, 1, 1, 1, 947, 1, 1, 1,
-
898, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 900, 1,
-
948, 1, 945, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 945, 1, 949, 1, 1, 1, 950,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 949, 1, 1, 1, 1, 1,
-
1, 1, 951, 1, 1, 1, 906, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 908, 1, 943, 890,
-
943, 943, 943, 943, 943, 1, 1, 943,
-
943, 1, 943, 892, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 1,
-
1, 1, 943, 1, 943, 1, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
1, 1, 1, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 943, 943, 943, 943,
-
943, 943, 943, 943, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 939, 952, 1,
-
890, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 890,
-
1, 901, 1, 1, 1, 932, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
901, 889, 890, 889, 889, 889, 889, 889,
-
934, 1, 889, 889, 1, 889, 892, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 1, 1, 1, 889, 1, 889,
-
1, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 1, 1, 1, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 889,
-
889, 889, 889, 889, 889, 889, 889, 1,
-
953, 1, 1, 1, 954, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 953,
-
955, 956, 955, 955, 955, 955, 955, 957,
-
1, 955, 955, 1, 955, 958, 955, 955,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 1, 1, 1, 955, 1, 955, 1,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 955, 959, 1, 1, 955, 955, 955,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 955, 955, 955, 955, 955, 955, 955,
-
955, 955, 955, 955, 955, 955, 1, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
1, 893, 893, 960, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 1, 961, 945, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 1, 962,
-
1, 893, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
893, 1, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 893, 893, 893, 893, 893, 893,
-
893, 893, 1, 963, 1, 1, 1, 964,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 963, 965, 966, 965, 965, 965,
-
965, 965, 967, 1, 965, 965, 1, 965,
-
968, 965, 965, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 1, 1, 139, 965,
-
1, 965, 155, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 965, 969, 1, 1,
-
965, 965, 965, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 965, 965, 965, 965,
-
965, 965, 965, 965, 965, 965, 965, 965,
-
965, 1, 970, 1, 1, 1, 971, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 970, 972, 973, 972, 972, 972, 972,
-
972, 974, 1, 972, 972, 1, 972, 975,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 1, 1, 129, 972, 1,
-
972, 1, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 976, 1, 1, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
1, 977, 1, 970, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 970, 1, 978, 1, 1, 1,
-
979, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 978, 972, 973, 972, 972,
-
972, 972, 972, 980, 1, 972, 972, 981,
-
972, 982, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 1, 494, 139,
-
972, 1, 972, 155, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 1, 1,
-
1, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 1, 978, 1, 1, 1, 979,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 978, 143, 144, 143, 143, 143,
-
143, 143, 980, 1, 143, 143, 981, 143,
-
983, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 1, 494, 139, 143,
-
1, 143, 155, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 1, 1, 1,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 1, 984, 1, 985, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 985, 1, 986, 1, 1,
-
1, 987, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 986, 168, 169, 168,
-
168, 168, 168, 168, 988, 1, 168, 168,
-
989, 168, 990, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 1, 503,
-
172, 168, 1, 168, 171, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 1,
-
1, 1, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 1, 991, 1, 1, 1,
-
992, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 991, 993, 144, 993, 993,
-
993, 993, 993, 994, 1, 993, 993, 1,
-
993, 155, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 1, 1, 139,
-
993, 1, 993, 155, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 1, 1,
-
1, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 1, 995, 1, 1, 1, 996,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 995, 993, 144, 993, 993, 993,
-
993, 993, 997, 1, 993, 993, 1, 993,
-
1, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 1, 1, 129, 993,
-
1, 993, 1, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 1, 1, 1,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 1, 998, 1, 995, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 995, 1, 978, 1, 1,
-
1, 979, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 978, 993, 144, 993,
-
993, 993, 993, 993, 980, 1, 993, 993,
-
981, 993, 983, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 1, 494,
-
139, 993, 1, 993, 155, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 1,
-
1, 1, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 993, 993, 993, 993, 993,
-
993, 993, 993, 1, 999, 1, 1, 1,
-
1000, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 999, 1001, 169, 1001, 1001,
-
1001, 1001, 1001, 1002, 1, 1001, 1001, 1,
-
1001, 1, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1, 1, 183,
-
1001, 1, 1001, 1, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1001, 1, 1,
-
1, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
-
1001, 1001, 1, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1004, 1, 1003, 1003, 1005,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1004, 1003, 159, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1006, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
-
1003, 1003, 1, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1, 1007, 1007, 1008,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1009, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1010, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1, 1011, 1, 1007, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1007, 1, 1012, 1,
-
1, 1, 1013, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1012, 1014, 973,
-
1014, 1014, 1014, 1014, 1014, 1015, 1, 1014,
-
1014, 981, 1014, 1016, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1,
-
494, 139, 1014, 1, 1014, 155, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1, 1, 1, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1, 1012, 1, 1,
-
1, 1013, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1012, 143, 144, 143,
-
143, 143, 143, 143, 1015, 1, 143, 143,
-
981, 143, 155, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 1, 494,
-
139, 143, 1, 143, 155, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 1,
-
1, 1, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 1, 1017, 1, 1018, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1018, 1, 1019,
-
1, 1, 1, 1020, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1019, 168,
-
169, 168, 168, 168, 168, 168, 1021, 1,
-
168, 168, 989, 168, 171, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
1, 503, 172, 168, 1, 168, 171, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 1, 1, 1, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 1, 173, 1,
-
1, 1, 174, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 173, 1014, 973,
-
1014, 1014, 1014, 1014, 1014, 175, 1, 1014,
-
1014, 1, 1014, 1016, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1,
-
1, 139, 1014, 1, 1014, 155, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1, 1, 1, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
1014, 1014, 1014, 1014, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1022, 1,
-
1007, 1007, 1023, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1022, 1007, 163,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1010, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
-
1007, 1007, 1007, 1007, 1007, 1, 1024, 1,
-
1022, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1022,
-
1, 991, 1, 1, 1, 992, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
991, 972, 973, 972, 972, 972, 972, 972,
-
994, 1, 972, 972, 1, 972, 1016, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 1, 1, 139, 972, 1, 972,
-
155, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 1, 1, 1, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 972,
-
972, 972, 972, 972, 972, 972, 972, 1,
-
1025, 1, 1, 1, 1026, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1025,
-
1027, 1028, 1027, 1027, 1027, 1027, 1027, 1029,
-
1, 1027, 1027, 1, 1027, 1030, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1, 1, 183, 1027, 1, 1027, 1,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1027, 1031, 1, 1, 1027, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
-
1027, 1027, 1027, 1027, 1027, 1027, 1, 1032,
-
1033, 1032, 1032, 1032, 1032, 1032, 1, 1,
-
1032, 1032, 1, 1032, 975, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1, 1, 1, 1032, 1, 1032, 1, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1, 1, 1, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1, 1034, 1,
-
1, 1, 1035, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1034, 1032, 1033,
-
1032, 1032, 1032, 1032, 1032, 1036, 1, 1032,
-
1032, 981, 1032, 975, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1,
-
494, 1, 1032, 1, 1032, 1, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1, 1, 1, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032,
-
1032, 1032, 1032, 1032, 1, 1034, 1, 1,
-
1, 1035, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1034, 1, 1, 1,
-
1, 1, 1, 1, 1036, 1, 1, 1,
-
981, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 494,
-
1, 1037, 1, 1034, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1034, 1, 1038, 1, 1, 1,
-
1039, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1038, 1, 1, 1, 1,
-
1, 1, 1, 1040, 1, 1, 1, 989,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 503, 1,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1033, 1, 1041, 1041, 1042, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1033,
-
1041, 1, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1043, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1, 1041, 1041, 1044, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1032, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1043, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
-
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1,
-
1045, 1, 1041, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1041, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1041, 1046, 1, 1033, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1033, 1, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
1, 976, 976, 1047, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 1, 1048, 1034, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 976, 976,
-
976, 976, 976, 976, 976, 976, 1, 1049,
-
1, 976, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
976, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 976, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1, 1050, 1050, 1051,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1052, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1053, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,
-
1050, 1050, 1, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1, 1054, 1054, 1055,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1056, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1057, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1, 1058, 1, 1054, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1054, 1, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
-
1054, 1054, 1054, 1054, 1054, 1054, 1, 1059,
-
1, 1, 1, 1060, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1059, 1061,
-
1062, 1061, 1061, 1061, 1061, 1061, 1063, 1,
-
1061, 1061, 1, 1061, 1, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1, 1, 183, 1061, 1, 1061, 1, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1, 1, 1, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1, 1064, 1,
-
1, 1, 1065, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1064, 262, 134,
-
262, 262, 262, 262, 262, 1066, 1, 262,
-
262, 136, 262, 1067, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 1,
-
138, 139, 262, 1, 262, 140, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
1, 1, 1, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 1, 1068, 1, 1,
-
1, 1069, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1068, 143, 144, 143,
-
143, 143, 143, 143, 1070, 1, 143, 143,
-
146, 143, 155, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 1, 148,
-
139, 143, 1, 143, 149, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 1,
-
1, 1, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 1, 1071, 1, 1072, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1072, 1, 1073,
-
1, 1, 1, 1074, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1073, 168,
-
169, 168, 168, 168, 168, 168, 1075, 1,
-
168, 168, 1076, 168, 171, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
1, 590, 172, 168, 1, 168, 1077, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 1, 1, 1, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 1, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1079, 1,
-
1078, 1078, 1080, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1079, 1078, 159,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1081, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
-
1078, 1078, 1078, 1078, 1078, 1, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1,
-
1082, 1082, 1083, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1084,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1085, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1, 1086, 1,
-
1082, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1082,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1087, 1, 1082, 1082, 1088, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1087, 1082, 163, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1085, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082,
-
1082, 1, 1089, 1, 1087, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1087, 1, 1090, 1, 1,
-
1, 1091, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1090, 262, 134, 262,
-
262, 262, 262, 262, 1092, 1, 262, 262,
-
136, 262, 1067, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 1, 138,
-
139, 262, 1, 262, 140, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 1,
-
1, 1, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 1, 1093, 1, 1, 1,
-
1094, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1093, 143, 144, 143, 143,
-
143, 143, 143, 1095, 1, 143, 143, 146,
-
143, 1, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 1, 148, 129,
-
143, 1, 143, 1096, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 1, 1,
-
1, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 1, 1097, 1, 1093, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1093, 1, 1098, 1,
-
1, 1, 1099, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1098, 168, 169,
-
168, 168, 168, 168, 168, 1100, 1, 168,
-
168, 1076, 168, 1, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 1,
-
590, 183, 168, 1, 168, 1101, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
1, 1, 1, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 1, 1102, 1, 1,
-
1, 1103, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1102, 1104, 1105, 1104,
-
1104, 1104, 1104, 1104, 1106, 1, 1104, 1104,
-
1, 1104, 1107, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1, 1,
-
1, 1104, 1, 1104, 1, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1104, 969,
-
1, 1, 1104, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104,
-
1104, 1104, 1104, 1, 1108, 1, 1, 1,
-
1109, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1108, 1110, 1033, 1110, 1110,
-
1110, 1110, 1110, 1111, 1, 1110, 1110, 1,
-
1110, 975, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1, 1, 1,
-
1110, 1, 1110, 1, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 976, 1,
-
1, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1, 1112, 1, 1108, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1108, 1, 1113, 1,
-
1, 1, 1114, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1113, 1110, 1033,
-
1110, 1110, 1110, 1110, 1110, 1115, 1, 1110,
-
1110, 981, 1110, 1116, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1,
-
494, 1, 1110, 1, 1110, 1, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1, 1, 1, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1, 1113, 1, 1,
-
1, 1114, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1113, 1, 1, 1,
-
1, 1, 1, 1, 1115, 1, 1, 1,
-
981, 1, 1117, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 494,
-
1, 1118, 1, 1113, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1113, 1, 1119, 1, 1, 1,
-
1120, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1119, 1, 1, 1, 1,
-
1, 1, 1, 1121, 1, 1, 1, 989,
-
1, 1122, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 503, 1,
-
1117, 1, 1, 1, 1123, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1117,
-
1124, 1, 1124, 1124, 1124, 1124, 1124, 1125,
-
1, 1124, 1124, 1, 1124, 1, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1, 1, 1, 1124, 1, 1124, 1,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1, 1, 1, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1, 1126,
-
1, 1117, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1117, 1, 1113, 1, 1, 1, 1114, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1113, 1124, 1, 1124, 1124, 1124, 1124,
-
1124, 1115, 1, 1124, 1124, 981, 1124, 1117,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1, 494, 1, 1124, 1,
-
1124, 1, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1, 1, 1, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124,
-
1, 1122, 1, 1, 1, 1127, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1122, 1128, 1, 1128, 1128, 1128, 1128, 1128,
-
1129, 1, 1128, 1128, 1, 1128, 1, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1, 1, 1, 1128, 1, 1128,
-
1, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1128, 1, 1, 1, 1128, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128,
-
1128, 1128, 1128, 1128, 1128, 1128, 1128, 1,
-
1117, 1, 1, 1, 1123, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1117,
-
1110, 1033, 1110, 1110, 1110, 1110, 1110, 1125,
-
1, 1110, 1110, 1, 1110, 975, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1, 1, 1, 1110, 1, 1110, 1,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1, 1, 1, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
-
1110, 1110, 1110, 1110, 1110, 1110, 1, 1130,
-
1, 1, 1, 1131, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1130, 1132,
-
1133, 1132, 1132, 1132, 1132, 1132, 1134, 1,
-
1132, 1132, 1, 1132, 1030, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1, 1, 1, 1132, 1, 1132, 1, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1132, 1031, 1, 1, 1132, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
-
1132, 1132, 1132, 1132, 1132, 1, 1135, 1,
-
1, 1, 1136, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1135, 133, 1137,
-
133, 133, 133, 133, 133, 1138, 1, 133,
-
133, 136, 133, 1067, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 1,
-
138, 139, 133, 1, 133, 140, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
1, 1, 1, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 133, 1, 1139, 1, 1,
-
1, 1140, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1139, 284, 285, 284,
-
284, 284, 284, 284, 1141, 1, 284, 284,
-
146, 284, 1, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 1, 148,
-
129, 284, 1, 284, 1096, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 1,
-
1, 1, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 284, 284, 284, 284, 284,
-
284, 284, 284, 1, 1142, 1, 1139, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1139, 1, 1143,
-
1, 1, 1, 1144, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1143, 1061,
-
1062, 1061, 1061, 1061, 1061, 1061, 1145, 1,
-
1061, 1061, 1076, 1061, 1, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1, 590, 183, 1061, 1, 1061, 1101, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1, 1, 1, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
-
1061, 1061, 1061, 1061, 1061, 1, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1147, 1,
-
1146, 1146, 1148, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1147, 1146, 1052,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1149, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
-
1146, 1146, 1146, 1146, 1146, 1, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1,
-
1150, 1150, 1151, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1152,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1153, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1, 1154, 1,
-
1150, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1150,
-
1, 131, 1, 1, 1, 132, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
131, 262, 134, 262, 262, 262, 262, 262,
-
135, 1, 262, 262, 136, 262, 137, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 1, 138, 139, 262, 1, 262,
-
140, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 1, 1, 1, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 1,
-
1155, 1, 1, 1, 1156, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1155,
-
168, 169, 168, 168, 168, 168, 168, 1157,
-
1, 168, 168, 1076, 168, 279, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 1, 590, 172, 168, 1, 168, 1077,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 1, 1, 1, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 1, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1158, 1, 1150, 1150, 1159, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1158,
-
1150, 1056, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1153, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
-
1150, 1150, 1150, 1150, 1150, 1150, 1150, 1,
-
1160, 1, 1158, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1158, 1, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 1, 255, 255, 255, 255,
-
255, 255, 255, 255, 1161, 1, 255, 255,
-
1162, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 1161, 255, 1163, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 258,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 255, 255, 255, 255, 255,
-
255, 255, 255, 1, 1164, 1, 1161, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1161, 1, 1165,
-
1, 1, 1, 1166, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1165, 143,
-
144, 143, 143, 143, 143, 143, 1167, 1,
-
143, 143, 1168, 143, 147, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
1, 683, 139, 143, 1, 143, 1169, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 1, 1, 1, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 143, 143, 1, 1170, 1,
-
1171, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1171,
-
1, 1172, 1, 1, 1, 1173, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1172, 168, 169, 168, 168, 168, 168, 168,
-
1174, 1, 168, 168, 1175, 168, 279, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 1, 691, 172, 168, 1, 168,
-
1176, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 1, 1, 1, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 168, 168, 168, 168, 168, 1,
-
1177, 1, 1, 1, 1178, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1177,
-
1179, 1180, 1179, 1179, 1179, 1179, 1179, 1181,
-
1, 1179, 1179, 1182, 1179, 1183, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1, 1184, 183, 1179, 1, 1179, 1,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1, 1, 1, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1, 1185,
-
1, 1, 1, 1186, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1185, 1187,
-
1188, 1187, 1187, 1187, 1187, 1187, 1189, 1,
-
1187, 1187, 245, 1187, 1190, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1, 120, 1191, 1187, 1, 1187, 1192, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1, 1, 1, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1, 1193, 1,
-
1, 1, 1194, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1193, 1195, 1196,
-
1195, 1195, 1195, 1195, 1195, 1197, 1, 1195,
-
1195, 245, 1195, 1198, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1,
-
120, 1199, 1195, 1, 1195, 1, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1, 1, 1, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1, 1200, 1, 1193,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1193, 1,
-
1201, 1, 1, 1, 1202, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1201,
-
1203, 1204, 1203, 1203, 1203, 1203, 1203, 1205,
-
1, 1203, 1203, 1206, 1203, 1207, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1, 1208, 1209, 1203, 1, 1203, 1210,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1, 1, 1, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1, 1211,
-
1, 1, 1, 1212, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1211, 1213,
-
1214, 1213, 1213, 1213, 1213, 1213, 1215, 1,
-
1213, 1213, 1216, 1213, 1217, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1, 1218, 1209, 1213, 1, 1213, 1219, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1, 1, 1, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1, 1220, 1,
-
1221, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1221,
-
1, 1222, 1, 1, 1, 1223, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1222, 1213, 1214, 1213, 1213, 1213, 1213, 1213,
-
1224, 1, 1213, 1213, 1, 1213, 1225, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1, 1, 1209, 1213, 1, 1213,
-
1225, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1, 1, 1, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1,
-
1226, 1, 1213, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1213, 1, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1, 1227, 1227, 1228,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1229, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1230, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
-
1227, 1227, 1, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1, 1231, 1231, 1232,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1233, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1234, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
-
1231, 1231, 1, 1235, 1, 1231, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1231, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1231, 1236,
-
1, 1, 1, 1237, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1236, 1238,
-
1239, 1238, 1238, 1238, 1238, 1238, 1240, 1,
-
1238, 1238, 1, 1238, 1241, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1, 1, 1242, 1238, 1, 1238, 1241, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1, 1, 1, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1, 1243, 1,
-
1, 1, 1244, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1243, 1213, 1214,
-
1213, 1213, 1213, 1213, 1213, 1245, 1, 1213,
-
1213, 1, 1213, 1225, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1,
-
1, 1209, 1213, 1, 1213, 1225, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1, 1, 1, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1, 1246, 1, 1,
-
1, 1247, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1246, 1213, 1214, 1213,
-
1213, 1213, 1213, 1213, 1248, 1, 1213, 1213,
-
1, 1213, 1, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1, 1,
-
1199, 1213, 1, 1213, 1, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1,
-
1, 1, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1, 1249, 1, 1246, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1246, 1, 1250,
-
1, 1, 1, 1251, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1250, 1238,
-
1239, 1238, 1238, 1238, 1238, 1238, 1252, 1,
-
1238, 1238, 1, 1238, 1, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1, 1, 1253, 1238, 1, 1238, 1, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1, 1, 1, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1, 1254, 1,
-
1, 1, 1255, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1254, 1256, 1257,
-
1256, 1256, 1256, 1256, 1256, 1258, 1, 1256,
-
1256, 1259, 1256, 1260, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1,
-
1, 1, 1256, 1, 1256, 1261, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1, 1, 1, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1, 1262, 1, 1,
-
1, 1263, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1262, 1256, 1257, 1256,
-
1256, 1256, 1256, 1256, 1264, 1, 1256, 1256,
-
1265, 1256, 1260, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1, 1,
-
1, 1256, 1, 1256, 1266, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1,
-
1, 1, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1, 1267, 1, 1262, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1262, 1, 1268,
-
1, 1, 1, 1269, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1268, 1270,
-
1271, 1270, 1270, 1270, 1270, 1270, 1272, 1,
-
1270, 1270, 1, 1270, 1273, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1, 1, 1, 1270, 1274, 1270, 1275, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1, 1, 1, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1, 1276, 1,
-
1, 1, 1277, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1276, 1, 1,
-
1, 1, 1, 1, 1, 1278, 1, 1,
-
1, 1, 1, 1279, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1280, 1, 1281, 1, 1282,
-
1, 1276, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1276, 1, 1283, 1, 1, 1, 1284, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1283, 1, 1, 1, 1, 1, 1,
-
1, 1285, 1, 1, 1, 1, 1, 1286,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1287,
-
1, 1288, 1, 1279, 1, 1, 1, 1289,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1279, 1290, 1291, 1290, 1290, 1290,
-
1290, 1290, 1292, 1, 1290, 1290, 1, 1290,
-
1, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1, 1, 1, 1290,
-
1, 1290, 1, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1, 1, 1,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1, 1293, 1, 1279, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1279, 1, 1294, 1, 1,
-
1, 1295, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1294, 1290, 1, 1290,
-
1290, 1290, 1290, 1290, 1296, 1, 1290, 1290,
-
1, 1290, 1279, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1, 1,
-
1, 1290, 1280, 1290, 1297, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1,
-
1, 1, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1, 1294, 1, 1, 1,
-
1295, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1294, 1, 1, 1, 1,
-
1, 1, 1, 1296, 1, 1, 1, 1,
-
1, 1279, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1280, 1, 1297, 1, 1298, 1, 1294,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1294, 1,
-
1299, 1, 1, 1, 1300, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1299,
-
1, 1, 1, 1, 1, 1, 1, 1301,
-
1, 1, 1, 1, 1, 1286, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1287, 1, 1302,
-
1, 1280, 1, 1, 1, 1303, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1280, 1, 1, 1, 1, 1, 1, 1,
-
1304, 1, 1, 1, 1305, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1306, 1, 1307, 1, 1280,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1280, 1,
-
1287, 1, 1, 1, 1308, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1287,
-
1, 1, 1, 1, 1, 1, 1, 1309,
-
1, 1, 1, 1310, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1311, 1, 1312, 1, 120, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 120, 1, 1313,
-
1, 1, 1, 1314, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1313, 1315,
-
1316, 1315, 1315, 1315, 1315, 1315, 1317, 1,
-
1315, 1315, 1, 1315, 1318, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1, 1, 1, 1315, 1, 1315, 1, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1315, 1319, 1, 1, 1315, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315,
-
1315, 1315, 1315, 1315, 1315, 1, 1320, 1,
-
1, 1, 1321, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1320, 1322, 1323,
-
1322, 1322, 1322, 1322, 1322, 1324, 1, 1322,
-
1322, 1, 1322, 1325, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1,
-
1, 1, 1322, 1, 1322, 1, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1326, 1, 1, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1, 1327, 1, 1320,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1320, 1,
-
1328, 1, 1, 1, 1329, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1328,
-
1322, 1323, 1322, 1322, 1322, 1322, 1322, 1330,
-
1, 1322, 1322, 1, 1322, 1331, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1, 1, 1, 1322, 1332, 1322, 1,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1, 1, 1, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1, 1328,
-
1, 1, 1, 1329, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1328, 1,
-
1, 1, 1, 1, 1, 1, 1330, 1,
-
1, 1, 1, 1, 1333, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1332, 1, 1334, 1,
-
1328, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1328,
-
1, 1335, 1, 1, 1, 1336, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1335, 1, 1, 1, 1, 1, 1, 1,
-
1337, 1, 1, 1, 1, 1, 1338, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1339, 1,
-
1333, 1, 1, 1, 1340, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1333,
-
1341, 1, 1341, 1341, 1341, 1341, 1341, 1342,
-
1, 1341, 1341, 1, 1341, 1, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1, 1, 1, 1341, 1, 1341, 1,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1, 1, 1, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1, 1343,
-
1, 1333, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1333, 1, 1328, 1, 1, 1, 1329, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1328, 1341, 1, 1341, 1341, 1341, 1341,
-
1341, 1330, 1, 1341, 1341, 1, 1341, 1333,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1, 1, 1, 1341, 1332,
-
1341, 1, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1, 1, 1, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
-
1, 1338, 1, 1, 1, 1344, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1338, 1345, 1, 1345, 1345, 1345, 1345, 1345,
-
1346, 1, 1345, 1345, 1, 1345, 1, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1, 1, 1, 1345, 1, 1345,
-
1, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1345, 1, 1, 1, 1345, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
-
1345, 1345, 1345, 1345, 1345, 1345, 1345, 1,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1323, 1, 1347, 1347, 1348, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1323,
-
1347, 1, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1349, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1, 1347, 1347, 1350, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1351, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1349, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
-
1347, 1347, 1347, 1347, 1347, 1347, 1347, 1,
-
1352, 1, 1347, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1347, 1, 1353, 1, 1, 1, 1354,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1353, 1351, 1323, 1351, 1351, 1351,
-
1351, 1351, 1355, 1, 1351, 1351, 1, 1351,
-
1325, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1, 1, 1, 1351,
-
1332, 1351, 1, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1, 1, 1,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1, 1353, 1, 1, 1, 1354, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1353, 1, 1, 1, 1, 1, 1,
-
1, 1355, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1332,
-
1, 1356, 1, 1353, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1353, 1, 1357, 1, 1, 1,
-
1358, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1357, 1, 1, 1, 1,
-
1, 1, 1, 1359, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1339, 1, 1351, 1323, 1351, 1351, 1351,
-
1351, 1351, 1, 1, 1351, 1351, 1, 1351,
-
1325, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1, 1, 1, 1351,
-
1, 1351, 1, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1, 1, 1,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351,
-
1351, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1347, 1360, 1, 1323, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1323, 1, 1333, 1,
-
1, 1, 1340, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1333, 1322, 1323,
-
1322, 1322, 1322, 1322, 1322, 1342, 1, 1322,
-
1322, 1, 1322, 1325, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1,
-
1, 1, 1322, 1, 1322, 1, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1, 1, 1, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1322, 1322, 1322, 1322,
-
1322, 1322, 1322, 1322, 1, 1361, 1, 1,
-
1, 1362, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1361, 1363, 1364, 1363,
-
1363, 1363, 1363, 1363, 1365, 1, 1363, 1363,
-
1, 1363, 1366, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1, 1,
-
1, 1363, 1, 1363, 1, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1363, 1367,
-
1, 1, 1363, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363,
-
1363, 1363, 1363, 1, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1, 1326, 1326,
-
1368, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1, 1369,
-
1353, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1326, 1326, 1326, 1326, 1326,
-
1326, 1326, 1326, 1, 1370, 1, 1326, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1326, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1326,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1, 1371, 1371, 1372, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1373, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1374, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371,
-
1371, 1371, 1371, 1371, 1371, 1371, 1371, 1,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1, 1375, 1375, 1376, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1377, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1378, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
-
1375, 1375, 1375, 1375, 1375, 1375, 1375, 1,
-
1379, 1, 1375, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1375, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1375, 1286, 1, 1, 1,
-
1380, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1286, 1381, 1382, 1381, 1381,
-
1381, 1381, 1381, 1383, 1, 1381, 1381, 1,
-
1381, 1, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1, 1, 1,
-
1381, 1, 1381, 1, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1, 1,
-
1, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1271, 1, 1384, 1384, 1385,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1271, 1384, 1, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1386, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1, 1384, 1384, 1387,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1388, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1386, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1, 1389, 1, 1384, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1384, 1, 1390, 1,
-
1, 1, 1391, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1390, 1388, 1271,
-
1388, 1388, 1388, 1388, 1388, 1392, 1, 1388,
-
1388, 1, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1,
-
1, 1, 1388, 1274, 1388, 1275, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1, 1, 1, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1, 1393, 1, 1,
-
1, 1394, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1393, 1, 1, 1,
-
1, 1, 1, 1, 1395, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1280, 1, 1281, 1, 1396, 1,
-
1393, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1393,
-
1, 1397, 1, 1, 1, 1398, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1397, 1, 1, 1, 1, 1, 1, 1,
-
1399, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1287, 1,
-
1288, 1, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1384, 1384, 1384, 1384, 1384, 1384,
-
1384, 1384, 1, 1400, 1, 1271, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1271, 1, 1401, 1,
-
1, 1, 1402, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1401, 1270, 1403,
-
1270, 1270, 1270, 1270, 1270, 1404, 1, 1270,
-
1270, 1, 1270, 1388, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1,
-
1, 1, 1270, 1274, 1270, 1275, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1, 1, 1, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270,
-
1270, 1270, 1270, 1270, 1, 1405, 1, 1,
-
1, 1406, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1405, 1290, 1291, 1290,
-
1290, 1290, 1290, 1290, 1407, 1, 1290, 1290,
-
1, 1290, 1, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1, 1,
-
1, 1290, 1280, 1290, 1281, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1,
-
1, 1, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
-
1290, 1290, 1290, 1, 1408, 1, 1405, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1405, 1, 1409,
-
1, 1, 1, 1410, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1409, 1381,
-
1382, 1381, 1381, 1381, 1381, 1381, 1411, 1,
-
1381, 1381, 1, 1381, 1, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1, 1, 1, 1381, 1287, 1381, 1288, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1, 1, 1, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381,
-
1381, 1381, 1381, 1381, 1381, 1, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1413, 1,
-
1412, 1412, 1414, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1413, 1412, 1373,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1415, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
-
1412, 1412, 1412, 1412, 1412, 1, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1,
-
1416, 1416, 1417, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1418,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1419, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1, 1420, 1,
-
1416, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1416,
-
1, 1268, 1, 1, 1, 1269, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1268, 1388, 1271, 1388, 1388, 1388, 1388, 1388,
-
1272, 1, 1388, 1388, 1, 1388, 1273, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1, 1, 1, 1388, 1274, 1388,
-
1275, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1, 1, 1, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1421, 1, 1416, 1416, 1422, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1421, 1416, 1377, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1419, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1416, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
-
1, 1423, 1, 1421, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1421, 1, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1425, 1, 1424, 1424,
-
1426, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1425, 1424, 1427, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1428,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1424, 1424, 1424, 1424, 1424,
-
1424, 1424, 1424, 1, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1, 1429, 1429,
-
1430, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1431, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1432,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1, 1433, 1, 1429, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1429, 1, 1434,
-
1, 1, 1, 1435, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1434, 1388,
-
1271, 1388, 1388, 1388, 1388, 1388, 1436, 1,
-
1388, 1388, 1, 1388, 1273, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1, 1, 1, 1388, 1274, 1388, 1437, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1, 1, 1, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1, 1438, 1,
-
1, 1, 1439, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1438, 1, 1,
-
1, 1, 1, 1, 1, 1440, 1, 1,
-
1, 1, 1, 1279, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1280, 1, 1441, 1, 1442,
-
1, 1438, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1438, 1, 1443, 1, 1, 1, 1444, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1443, 1, 1, 1, 1, 1, 1,
-
1, 1445, 1, 1, 1, 1, 1, 1286,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1287,
-
1, 1446, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1447, 1, 1429, 1429,
-
1448, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1447, 1429, 1449, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1432,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429,
-
1429, 1429, 1429, 1, 1450, 1, 1447, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1447, 1, 1451,
-
1, 1, 1, 1452, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1451, 1,
-
1, 1, 1, 1, 1, 1, 1453, 1,
-
1, 1, 1, 1, 1279, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1280, 1, 1454, 1,
-
1455, 1, 1451, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1451, 1, 1456, 1, 1, 1, 1457,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1456, 1, 1, 1, 1, 1,
-
1, 1, 1458, 1, 1, 1, 1, 1,
-
1286, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1287, 1, 1459, 1, 1460, 1, 1, 1,
-
1461, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1460, 1462, 1463, 1462, 1462,
-
1462, 1462, 1462, 1464, 1, 1462, 1462, 1465,
-
1462, 1466, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1, 1, 1,
-
1462, 1, 1462, 1467, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1, 1,
-
1, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1, 1265, 1, 1, 1, 1468,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1265, 1, 1, 1, 1, 1,
-
1, 1, 1469, 1, 1, 1, 1265, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1266, 1, 1470, 1, 1265, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1265, 1, 1465,
-
1, 1, 1, 1471, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1465, 1,
-
1, 1, 1, 1, 1, 1, 1472, 1,
-
1, 1, 1465, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1467, 1,
-
1473, 1, 1, 1, 1474, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1473,
-
1475, 1476, 1475, 1475, 1475, 1475, 1475, 1477,
-
1, 1475, 1475, 1, 1475, 1478, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1, 1, 1, 1475, 1, 1475, 1,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1475, 1479, 1, 1, 1475, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475,
-
1475, 1475, 1475, 1475, 1475, 1475, 1, 1480,
-
1, 1, 1, 1481, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1480, 1482,
-
1483, 1482, 1482, 1482, 1482, 1482, 1484, 1,
-
1482, 1482, 1, 1482, 1485, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1, 1, 1, 1482, 1, 1482, 1, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1486, 1, 1, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1, 1487, 1,
-
1480, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1480,
-
1, 1488, 1, 1, 1, 1489, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1488, 1482, 1483, 1482, 1482, 1482, 1482, 1482,
-
1490, 1, 1482, 1482, 1491, 1482, 1492, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1493, 1, 1, 1482, 1, 1482,
-
1, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1, 1, 1, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1,
-
1488, 1, 1, 1, 1489, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1488,
-
1, 1, 1, 1, 1, 1, 1, 1490,
-
1, 1, 1, 1491, 1, 1494, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1493, 1, 1495, 1, 1488, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1488, 1, 1496, 1,
-
1, 1, 1497, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1496, 1, 1,
-
1, 1, 1, 1, 1, 1498, 1, 1,
-
1, 1499, 1, 1500, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1501,
-
1, 1502, 1, 1, 1, 1503, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1502, 1, 1, 1, 1, 1, 1, 1,
-
1504, 1, 1, 1, 1502, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1505, 1, 1, 1, 1, 1,
-
1266, 1, 1506, 1, 1502, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1502, 1, 1507, 1, 1,
-
1, 1508, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1507, 1, 1, 1,
-
1, 1, 1, 1, 1509, 1, 1, 1,
-
1507, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1510, 1,
-
1, 1, 1, 1, 1467, 1, 1511, 1,
-
1, 1, 1512, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1511, 1513, 1514,
-
1513, 1513, 1513, 1513, 1513, 1515, 1, 1513,
-
1513, 1, 1513, 1516, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1,
-
1, 1, 1513, 1, 1513, 1, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1513,
-
1, 1, 1, 1513, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1513, 1513, 1513, 1513,
-
1513, 1513, 1513, 1513, 1, 1517, 1, 1,
-
1, 1518, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1517, 1256, 1257, 1256,
-
1256, 1256, 1256, 1256, 1519, 1, 1256, 1256,
-
1, 1256, 1260, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1, 1,
-
1, 1256, 1, 1256, 1, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1,
-
1, 1, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
-
1256, 1256, 1256, 1, 1520, 1, 1517, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1517, 1, 1521,
-
1, 1, 1, 1522, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1521, 1462,
-
1463, 1462, 1462, 1462, 1462, 1462, 1523, 1,
-
1462, 1462, 1, 1462, 1466, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1, 1, 1, 1462, 1, 1462, 1, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1, 1, 1, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1462, 1462, 1462,
-
1462, 1462, 1462, 1462, 1462, 1, 1388, 1271,
-
1388, 1388, 1388, 1388, 1388, 1, 1, 1388,
-
1388, 1, 1388, 1524, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1,
-
1, 1, 1388, 1, 1388, 1, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1, 1, 1, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388,
-
1388, 1388, 1388, 1388, 1, 1494, 1, 1,
-
1, 1525, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1494, 1526, 1, 1526,
-
1526, 1526, 1526, 1526, 1527, 1, 1526, 1526,
-
1, 1526, 1, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1, 1,
-
1, 1526, 1, 1526, 1, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1,
-
1, 1, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1, 1528, 1, 1494, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1494, 1, 1488,
-
1, 1, 1, 1489, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1488, 1526,
-
1, 1526, 1526, 1526, 1526, 1526, 1490, 1,
-
1526, 1526, 1491, 1526, 1494, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1493, 1, 1, 1526, 1, 1526, 1, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1, 1, 1, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1526, 1526, 1526,
-
1526, 1526, 1526, 1526, 1526, 1, 1500, 1,
-
1, 1, 1529, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1500, 1530, 1,
-
1530, 1530, 1530, 1530, 1530, 1531, 1, 1530,
-
1530, 1, 1530, 1, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1,
-
1, 1, 1530, 1, 1530, 1, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
-
1, 1, 1, 1530, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
-
1530, 1530, 1530, 1530, 1, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1483, 1, 1532,
-
1532, 1533, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1483, 1532, 1, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1534, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1, 1532,
-
1532, 1535, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1536, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1534, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1, 1537, 1, 1532,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1532, 1,
-
1538, 1, 1, 1, 1539, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1538,
-
1536, 1483, 1536, 1536, 1536, 1536, 1536, 1540,
-
1, 1536, 1536, 1491, 1536, 1485, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1493, 1, 1, 1536, 1, 1536, 1,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1, 1, 1, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1, 1538,
-
1, 1, 1, 1539, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1538, 1,
-
1, 1, 1, 1, 1, 1, 1540, 1,
-
1, 1, 1491, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1493, 1, 1541, 1, 1538, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1538, 1, 1542, 1, 1,
-
1, 1543, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1542, 1, 1, 1,
-
1, 1, 1, 1, 1544, 1, 1, 1,
-
1499, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1501, 1,
-
1536, 1483, 1536, 1536, 1536, 1536, 1536, 1,
-
1, 1536, 1536, 1, 1536, 1485, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1, 1, 1, 1536, 1, 1536, 1,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1, 1, 1, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
-
1536, 1536, 1536, 1536, 1536, 1536, 1, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
-
1532, 1532, 1532, 1532, 1532, 1532, 1532, 1,
-
1545, 1, 1483, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1483, 1, 1494, 1, 1, 1, 1525,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1494, 1482, 1483, 1482, 1482, 1482,
-
1482, 1482, 1527, 1, 1482, 1482, 1, 1482,
-
1485, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1, 1, 1, 1482,
-
1, 1482, 1, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1, 1, 1,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
-
1482, 1, 1546, 1, 1, 1, 1547, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1546, 1548, 1549, 1548, 1548, 1548, 1548,
-
1548, 1550, 1, 1548, 1548, 1, 1548, 1551,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1, 1, 1, 1548, 1,
-
1548, 1, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1548, 1552, 1, 1, 1548,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
-
1, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1, 1486, 1486, 1553, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1, 1554, 1538, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1, 1555, 1, 1486, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1486, 1, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1486, 1486, 1486, 1486,
-
1486, 1486, 1486, 1486, 1, 1556, 1, 1,
-
1, 1557, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1556, 1238, 1239, 1238,
-
1238, 1238, 1238, 1238, 1558, 1, 1238, 1238,
-
1559, 1238, 1560, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1, 1561,
-
1242, 1238, 1, 1238, 1562, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1,
-
1, 1, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1, 1563, 1, 1, 1,
-
1564, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1563, 1565, 1566, 1565, 1565,
-
1565, 1565, 1565, 1567, 1, 1565, 1565, 1,
-
1565, 1225, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1, 1, 1209,
-
1565, 1, 1565, 1225, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1, 1,
-
1, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1, 1568, 1, 1, 1, 1569,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1568, 1565, 1566, 1565, 1565, 1565,
-
1565, 1565, 1570, 1, 1565, 1565, 1, 1565,
-
1, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1, 1, 1199, 1565,
-
1, 1565, 1, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1, 1, 1,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1, 1571, 1, 1568, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1568, 1, 1572, 1, 1,
-
1, 1573, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1572, 1565, 1214, 1565,
-
1565, 1565, 1565, 1565, 1574, 1, 1565, 1565,
-
1305, 1565, 1217, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1, 1306,
-
1209, 1565, 1, 1565, 1575, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1,
-
1, 1, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1, 1572, 1, 1, 1,
-
1573, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1572, 1213, 1214, 1213, 1213,
-
1213, 1213, 1213, 1574, 1, 1213, 1213, 1305,
-
1213, 1217, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1, 1306, 1209,
-
1213, 1, 1213, 1575, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1, 1,
-
1, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1, 1576, 1, 1577, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1577, 1, 1578, 1,
-
1, 1, 1579, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1578, 1238, 1239,
-
1238, 1238, 1238, 1238, 1238, 1580, 1, 1238,
-
1238, 1310, 1238, 1560, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1,
-
1311, 1242, 1238, 1, 1238, 1581, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1, 1, 1, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1, 1582, 1, 1,
-
1, 1583, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1582, 1584, 1585, 1584,
-
1584, 1584, 1584, 1584, 1586, 1, 1584, 1584,
-
1, 1584, 1587, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1, 1,
-
1209, 1584, 1, 1584, 1225, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1584, 1588,
-
1, 1, 1584, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584,
-
1584, 1584, 1584, 1, 1589, 1, 1, 1,
-
1590, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1589, 1591, 1592, 1591, 1591,
-
1591, 1591, 1591, 1593, 1, 1591, 1591, 1,
-
1591, 1594, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1, 1, 1199,
-
1591, 1, 1591, 1, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1595, 1,
-
1, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1, 1596, 1, 1589, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1589, 1, 1597, 1,
-
1, 1, 1598, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1597, 1591, 1592,
-
1591, 1591, 1591, 1591, 1591, 1599, 1, 1591,
-
1591, 1600, 1591, 1601, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1,
-
1602, 1209, 1591, 1, 1591, 1225, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1, 1, 1, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1, 1597, 1, 1,
-
1, 1598, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1597, 1213, 1214, 1213,
-
1213, 1213, 1213, 1213, 1599, 1, 1213, 1213,
-
1600, 1213, 1603, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1, 1602,
-
1209, 1213, 1, 1213, 1225, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1,
-
1, 1, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1, 1604, 1, 1605, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1605, 1, 1606,
-
1, 1, 1, 1607, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1606, 1238,
-
1239, 1238, 1238, 1238, 1238, 1238, 1608, 1,
-
1238, 1238, 1609, 1238, 1610, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1, 1611, 1242, 1238, 1, 1238, 1241, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1, 1, 1, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1, 1612, 1,
-
1, 1, 1613, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1612, 1614, 1214,
-
1614, 1614, 1614, 1614, 1614, 1615, 1, 1614,
-
1614, 1, 1614, 1225, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1,
-
1, 1209, 1614, 1, 1614, 1225, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1, 1, 1, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1, 1616, 1, 1,
-
1, 1617, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1616, 1614, 1214, 1614,
-
1614, 1614, 1614, 1614, 1618, 1, 1614, 1614,
-
1, 1614, 1, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1, 1,
-
1199, 1614, 1, 1614, 1, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1,
-
1, 1, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1, 1619, 1, 1616, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1616, 1, 1597,
-
1, 1, 1, 1598, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1597, 1614,
-
1214, 1614, 1614, 1614, 1614, 1614, 1599, 1,
-
1614, 1614, 1600, 1614, 1603, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1, 1602, 1209, 1614, 1, 1614, 1225, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1, 1, 1, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1614, 1614, 1614,
-
1614, 1614, 1614, 1614, 1614, 1, 1620, 1,
-
1, 1, 1621, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1620, 1622, 1239,
-
1622, 1622, 1622, 1622, 1622, 1623, 1, 1622,
-
1622, 1, 1622, 1, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1,
-
1, 1253, 1622, 1, 1622, 1, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
-
1, 1, 1, 1622, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
-
1622, 1622, 1622, 1622, 1, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1625, 1, 1624,
-
1624, 1626, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1625, 1624, 1229, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1627, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
-
1624, 1624, 1624, 1624, 1, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1, 1628,
-
1628, 1629, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1630, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1631, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1, 1632, 1, 1628,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1628, 1,
-
1633, 1, 1, 1, 1634, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1633,
-
1635, 1592, 1635, 1635, 1635, 1635, 1635, 1636,
-
1, 1635, 1635, 1600, 1635, 1637, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1, 1602, 1209, 1635, 1, 1635, 1225,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1, 1, 1, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1, 1633,
-
1, 1, 1, 1634, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1633, 1213,
-
1214, 1213, 1213, 1213, 1213, 1213, 1636, 1,
-
1213, 1213, 1600, 1213, 1225, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1, 1602, 1209, 1213, 1, 1213, 1225, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1, 1, 1, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1, 1638, 1,
-
1639, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1639,
-
1, 1640, 1, 1, 1, 1641, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1640, 1238, 1239, 1238, 1238, 1238, 1238, 1238,
-
1642, 1, 1238, 1238, 1609, 1238, 1241, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1, 1611, 1242, 1238, 1, 1238,
-
1241, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1, 1, 1, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1,
-
1243, 1, 1, 1, 1244, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1243,
-
1635, 1592, 1635, 1635, 1635, 1635, 1635, 1245,
-
1, 1635, 1635, 1, 1635, 1637, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1, 1, 1209, 1635, 1, 1635, 1225,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1, 1, 1, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
-
1635, 1635, 1635, 1635, 1635, 1635, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1643, 1, 1628, 1628, 1644, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1643,
-
1628, 1233, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1631, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1628,
-
1628, 1628, 1628, 1628, 1628, 1628, 1628, 1,
-
1645, 1, 1643, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1643, 1, 1612, 1, 1, 1, 1613,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1612, 1591, 1592, 1591, 1591, 1591,
-
1591, 1591, 1615, 1, 1591, 1591, 1, 1591,
-
1637, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1, 1, 1209, 1591,
-
1, 1591, 1225, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1, 1, 1,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591,
-
1591, 1, 1646, 1, 1, 1, 1647, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1646, 1648, 1649, 1648, 1648, 1648, 1648,
-
1648, 1650, 1, 1648, 1648, 1, 1648, 1651,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1, 1, 1253, 1648, 1,
-
1648, 1, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1648, 1652, 1, 1, 1648,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
-
1, 1653, 1654, 1653, 1653, 1653, 1653, 1653,
-
1, 1, 1653, 1653, 1, 1653, 1594, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1, 1, 1, 1653, 1, 1653,
-
1, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1, 1, 1, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1,
-
1655, 1, 1, 1, 1656, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1655,
-
1653, 1654, 1653, 1653, 1653, 1653, 1653, 1657,
-
1, 1653, 1653, 1600, 1653, 1594, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1, 1602, 1, 1653, 1, 1653, 1,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1, 1, 1, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
-
1653, 1653, 1653, 1653, 1653, 1653, 1, 1655,
-
1, 1, 1, 1656, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1655, 1,
-
1, 1, 1, 1, 1, 1, 1657, 1,
-
1, 1, 1600, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1602, 1, 1658, 1, 1655, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1655, 1, 1659, 1,
-
1, 1, 1660, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1659, 1, 1,
-
1, 1, 1, 1, 1, 1661, 1, 1,
-
1, 1609, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1611, 1, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1654, 1, 1662, 1662, 1663, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1654, 1662, 1, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1664, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1, 1662, 1662, 1665, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1653, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1664, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1, 1666, 1, 1662, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1662, 1, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
-
1662, 1662, 1662, 1662, 1662, 1, 1667, 1,
-
1654, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1654,
-
1, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1, 1595, 1595, 1668, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1, 1669, 1655, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
-
1, 1670, 1, 1595, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1595, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1595, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1, 1671,
-
1671, 1672, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1673, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1674, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1671, 1671, 1671, 1671,
-
1671, 1671, 1671, 1671, 1, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1, 1675,
-
1675, 1676, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1677, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1678, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
-
1675, 1675, 1675, 1675, 1, 1679, 1, 1675,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1675, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1675, 1680, 1, 1, 1, 1681, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1680, 1682, 1683, 1682, 1682, 1682, 1682, 1682,
-
1684, 1, 1682, 1682, 1, 1682, 1, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1, 1, 1253, 1682, 1, 1682,
-
1, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1, 1, 1, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1686, 1, 1685, 1685, 1687, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1686,
-
1685, 1229, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1688, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685,
-
1685, 1685, 1685, 1685, 1685, 1685, 1685, 1,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1, 1689, 1689, 1690, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1691, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1692, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1,
-
1693, 1, 1689, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1689, 1, 1694, 1, 1, 1, 1695,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1694, 1696, 1204, 1696, 1696, 1696,
-
1696, 1696, 1697, 1, 1696, 1696, 1206, 1696,
-
1698, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1, 1208, 1209, 1696,
-
1, 1696, 1210, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1, 1, 1,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1, 1699, 1, 1, 1, 1700, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1699, 1213, 1214, 1213, 1213, 1213, 1213,
-
1213, 1701, 1, 1213, 1213, 1216, 1213, 1225,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1, 1218, 1209, 1213, 1,
-
1213, 1219, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1, 1, 1, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1, 1702, 1, 1703, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1703, 1, 1704, 1, 1, 1,
-
1705, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1704, 1238, 1239, 1238, 1238,
-
1238, 1238, 1238, 1706, 1, 1238, 1238, 1559,
-
1238, 1241, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1, 1561, 1242,
-
1238, 1, 1238, 1562, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1, 1,
-
1, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1, 1707, 1, 1, 1, 1708,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1707, 1696, 1204, 1696, 1696, 1696,
-
1696, 1696, 1709, 1, 1696, 1696, 1206, 1696,
-
1698, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1, 1208, 1209, 1696,
-
1, 1696, 1210, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1, 1, 1,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1, 1710, 1, 1, 1, 1711, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1710, 1213, 1214, 1213, 1213, 1213, 1213,
-
1213, 1712, 1, 1213, 1213, 1216, 1213, 1,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1, 1218, 1199, 1213, 1,
-
1213, 1713, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1, 1, 1, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1, 1714, 1, 1710, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1710, 1, 1715, 1, 1, 1,
-
1716, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1715, 1238, 1239, 1238, 1238,
-
1238, 1238, 1238, 1717, 1, 1238, 1238, 1559,
-
1238, 1, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1, 1561, 1253,
-
1238, 1, 1238, 1718, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1, 1,
-
1, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1, 1719, 1, 1, 1, 1720,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1719, 1721, 1722, 1721, 1721, 1721,
-
1721, 1721, 1723, 1, 1721, 1721, 1, 1721,
-
1724, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1, 1, 1, 1721,
-
1, 1721, 1, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1721, 1588, 1, 1,
-
1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
-
1721, 1, 1725, 1, 1, 1, 1726, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1725, 1727, 1654, 1727, 1727, 1727, 1727,
-
1727, 1728, 1, 1727, 1727, 1, 1727, 1594,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1, 1, 1, 1727, 1,
-
1727, 1, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1595, 1, 1, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1, 1729, 1, 1725, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1725, 1, 1730, 1, 1, 1,
-
1731, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1730, 1727, 1654, 1727, 1727,
-
1727, 1727, 1727, 1732, 1, 1727, 1727, 1600,
-
1727, 1733, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1, 1602, 1,
-
1727, 1, 1727, 1, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1, 1,
-
1, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1, 1730, 1, 1, 1, 1731,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1730, 1, 1, 1, 1, 1,
-
1, 1, 1732, 1, 1, 1, 1600, 1,
-
1734, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1602, 1, 1735,
-
1, 1730, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1730, 1, 1736, 1, 1, 1, 1737, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1736, 1, 1, 1, 1, 1, 1,
-
1, 1738, 1, 1, 1, 1609, 1, 1739,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1611, 1, 1734, 1,
-
1, 1, 1740, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1734, 1741, 1,
-
1741, 1741, 1741, 1741, 1741, 1742, 1, 1741,
-
1741, 1, 1741, 1, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1,
-
1, 1, 1741, 1, 1741, 1, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1, 1, 1, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1, 1743, 1, 1734,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1734, 1,
-
1730, 1, 1, 1, 1731, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1730,
-
1741, 1, 1741, 1741, 1741, 1741, 1741, 1732,
-
1, 1741, 1741, 1600, 1741, 1734, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1, 1602, 1, 1741, 1, 1741, 1,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1, 1, 1, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1741, 1741,
-
1741, 1741, 1741, 1741, 1741, 1741, 1, 1739,
-
1, 1, 1, 1744, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1739, 1745,
-
1, 1745, 1745, 1745, 1745, 1745, 1746, 1,
-
1745, 1745, 1, 1745, 1, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1, 1, 1, 1745, 1, 1745, 1, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1745, 1, 1, 1, 1745, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1745, 1745, 1745,
-
1745, 1745, 1745, 1745, 1745, 1, 1734, 1,
-
1, 1, 1740, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1734, 1727, 1654,
-
1727, 1727, 1727, 1727, 1727, 1742, 1, 1727,
-
1727, 1, 1727, 1594, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1,
-
1, 1, 1727, 1, 1727, 1, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1, 1, 1, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1727, 1727, 1727, 1727,
-
1727, 1727, 1727, 1727, 1, 1747, 1, 1,
-
1, 1748, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1747, 1749, 1750, 1749,
-
1749, 1749, 1749, 1749, 1751, 1, 1749, 1749,
-
1, 1749, 1651, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1, 1,
-
1, 1749, 1, 1749, 1, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1749, 1652,
-
1, 1, 1749, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749,
-
1749, 1749, 1749, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1752, 1, 1689,
-
1689, 1753, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1752, 1689, 1233, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1692, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
1689, 1689, 1689, 1689, 1, 1754, 1, 1752,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1752, 1,
-
1755, 1, 1, 1, 1756, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1755,
-
1203, 1757, 1203, 1203, 1203, 1203, 1203, 1758,
-
1, 1203, 1203, 1206, 1203, 1698, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1, 1208, 1209, 1203, 1, 1203, 1210,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1, 1, 1, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203,
-
1203, 1203, 1203, 1203, 1203, 1203, 1, 1759,
-
1, 1, 1, 1760, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1759, 1565,
-
1566, 1565, 1565, 1565, 1565, 1565, 1761, 1,
-
1565, 1565, 1216, 1565, 1, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1, 1218, 1199, 1565, 1, 1565, 1713, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1, 1, 1, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
1565, 1565, 1565, 1565, 1565, 1, 1762, 1,
-
1759, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1759,
-
1, 1763, 1, 1, 1, 1764, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1763, 1682, 1683, 1682, 1682, 1682, 1682, 1682,
-
1765, 1, 1682, 1682, 1559, 1682, 1, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1, 1561, 1253, 1682, 1, 1682,
-
1718, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1, 1, 1, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
1682, 1682, 1682, 1682, 1682, 1682, 1682, 1,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1767, 1, 1766, 1766, 1768, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1767,
-
1766, 1673, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1769, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
1766, 1766, 1766, 1766, 1766, 1766, 1766, 1,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1, 1770, 1770, 1771, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1772, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1773, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1,
-
1774, 1, 1770, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1770, 1, 1201, 1, 1, 1, 1202,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1201, 1696, 1204, 1696, 1696, 1696,
-
1696, 1696, 1205, 1, 1696, 1696, 1206, 1696,
-
1207, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1, 1208, 1209, 1696,
-
1, 1696, 1210, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1, 1, 1,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1775, 1, 1770, 1770, 1776,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1775, 1770, 1677, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1773, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1770, 1770, 1770, 1770, 1770, 1770,
-
1770, 1770, 1, 1777, 1, 1775, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1775, 1, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1779, 1,
-
1778, 1778, 1780, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1779, 1778, 1781,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1782, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1778, 1778, 1778,
-
1778, 1778, 1778, 1778, 1778, 1, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1,
-
1783, 1783, 1784, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1785,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1786, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1, 1787, 1,
-
1783, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1783,
-
1, 1788, 1, 1, 1, 1789, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1788, 1696, 1204, 1696, 1696, 1696, 1696, 1696,
-
1790, 1, 1696, 1696, 1791, 1696, 1207, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1, 1792, 1209, 1696, 1, 1696,
-
1793, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1, 1, 1, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1,
-
1794, 1, 1, 1, 1795, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1794,
-
1213, 1214, 1213, 1213, 1213, 1213, 1213, 1796,
-
1, 1213, 1213, 1797, 1213, 1217, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1, 1798, 1209, 1213, 1, 1213, 1799,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1, 1, 1, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1, 1800,
-
1, 1801, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1801, 1, 1802, 1, 1, 1, 1803, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1802, 1238, 1239, 1238, 1238, 1238, 1238,
-
1238, 1804, 1, 1238, 1238, 1805, 1238, 1560,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1, 1806, 1242, 1238, 1,
-
1238, 1807, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1, 1, 1, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1808, 1, 1783, 1783, 1809, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1808, 1783, 1810, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1786, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783,
-
1783, 1, 1811, 1, 1808, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1808, 1, 1812, 1, 1,
-
1, 1813, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1812, 1213, 1214, 1213,
-
1213, 1213, 1213, 1213, 1814, 1, 1213, 1213,
-
1815, 1213, 1217, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1, 1816,
-
1209, 1213, 1, 1213, 1817, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1,
-
1, 1, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
-
1213, 1213, 1213, 1, 1818, 1, 1819, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1819, 1, 1820,
-
1, 1, 1, 1821, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1820, 1238,
-
1239, 1238, 1238, 1238, 1238, 1238, 1822, 1,
-
1238, 1238, 1823, 1238, 1560, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1, 1824, 1242, 1238, 1, 1238, 1825, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1, 1, 1, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
-
1238, 1238, 1238, 1238, 1238, 1, 1826, 1,
-
1, 1, 1827, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1826, 1828, 1829,
-
1828, 1828, 1828, 1828, 1828, 1830, 1, 1828,
-
1828, 1182, 1828, 1831, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1,
-
1184, 1253, 1828, 1, 1828, 1, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1, 1, 1, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1, 1832, 1833, 1832,
-
1832, 1832, 1832, 1832, 1, 1, 1832, 1832,
-
1, 1832, 1834, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1, 1,
-
1, 1832, 1, 1832, 1, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1,
-
1, 1, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1, 1835, 1, 1, 1,
-
1836, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1835, 1832, 1833, 1832, 1832,
-
1832, 1832, 1832, 1837, 1, 1832, 1832, 1206,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1, 1208, 1,
-
1832, 1, 1832, 1838, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1, 1,
-
1, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832,
-
1832, 1832, 1, 1839, 1, 1, 1, 1840,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1839, 1, 1, 1, 1, 1,
-
1, 1, 1841, 1, 1, 1, 1216, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1218, 1, 1,
-
1, 1, 1713, 1, 1842, 1, 1839, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1839, 1, 1843,
-
1, 1, 1, 1844, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1843, 1,
-
1, 1, 1, 1, 1, 1, 1845, 1,
-
1, 1, 1559, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1561, 1, 1, 1, 1, 1718, 1,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1833, 1, 1846, 1846, 1847, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1833,
-
1846, 1, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1848, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1, 1846, 1846, 1849, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1832, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1848, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
-
1846, 1846, 1846, 1846, 1846, 1846, 1846, 1,
-
1850, 1, 1846, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1846, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1846, 1851, 1, 1833, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1833, 1, 1243,
-
1, 1, 1, 1244, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1243, 1696,
-
1204, 1696, 1696, 1696, 1696, 1696, 1245, 1,
-
1696, 1696, 1, 1696, 1852, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1, 1, 1209, 1696, 1, 1696, 1225, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1, 1, 1, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
-
1696, 1696, 1696, 1696, 1696, 1, 1853, 1854,
-
1853, 1853, 1853, 1853, 1853, 1, 1, 1853,
-
1853, 1, 1853, 1855, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1,
-
1, 1, 1853, 1, 1853, 1, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1, 1, 1, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1, 1856, 1, 1,
-
1, 1857, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1856, 1853, 1854, 1853,
-
1853, 1853, 1853, 1853, 1858, 1, 1853, 1853,
-
136, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1, 138,
-
1, 1853, 1, 1853, 1859, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1,
-
1, 1, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853,
-
1853, 1853, 1853, 1, 1860, 1, 1, 1,
-
1861, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1860, 1, 1, 1, 1,
-
1, 1, 1, 1862, 1, 1, 1, 146,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 148, 1,
-
1, 1, 1, 1096, 1, 1863, 1, 1860,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1860, 1,
-
1864, 1, 1, 1, 1865, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1864,
-
1, 1, 1, 1, 1, 1, 1, 1866,
-
1, 1, 1, 1076, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 590, 1, 1, 1, 1, 1101,
-
1, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1854, 1, 1867, 1867, 1868, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1854, 1867, 1, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1869, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1, 1867, 1867, 1870, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1853, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1869, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1, 1871, 1, 1867, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1867, 1, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867,
-
1867, 1867, 1867, 1867, 1, 1872, 1, 1854,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1854, 1,
-
173, 1, 1, 1, 174, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 173,
-
262, 134, 262, 262, 262, 262, 262, 175,
-
1, 262, 262, 1, 262, 1873, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 1, 1, 139, 262, 1, 262, 155,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 1, 1, 1, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 262, 262,
-
262, 262, 262, 262, 262, 262, 1, 1874,
-
1, 1, 1, 1875, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1874, 1876,
-
1877, 1876, 1876, 1876, 1876, 1876, 1878, 1,
-
1876, 1876, 1, 1876, 1879, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1, 1, 1, 1876, 1, 1876, 1, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1876, 1880, 1, 1, 1876, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876,
-
1876, 1876, 1876, 1876, 1876, 1, 1881, 1,
-
1, 1, 1882, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1881, 1883, 1884,
-
1883, 1883, 1883, 1883, 1883, 1885, 1, 1883,
-
1883, 1, 1883, 1886, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1,
-
1, 1, 1883, 1, 1883, 1, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1887, 1, 1, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1, 1888, 1, 1881,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1881, 1,
-
1889, 1, 1, 1, 1890, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1889,
-
1883, 1884, 1883, 1883, 1883, 1883, 1883, 1891,
-
1, 1883, 1883, 1, 1883, 1892, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1, 1, 1, 1883, 1893, 1883, 1,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1, 1, 1, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1, 1889,
-
1, 1, 1, 1890, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1889, 1,
-
1, 1, 1, 1, 1, 1, 1891, 1,
-
1, 1, 1, 1, 1894, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1893, 1, 1895, 1,
-
1889, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1889,
-
1, 1896, 1, 1, 1, 1897, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1896, 1, 1, 1, 1, 1, 1, 1,
-
1898, 1, 1, 1, 1, 1, 1899, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1900, 1,
-
1894, 1, 1, 1, 1901, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1894,
-
1902, 1, 1902, 1902, 1902, 1902, 1902, 1903,
-
1, 1902, 1902, 1, 1902, 1, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1, 1, 1, 1902, 1, 1902, 1,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1, 1, 1, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1, 1904,
-
1, 1894, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1894, 1, 1889, 1, 1, 1, 1890, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1889, 1902, 1, 1902, 1902, 1902, 1902,
-
1902, 1891, 1, 1902, 1902, 1, 1902, 1894,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1, 1, 1, 1902, 1893,
-
1902, 1, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1, 1, 1, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902,
-
1, 1899, 1, 1, 1, 1905, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1899, 1906, 1, 1906, 1906, 1906, 1906, 1906,
-
1907, 1, 1906, 1906, 1, 1906, 1, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1, 1, 1, 1906, 1, 1906,
-
1, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1906, 1, 1, 1, 1906, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1906,
-
1906, 1906, 1906, 1906, 1906, 1906, 1906, 1,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1884, 1, 1908, 1908, 1909, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1884,
-
1908, 1, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1910, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1, 1908, 1908, 1911, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1912, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1910, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
-
1908, 1908, 1908, 1908, 1908, 1908, 1908, 1,
-
1913, 1, 1908, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1908, 1, 1914, 1, 1, 1, 1915,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1914, 1912, 1884, 1912, 1912, 1912,
-
1912, 1912, 1916, 1, 1912, 1912, 1, 1912,
-
1886, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1, 1, 1, 1912,
-
1893, 1912, 1, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1, 1, 1,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1, 1914, 1, 1, 1, 1915, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1914, 1, 1, 1, 1, 1, 1,
-
1, 1916, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1893,
-
1, 1917, 1, 1914, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1914, 1, 1918, 1, 1, 1,
-
1919, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1918, 1, 1, 1, 1,
-
1, 1, 1, 1920, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1900, 1, 1912, 1884, 1912, 1912, 1912,
-
1912, 1912, 1, 1, 1912, 1912, 1, 1912,
-
1886, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1, 1, 1, 1912,
-
1, 1912, 1, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1, 1, 1,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912,
-
1912, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1908, 1921, 1, 1884, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1884, 1, 1894, 1,
-
1, 1, 1901, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1894, 1883, 1884,
-
1883, 1883, 1883, 1883, 1883, 1903, 1, 1883,
-
1883, 1, 1883, 1886, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1,
-
1, 1, 1883, 1, 1883, 1, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1, 1, 1, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883,
-
1883, 1883, 1883, 1883, 1, 1922, 1, 1,
-
1, 1923, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1922, 1924, 1925, 1924,
-
1924, 1924, 1924, 1924, 1926, 1, 1924, 1924,
-
1, 1924, 1927, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1, 1,
-
1, 1924, 1, 1924, 1, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1924, 1928,
-
1, 1, 1924, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
-
1924, 1924, 1924, 1, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1, 1887, 1887,
-
1929, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1, 1930,
-
1914, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887,
-
1887, 1887, 1887, 1, 1931, 1, 1887, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1887, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1887,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1, 1932, 1932, 1933, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1934, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1935, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,
-
1932, 1932, 1932, 1932, 1932, 1932, 1932, 1,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1, 1936, 1936, 1937, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1938, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1939, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1936,
-
1936, 1936, 1936, 1936, 1936, 1936, 1936, 1,
-
1940, 1, 1936, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1936, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1936, 216, 1, 1, 1,
-
1941, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 216, 1942, 1943, 1942, 1942,
-
1942, 1942, 1942, 1944, 1, 1942, 1942, 1,
-
1942, 1, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1, 1, 1,
-
1942, 1, 1942, 1, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1, 1,
-
1, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 201, 1, 1945, 1945, 1946,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 201, 1945, 1, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1947, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1, 1945, 1945, 1948,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1949, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1947, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945,
-
1945, 1945, 1, 1950, 1, 1945, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1945, 1, 1951, 1,
-
1, 1, 1952, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1951, 1949, 201,
-
1949, 1949, 1949, 1949, 1949, 1953, 1, 1949,
-
1949, 1, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1,
-
1, 1, 1949, 204, 1949, 205, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1, 1, 1, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1, 1954, 1, 1,
-
1, 1955, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1954, 1, 1, 1,
-
1, 1, 1, 1, 1956, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 210, 1, 211, 1, 1957, 1,
-
1954, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1954,
-
1, 1958, 1, 1, 1, 1959, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1958, 1, 1, 1, 1, 1, 1, 1,
-
1960, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 217, 1,
-
218, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1945, 1961, 1, 201, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 201, 1, 1962, 1,
-
1, 1, 1963, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1962, 200, 1964,
-
200, 200, 200, 200, 200, 1965, 1, 200,
-
200, 1, 200, 1949, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 1,
-
1, 1, 200, 204, 200, 205, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
1, 1, 1, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 200, 200, 200, 200,
-
200, 200, 200, 200, 1, 1966, 1, 1,
-
1, 1967, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1966, 220, 221, 220,
-
220, 220, 220, 220, 1968, 1, 220, 220,
-
1, 220, 1, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 1, 1,
-
1, 220, 210, 220, 211, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 1,
-
1, 1, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 220, 220, 220, 220, 220,
-
220, 220, 220, 1, 1969, 1, 1966, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1966, 1, 1970,
-
1, 1, 1, 1971, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1970, 1942,
-
1943, 1942, 1942, 1942, 1942, 1942, 1972, 1,
-
1942, 1942, 1, 1942, 1, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1, 1, 1, 1942, 217, 1942, 218, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1, 1, 1, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1942, 1942, 1942,
-
1942, 1942, 1942, 1942, 1942, 1, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1974, 1,
-
1973, 1973, 1975, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1974, 1973, 1934,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1976, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1973, 1973, 1973,
-
1973, 1973, 1973, 1973, 1973, 1, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1,
-
1977, 1977, 1978, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1979,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1980, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1, 1981, 1,
-
1977, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1977,
-
1, 198, 1, 1, 1, 199, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
198, 1949, 201, 1949, 1949, 1949, 1949, 1949,
-
202, 1, 1949, 1949, 1, 1949, 203, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1, 1, 1, 1949, 204, 1949,
-
205, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1, 1, 1, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1982, 1, 1977, 1977, 1983, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1982, 1977, 1938, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1980, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977,
-
1, 1984, 1, 1982, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1982, 1, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1986, 1, 1985, 1985,
-
1987, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1986, 1985, 1988, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1989,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985,
-
1985, 1985, 1985, 1, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1, 1990, 1990,
-
1991, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1992, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1993,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1, 1994, 1, 1990, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1990, 1, 1995,
-
1, 1, 1, 1996, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1995, 1949,
-
201, 1949, 1949, 1949, 1949, 1949, 1997, 1,
-
1949, 1949, 1, 1949, 203, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1, 1, 1, 1949, 204, 1949, 1998, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1, 1, 1, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1, 1999, 1,
-
1, 1, 2000, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1999, 1, 1,
-
1, 1, 1, 1, 1, 2001, 1, 1,
-
1, 1, 1, 209, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 210, 1, 2002, 1, 2003,
-
1, 1999, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1999, 1, 2004, 1, 1, 1, 2005, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2004, 1, 1, 1, 1, 1, 1,
-
1, 2006, 1, 1, 1, 1, 1, 216,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 217,
-
1, 2007, 1, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 2008, 1, 1990, 1990,
-
2009, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 2008, 1990, 2010, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1993,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990,
-
1990, 1990, 1990, 1, 2011, 1, 2008, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2008, 1, 2012,
-
1, 1, 1, 2013, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2012, 1,
-
1, 1, 1, 1, 1, 1, 2014, 1,
-
1, 1, 1, 1, 209, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 210, 1, 2015, 1,
-
2016, 1, 2012, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2012, 1, 2017, 1, 1, 1, 2018,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2017, 1, 1, 1, 1, 1,
-
1, 1, 2019, 1, 1, 1, 1, 1,
-
216, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
217, 1, 2020, 1, 2021, 1, 1, 1,
-
2022, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2021, 2023, 2024, 2023, 2023,
-
2023, 2023, 2023, 2025, 1, 2023, 2023, 2026,
-
2023, 2027, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 1, 1, 1,
-
2023, 1, 2023, 2028, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 1, 1,
-
1, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 1, 195, 1, 1, 1, 2029,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 195, 1, 1, 1, 1, 1,
-
1, 1, 2030, 1, 1, 1, 195, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 196, 1, 2031, 1, 195, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 195, 1, 2026,
-
1, 1, 1, 2032, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2026, 1,
-
1, 1, 1, 1, 1, 1, 2033, 1,
-
1, 1, 2026, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2028, 1,
-
2034, 1, 1, 1, 2035, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2034,
-
2036, 2037, 2036, 2036, 2036, 2036, 2036, 2038,
-
1, 2036, 2036, 1, 2036, 2039, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 1, 1, 1, 2036, 1, 2036, 1,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 2036, 2040, 1, 1, 2036, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036,
-
2036, 2036, 2036, 2036, 2036, 2036, 1, 2041,
-
1, 1, 1, 2042, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2041, 2043,
-
2044, 2043, 2043, 2043, 2043, 2043, 2045, 1,
-
2043, 2043, 1, 2043, 2046, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
1, 1, 1, 2043, 1, 2043, 1, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2047, 1, 1, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 1, 2048, 1,
-
2041, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2041,
-
1, 2049, 1, 1, 1, 2050, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2049, 2043, 2044, 2043, 2043, 2043, 2043, 2043,
-
2051, 1, 2043, 2043, 2052, 2043, 2053, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2054, 1, 1, 2043, 1, 2043,
-
1, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 1, 1, 1, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 1,
-
2049, 1, 1, 1, 2050, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2049,
-
1, 1, 1, 1, 1, 1, 1, 2051,
-
1, 1, 1, 2052, 1, 2055, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2054, 1, 2056, 1, 2049, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2049, 1, 2057, 1,
-
1, 1, 2058, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2057, 1, 1,
-
1, 1, 1, 1, 1, 2059, 1, 1,
-
1, 2060, 1, 2061, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2062,
-
1, 2063, 1, 1, 1, 2064, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2063, 1, 1, 1, 1, 1, 1, 1,
-
2065, 1, 1, 1, 2063, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2066, 1, 1, 1, 1, 1,
-
196, 1, 2067, 1, 2063, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2063, 1, 2068, 1, 1,
-
1, 2069, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2068, 1, 1, 1,
-
1, 1, 1, 1, 2070, 1, 1, 1,
-
2068, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2071, 1,
-
1, 1, 1, 1, 2028, 1, 2072, 1,
-
1, 1, 2073, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2072, 2074, 2075,
-
2074, 2074, 2074, 2074, 2074, 2076, 1, 2074,
-
2074, 1, 2074, 2077, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 1,
-
1, 1, 2074, 1, 2074, 1, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
-
1, 1, 1, 2074, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
-
2074, 2074, 2074, 2074, 1, 2078, 1, 1,
-
1, 2079, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2078, 186, 187, 186,
-
186, 186, 186, 186, 2080, 1, 186, 186,
-
1, 186, 190, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 1, 1,
-
1, 186, 1, 186, 1, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 1,
-
1, 1, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 186, 186, 186, 186, 186,
-
186, 186, 186, 1, 2081, 1, 2078, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2078, 1, 2082,
-
1, 1, 1, 2083, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2082, 2023,
-
2024, 2023, 2023, 2023, 2023, 2023, 2084, 1,
-
2023, 2023, 1, 2023, 2027, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
1, 1, 1, 2023, 1, 2023, 1, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 1, 1, 1, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
-
2023, 2023, 2023, 2023, 2023, 1, 1949, 201,
-
1949, 1949, 1949, 1949, 1949, 1, 1, 1949,
-
1949, 1, 1949, 2085, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1,
-
1, 1, 1949, 1, 1949, 1, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1, 1, 1, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949,
-
1949, 1949, 1949, 1949, 1, 2055, 1, 1,
-
1, 2086, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2055, 2087, 1, 2087,
-
2087, 2087, 2087, 2087, 2088, 1, 2087, 2087,
-
1, 2087, 1, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 1, 1,
-
1, 2087, 1, 2087, 1, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 1,
-
1, 1, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 1, 2089, 1, 2055, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2055, 1, 2049,
-
1, 1, 1, 2050, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2049, 2087,
-
1, 2087, 2087, 2087, 2087, 2087, 2051, 1,
-
2087, 2087, 2052, 2087, 2055, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2054, 1, 1, 2087, 1, 2087, 1, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 1, 1, 1, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
2087, 2087, 2087, 2087, 2087, 1, 2061, 1,
-
1, 1, 2090, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2061, 2091, 1,
-
2091, 2091, 2091, 2091, 2091, 2092, 1, 2091,
-
2091, 1, 2091, 1, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 1,
-
1, 1, 2091, 1, 2091, 1, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
1, 1, 1, 2091, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
2091, 2091, 2091, 2091, 1, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2044, 1, 2093,
-
2093, 2094, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2044, 2093, 1, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2095, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 1, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 1, 2093,
-
2093, 2096, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2097, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2095, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
-
2093, 2093, 2093, 2093, 1, 2098, 1, 2093,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2093, 1,
-
2099, 1, 1, 1, 2100, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2099,
-
2097, 2044, 2097, 2097, 2097, 2097, 2097, 2101,
-
1, 2097, 2097, 2052, 2097, 2046, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2054, 1, 1, 2097, 1, 2097, 1,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 1, 1, 1, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 1, 2099,
-
1, 1, 1, 2100, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2099, 1,
-
1, 1, 1, 1, 1, 1, 2101, 1,
-
1, 1, 2052, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2054, 1, 2102, 1, 2099, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2099, 1, 2103, 1, 1,
-
1, 2104, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2103, 1, 1, 1,
-
1, 1, 1, 1, 2105, 1, 1, 1,
-
2060, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2062, 1,
-
2097, 2044, 2097, 2097, 2097, 2097, 2097, 1,
-
1, 2097, 2097, 1, 2097, 2046, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 1, 1, 1, 2097, 1, 2097, 1,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 1, 1, 1, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097,
-
2097, 2097, 2097, 2097, 2097, 2097, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2093,
-
2106, 1, 2044, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2044, 1, 2055, 1, 1, 1, 2086,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2055, 2043, 2044, 2043, 2043, 2043,
-
2043, 2043, 2088, 1, 2043, 2043, 1, 2043,
-
2046, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 1, 1, 1, 2043,
-
1, 2043, 1, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 1, 1, 1,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
-
2043, 1, 2107, 1, 1, 1, 2108, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2107, 2109, 2110, 2109, 2109, 2109, 2109,
-
2109, 2111, 1, 2109, 2109, 1, 2109, 2112,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 1, 1, 1, 2109, 1,
-
2109, 1, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 2109, 2113, 1, 1, 2109,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
1, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 1, 2047, 2047, 2114, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 1, 2115, 2099, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
1, 2116, 1, 2047, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2047, 1, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-
2047, 2047, 2047, 2047, 1, 2117, 1, 1,
-
1, 2118, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2117, 1179, 1180, 1179,
-
1179, 1179, 1179, 1179, 2119, 1, 1179, 1179,
-
2120, 1179, 1183, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1, 1184,
-
183, 1179, 1, 1179, 1, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1,
-
1, 1, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
-
1179, 1179, 1179, 1, 2121, 1, 1, 1,
-
2122, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2121, 1187, 1188, 1187, 1187,
-
1187, 1187, 1187, 2123, 1, 1187, 1187, 118,
-
1187, 1190, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1, 120, 1191,
-
1187, 1, 1187, 1192, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1, 1,
-
1, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
-
1187, 1187, 1, 2124, 1, 1, 1, 2125,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2124, 1195, 1196, 1195, 1195, 1195,
-
1195, 1195, 2126, 1, 1195, 1195, 118, 1195,
-
1198, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1, 120, 1199, 1195,
-
1, 1195, 1, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1, 1, 1,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
-
1195, 1, 2127, 1, 2124, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2124, 1, 2128, 1, 1,
-
1, 2129, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2128, 1828, 1829, 1828,
-
1828, 1828, 1828, 1828, 2130, 1, 1828, 1828,
-
2120, 1828, 1831, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1, 1184,
-
1253, 1828, 1, 1828, 1, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1,
-
1, 1, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
-
1828, 1828, 1828, 1, 2131, 1, 1, 1,
-
2132, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2131, 2133, 2134, 2133, 2133,
-
2133, 2133, 2133, 2135, 1, 2133, 2133, 1,
-
2133, 2136, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 18, 1, 19,
-
2133, 1, 2133, 17, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2137, 1,
-
1, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 1, 2138, 1, 1, 1, 2139,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2138, 2140, 2141, 2140, 2140, 2140,
-
2140, 2140, 2142, 1, 2140, 2140, 1, 2140,
-
2143, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 1, 1, 8, 2140,
-
1, 2140, 1, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2144, 1, 1,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 1, 2145, 1, 2138, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2138, 1, 2146, 1, 2147,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2147, 1,
-
2148, 1, 1, 1, 2149, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2148,
-
2150, 15, 2150, 2150, 2150, 2150, 2150, 2151,
-
1, 2150, 2150, 1, 2150, 17, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 18, 1, 19, 2150, 1, 2150, 17,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 1, 1, 1, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 1, 2152,
-
1, 1, 1, 2153, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2152, 2150,
-
15, 2150, 2150, 2150, 2150, 2150, 2154, 1,
-
2150, 2150, 1, 2150, 1, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
1, 1, 8, 2150, 1, 2150, 1, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 1, 1, 1, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 1, 2155, 1,
-
2152, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2152,
-
1, 2156, 1, 1, 1, 2157, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2156, 2158, 33, 2158, 2158, 2158, 2158, 2158,
-
2159, 1, 2158, 2158, 1, 2158, 1, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 1, 1, 48, 2158, 1, 2158,
-
1, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 2158, 1, 1, 1, 2158, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
-
2158, 2158, 2158, 2158, 2158, 2158, 2158, 1,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2161, 1, 2160, 2160, 2162, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2161,
-
2160, 23, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2163, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
-
2160, 2160, 2160, 2160, 2160, 2160, 2160, 1,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 1, 2164, 2164, 2165, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2166, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2167, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 1,
-
2168, 1, 2164, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2164, 1, 2169, 1, 2170, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2170, 1, 38, 1,
-
1, 1, 39, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 38, 2171, 2141,
-
2171, 2171, 2171, 2171, 2171, 40, 1, 2171,
-
2171, 1, 2171, 2172, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 18,
-
1, 19, 2171, 1, 2171, 17, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
1, 1, 1, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2173, 1,
-
2164, 2164, 2174, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2173, 2164, 27,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2167, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
-
2164, 2164, 2164, 2164, 2164, 1, 2175, 1,
-
2173, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2173,
-
1, 2148, 1, 1, 1, 2149, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2148, 2140, 2141, 2140, 2140, 2140, 2140, 2140,
-
2151, 1, 2140, 2140, 1, 2140, 2172, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 18, 1, 19, 2140, 1, 2140,
-
17, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 1, 1, 1, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 1,
-
2176, 1, 1, 1, 2177, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2176,
-
2178, 2179, 2178, 2178, 2178, 2178, 2178, 2180,
-
1, 2178, 2178, 1, 2178, 2181, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 1, 1, 48, 2178, 1, 2178, 1,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2182, 1, 1, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 1, 2183,
-
2184, 2183, 2183, 2183, 2183, 2183, 1, 1,
-
2183, 2183, 1, 2183, 2143, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
1, 1, 1, 2183, 1, 2183, 1, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 1, 1, 1, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 1, 2185, 1,
-
2186, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2186,
-
1, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2184, 1, 2187, 2187, 2188, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2184, 2187, 1, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2189, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
1, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 1, 2187, 2187, 2190, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2183, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2189, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
-
1, 2191, 1, 2187, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2187, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2187, 2192, 1, 2184,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2184, 1,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 1, 2144, 2144, 2193, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 1, 2194, 2186, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 1,
-
2195, 1, 2144, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2144, 1, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 2144, 2144, 2144, 2144, 2144,
-
2144, 2144, 2144, 1, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 1, 2196, 2196,
-
2197, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2198, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2199,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
-
2196, 2196, 2196, 1, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 1, 2200, 2200,
-
2201, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2202, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2203,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 1, 2204, 1, 2200, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2200, 1, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200,
-
2200, 2200, 2200, 2200, 2200, 2200, 2200, 1,
-
2205, 1, 1, 1, 2206, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2205,
-
2207, 2208, 2207, 2207, 2207, 2207, 2207, 2209,
-
1, 2207, 2207, 1, 2207, 1, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 1, 1, 48, 2207, 1, 2207, 1,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 1, 1, 1, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 1, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2211,
-
1, 2210, 2210, 2212, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2211, 2210,
-
23, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2213, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
-
2210, 2210, 2210, 2210, 2210, 2210, 1, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
1, 2214, 2214, 2215, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2216, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2217, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 1, 2218,
-
1, 2214, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2214, 1, 2219, 1, 2220, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2220, 1, 2221, 1, 2222,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2222, 1,
-
2223, 1, 1, 1, 2224, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2223,
-
2225, 2226, 2225, 2225, 2225, 2225, 2225, 2227,
-
1, 2225, 2225, 1, 2225, 2228, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 1, 1, 1, 2225, 1, 2225, 1,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 2225, 2137, 1, 1, 2225, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225,
-
2225, 2225, 2225, 2225, 2225, 2225, 1, 2229,
-
1, 1, 1, 2230, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2229, 2231,
-
2184, 2231, 2231, 2231, 2231, 2231, 2232, 1,
-
2231, 2231, 1, 2231, 2143, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
1, 1, 1, 2231, 1, 2231, 1, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2144, 1, 1, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 1, 2233, 1,
-
2229, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2229,
-
1, 2234, 1, 2235, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2235, 1, 2236, 1, 1, 1,
-
2237, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2236, 2238, 1, 2238, 2238,
-
2238, 2238, 2238, 2239, 1, 2238, 2238, 1,
-
2238, 1, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 1, 1, 1,
-
2238, 1, 2238, 1, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 1, 1,
-
1, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 1, 2240, 1, 2236, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2236, 1, 2241, 1,
-
1, 1, 2242, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2241, 2243, 1,
-
2243, 2243, 2243, 2243, 2243, 2244, 1, 2243,
-
2243, 1, 2243, 1, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 1,
-
1, 1, 2243, 1, 2243, 1, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 2243,
-
1, 1, 1, 2243, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 2243, 2243, 2243, 2243,
-
2243, 2243, 2243, 2243, 1, 2236, 1, 1,
-
1, 2237, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2236, 2231, 2184, 2231,
-
2231, 2231, 2231, 2231, 2239, 1, 2231, 2231,
-
1, 2231, 2143, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 1, 1,
-
1, 2231, 1, 2231, 1, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 1,
-
1, 1, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 1, 2245, 1, 1, 1,
-
2246, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2245, 2247, 2248, 2247, 2247,
-
2247, 2247, 2247, 2249, 1, 2247, 2247, 1,
-
2247, 2181, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 1, 1, 1,
-
2247, 1, 2247, 1, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 2247, 2182, 1,
-
1, 2247, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 2247, 2247, 2247, 2247, 2247, 2247,
-
2247, 2247, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2250, 1, 2214, 2214,
-
2251, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2250, 2214, 27, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2217,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
-
2214, 2214, 2214, 1, 2252, 1, 2250, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2250, 1, 2253,
-
1, 2254, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2254, 1, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2256, 1, 2255, 2255, 2257, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2256, 2255, 2198, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2258, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 2255, 2255, 2255, 2255, 2255, 2255, 2255,
-
2255, 1, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 1, 2259, 2259, 2260, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2261, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2262, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 1, 2263, 1, 2259, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2259, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2264, 1,
-
2259, 2259, 2265, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2264, 2259, 2202,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2262, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
-
2259, 2259, 2259, 2259, 2259, 1, 2266, 1,
-
2264, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2264,
-
1, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2268, 1, 2267, 2267, 2269, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2268, 2267, 2270, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2271, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
2267, 2267, 2267, 2267, 2267, 2267, 2267, 2267,
-
1, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 1, 2272, 2272, 2273, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2274, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2275, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
1, 2276, 1, 2272, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2272, 1, 2277, 1, 2278, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2278, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2279, 1, 2272, 2272, 2280, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2279,
-
2272, 2281, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2275, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272,
-
2272, 2272, 2272, 2272, 2272, 2272, 2272, 1,
-
2282, 1, 2279, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2279, 1, 2283, 1, 2284, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2284, 1, 2285, 1,
-
1, 1, 2286, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2285, 2287, 2288,
-
2287, 2287, 2287, 2287, 2287, 2289, 1, 2287,
-
2287, 1, 2287, 2290, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 1,
-
1, 48, 2287, 1, 2287, 1, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 2287,
-
1, 1, 1, 2287, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 2287, 2287, 2287, 2287,
-
2287, 2287, 2287, 2287, 1, 2291, 1, 1,
-
1, 2292, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2291, 2293, 2294, 2293,
-
2293, 2293, 2293, 2293, 2295, 1, 2293, 2293,
-
1, 2293, 2296, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 1, 1,
-
8, 2293, 1, 2293, 1, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 2293, 1,
-
1, 1, 2293, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
-
2293, 2293, 2293, 1, 2297, 1, 2291, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2291, 1, 2298,
-
2299, 2298, 2298, 2298, 2298, 2298, 1, 1,
-
2298, 2298, 1, 2298, 2300, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
1, 1, 1, 2298, 1, 2298, 1, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 1, 1, 1, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 1, 2301, 1,
-
2302, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2302,
-
1, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2299, 1, 2303, 2303, 2304, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2299, 2303, 1, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2305, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
1, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 1, 2303, 2303, 2306, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2298, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2305, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303,
-
1, 2307, 1, 2303, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2303, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2303, 2308, 1, 2299,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2299, 1,
-
38, 1, 1, 1, 39, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 38,
-
2309, 2310, 2309, 2309, 2309, 2309, 2309, 40,
-
1, 2309, 2309, 1, 2309, 2311, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 18, 1, 19, 2309, 1, 2309, 17,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 1, 1, 1, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 1, 2312,
-
1, 1, 1, 2313, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2312, 2314,
-
2315, 2314, 2314, 2314, 2314, 2314, 2316, 1,
-
2314, 2314, 1, 2314, 2317, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
1, 1, 1, 2314, 1, 2314, 1, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
2314, 2318, 1, 1, 2314, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 2314, 2314, 2314,
-
2314, 2314, 2314, 2314, 2314, 1, 2319, 1,
-
1, 1, 2320, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2319, 2321, 2322,
-
2321, 2321, 2321, 2321, 2321, 2323, 1, 2321,
-
2321, 1, 2321, 2324, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 1,
-
1, 1, 2321, 1, 2321, 1, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2325, 1, 1, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 1, 2326, 1, 2319,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2319, 1,
-
2327, 1, 1, 1, 2328, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2327,
-
2321, 2322, 2321, 2321, 2321, 2321, 2321, 2329,
-
1, 2321, 2321, 1, 2321, 2330, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 1, 1, 1, 2321, 2331, 2321, 1,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 1, 1, 1, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 1, 2327,
-
1, 1, 1, 2328, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2327, 1,
-
1, 1, 1, 1, 1, 1, 2329, 1,
-
1, 1, 1, 1, 2332, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2331, 1, 2333, 1,
-
2327, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2327,
-
1, 2334, 1, 1, 1, 2335, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2334, 1, 1, 1, 1, 1, 1, 1,
-
2336, 1, 1, 1, 1, 1, 2337, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2338, 1,
-
2332, 1, 1, 1, 2339, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2332,
-
2340, 1, 2340, 2340, 2340, 2340, 2340, 2341,
-
1, 2340, 2340, 1, 2340, 1, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 1, 1, 1, 2340, 1, 2340, 1,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 1, 1, 1, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 1, 2342,
-
1, 2332, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2332, 1, 2327, 1, 1, 1, 2328, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2327, 2340, 1, 2340, 2340, 2340, 2340,
-
2340, 2329, 1, 2340, 2340, 1, 2340, 2332,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 1, 1, 1, 2340, 2331,
-
2340, 1, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 1, 1, 1, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
2340, 2340, 2340, 2340, 2340, 2340, 2340, 2340,
-
1, 2337, 1, 1, 1, 2343, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2337, 2344, 1, 2344, 2344, 2344, 2344, 2344,
-
2345, 1, 2344, 2344, 1, 2344, 1, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 1, 1, 1, 2344, 1, 2344,
-
1, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 2344, 1, 1, 1, 2344, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 2344,
-
2344, 2344, 2344, 2344, 2344, 2344, 2344, 1,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2322, 1, 2346, 2346, 2347, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2322,
-
2346, 1, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2348, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 1,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 1, 2346, 2346, 2349, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2350, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2348, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 1,
-
2351, 1, 2346, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2346, 1, 2352, 1, 1, 1, 2353,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2352, 2350, 2322, 2350, 2350, 2350,
-
2350, 2350, 2354, 1, 2350, 2350, 1, 2350,
-
2324, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 1, 1, 1, 2350,
-
2331, 2350, 1, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 1, 1, 1,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 1, 2352, 1, 1, 1, 2353, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2352, 1, 1, 1, 1, 1, 1,
-
1, 2354, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2331,
-
1, 2355, 1, 2352, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2352, 1, 2356, 1, 1, 1,
-
2357, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2356, 1, 1, 1, 1,
-
1, 1, 1, 2358, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2338, 1, 2350, 2322, 2350, 2350, 2350,
-
2350, 2350, 1, 1, 2350, 2350, 1, 2350,
-
2324, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 1, 1, 1, 2350,
-
1, 2350, 1, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 1, 1, 1,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
-
2350, 1, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 2346, 2346, 2346, 2346, 2346, 2346,
-
2346, 2346, 1, 2359, 1, 2322, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2322, 1, 2332, 1,
-
1, 1, 2339, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2332, 2321, 2322,
-
2321, 2321, 2321, 2321, 2321, 2341, 1, 2321,
-
2321, 1, 2321, 2324, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 1,
-
1, 1, 2321, 1, 2321, 1, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
1, 1, 1, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 2321, 2321, 2321, 2321,
-
2321, 2321, 2321, 2321, 1, 2360, 1, 1,
-
1, 2361, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2360, 2362, 2363, 2362,
-
2362, 2362, 2362, 2362, 2364, 1, 2362, 2362,
-
1, 2362, 2365, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 1, 1,
-
1, 2362, 1, 2362, 1, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 2362, 2366,
-
1, 1, 2362, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 2362, 2362, 2362, 2362, 2362,
-
2362, 2362, 2362, 1, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 1, 2325, 2325,
-
2367, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 1, 2368,
-
2352, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 2325, 2325, 2325, 2325, 2325,
-
2325, 2325, 2325, 1, 2369, 1, 2325, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2325, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2325,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 1, 2370, 2370, 2371, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2372, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2373, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
-
2370, 2370, 2370, 2370, 2370, 2370, 2370, 1,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 1, 2374, 2374, 2375, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2376, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2377, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 2374,
-
2374, 2374, 2374, 2374, 2374, 2374, 2374, 1,
-
2378, 1, 2374, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2374, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2374, 81, 1, 1, 1,
-
2379, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 81, 2380, 2381, 2380, 2380,
-
2380, 2380, 2380, 2382, 1, 2380, 2380, 1,
-
2380, 1, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 1, 1, 1,
-
2380, 1, 2380, 1, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 1, 1,
-
1, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 1, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 66, 1, 2383, 2383, 2384,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 66, 2383, 1, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2385, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 1, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 1, 2383, 2383, 2386,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2387, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2385, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 2383, 2383, 2383, 2383, 2383, 2383,
-
2383, 2383, 1, 2388, 1, 2383, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2383, 1, 2389, 1,
-
1, 1, 2390, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2389, 2387, 66,
-
2387, 2387, 2387, 2387, 2387, 2391, 1, 2387,
-
2387, 1, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 1,
-
1, 1, 2387, 69, 2387, 70, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
1, 1, 1, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 1, 2392, 1, 1,
-
1, 2393, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2392, 1, 1, 1,
-
1, 1, 1, 1, 2394, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 75, 1, 76, 1, 2395, 1,
-
2392, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2392,
-
1, 2396, 1, 1, 1, 2397, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2396, 1, 1, 1, 1, 1, 1, 1,
-
2398, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 82, 1,
-
83, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2383, 2399, 1, 66, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 66, 1, 2400, 1,
-
1, 1, 2401, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2400, 65, 2402,
-
65, 65, 65, 65, 65, 2403, 1, 65,
-
65, 1, 65, 2387, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 1,
-
1, 1, 65, 69, 65, 70, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
1, 1, 1, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 1, 2404, 1, 1,
-
1, 2405, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2404, 85, 86, 85,
-
85, 85, 85, 85, 2406, 1, 85, 85,
-
1, 85, 1, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 1, 1,
-
1, 85, 75, 85, 76, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 1,
-
1, 1, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 1, 2407, 1, 2404, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2404, 1, 2408,
-
1, 1, 1, 2409, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2408, 2380,
-
2381, 2380, 2380, 2380, 2380, 2380, 2410, 1,
-
2380, 2380, 1, 2380, 1, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
1, 1, 1, 2380, 82, 2380, 83, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 1, 1, 1, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 2380, 2380, 2380,
-
2380, 2380, 2380, 2380, 2380, 1, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2412, 1,
-
2411, 2411, 2413, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2412, 2411, 2372,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2414, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 2411, 2411, 2411,
-
2411, 2411, 2411, 2411, 2411, 1, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 1,
-
2415, 2415, 2416, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2417,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2418, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 1, 2419, 1,
-
2415, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2415,
-
1, 63, 1, 1, 1, 64, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
63, 2387, 66, 2387, 2387, 2387, 2387, 2387,
-
67, 1, 2387, 2387, 1, 2387, 68, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 1, 1, 1, 2387, 69, 2387,
-
70, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 1, 1, 1, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 1,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
1, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2420, 1, 2415, 2415, 2421, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2420, 2415, 2376, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2418, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-
1, 2422, 1, 2420, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2420, 1, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2424, 1, 2423, 2423,
-
2425, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2424, 2423, 2426, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2427,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 2423, 2423, 2423, 2423, 2423,
-
2423, 2423, 2423, 1, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 1, 2428, 2428,
-
2429, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2430, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2431,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 1, 2432, 1, 2428, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2428, 1, 2433,
-
1, 1, 1, 2434, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2433, 2387,
-
66, 2387, 2387, 2387, 2387, 2387, 2435, 1,
-
2387, 2387, 1, 2387, 68, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
1, 1, 1, 2387, 69, 2387, 2436, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 1, 1, 1, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 1, 2437, 1,
-
1, 1, 2438, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2437, 1, 1,
-
1, 1, 1, 1, 1, 2439, 1, 1,
-
1, 1, 1, 74, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 75, 1, 2440, 1, 2441,
-
1, 2437, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2437, 1, 2442, 1, 1, 1, 2443, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2442, 1, 1, 1, 1, 1, 1,
-
1, 2444, 1, 1, 1, 1, 1, 81,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 82,
-
1, 2445, 1, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 1, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2446, 1, 2428, 2428,
-
2447, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2446, 2428, 2448, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2431,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
-
2428, 2428, 2428, 1, 2449, 1, 2446, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2446, 1, 2450,
-
1, 1, 1, 2451, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2450, 1,
-
1, 1, 1, 1, 1, 1, 2452, 1,
-
1, 1, 1, 1, 74, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 75, 1, 2453, 1,
-
2454, 1, 2450, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2450, 1, 2455, 1, 1, 1, 2456,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2455, 1, 1, 1, 1, 1,
-
1, 1, 2457, 1, 1, 1, 1, 1,
-
81, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
82, 1, 2458, 1, 2459, 1, 1, 1,
-
2460, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2459, 2461, 2462, 2461, 2461,
-
2461, 2461, 2461, 2463, 1, 2461, 2461, 2464,
-
2461, 2465, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 1, 1, 1,
-
2461, 1, 2461, 2466, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 1, 1,
-
1, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 1, 60, 1, 1, 1, 2467,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 60, 1, 1, 1, 1, 1,
-
1, 1, 2468, 1, 1, 1, 60, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 61, 1, 2469, 1, 60, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 60, 1, 2464,
-
1, 1, 1, 2470, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2464, 1,
-
1, 1, 1, 1, 1, 1, 2471, 1,
-
1, 1, 2464, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2466, 1,
-
2472, 1, 1, 1, 2473, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2472,
-
2474, 2475, 2474, 2474, 2474, 2474, 2474, 2476,
-
1, 2474, 2474, 1, 2474, 2477, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 1, 1, 1, 2474, 1, 2474, 1,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 2474, 2478, 1, 1, 2474, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 2474, 2474,
-
2474, 2474, 2474, 2474, 2474, 2474, 1, 2479,
-
1, 1, 1, 2480, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2479, 2481,
-
2482, 2481, 2481, 2481, 2481, 2481, 2483, 1,
-
2481, 2481, 1, 2481, 2484, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
1, 1, 1, 2481, 1, 2481, 1, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2485, 1, 1, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 1, 2486, 1,
-
2479, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2479,
-
1, 2487, 1, 1, 1, 2488, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2487, 2481, 2482, 2481, 2481, 2481, 2481, 2481,
-
2489, 1, 2481, 2481, 2490, 2481, 2491, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2492, 1, 1, 2481, 1, 2481,
-
1, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 1, 1, 1, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 1,
-
2487, 1, 1, 1, 2488, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2487,
-
1, 1, 1, 1, 1, 1, 1, 2489,
-
1, 1, 1, 2490, 1, 2493, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2492, 1, 2494, 1, 2487, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2487, 1, 2495, 1,
-
1, 1, 2496, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2495, 1, 1,
-
1, 1, 1, 1, 1, 2497, 1, 1,
-
1, 2498, 1, 2499, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2500,
-
1, 2501, 1, 1, 1, 2502, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2501, 1, 1, 1, 1, 1, 1, 1,
-
2503, 1, 1, 1, 2501, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2504, 1, 1, 1, 1, 1,
-
61, 1, 2505, 1, 2501, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2501, 1, 2506, 1, 1,
-
1, 2507, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2506, 1, 1, 1,
-
1, 1, 1, 1, 2508, 1, 1, 1,
-
2506, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2509, 1,
-
1, 1, 1, 1, 2466, 1, 2510, 1,
-
1, 1, 2511, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2510, 2512, 2513,
-
2512, 2512, 2512, 2512, 2512, 2514, 1, 2512,
-
2512, 1, 2512, 2515, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 1,
-
1, 1, 2512, 1, 2512, 1, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512,
-
1, 1, 1, 2512, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512,
-
2512, 2512, 2512, 2512, 1, 2516, 1, 1,
-
1, 2517, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2516, 51, 52, 51,
-
51, 51, 51, 51, 2518, 1, 51, 51,
-
1, 51, 55, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 1, 1,
-
1, 51, 1, 51, 1, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 1,
-
1, 1, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 1, 2519, 1, 2516, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2516, 1, 2520,
-
1, 1, 1, 2521, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2520, 2461,
-
2462, 2461, 2461, 2461, 2461, 2461, 2522, 1,
-
2461, 2461, 1, 2461, 2465, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
1, 1, 1, 2461, 1, 2461, 1, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 1, 1, 1, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461,
-
2461, 2461, 2461, 2461, 2461, 1, 2387, 66,
-
2387, 2387, 2387, 2387, 2387, 1, 1, 2387,
-
2387, 1, 2387, 2523, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 1,
-
1, 1, 2387, 1, 2387, 1, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
1, 1, 1, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 2387, 2387, 2387, 2387,
-
2387, 2387, 2387, 2387, 1, 2493, 1, 1,
-
1, 2524, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2493, 2525, 1, 2525,
-
2525, 2525, 2525, 2525, 2526, 1, 2525, 2525,
-
1, 2525, 1, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 1, 1,
-
1, 2525, 1, 2525, 1, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 1,
-
1, 1, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 1, 2527, 1, 2493, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2493, 1, 2487,
-
1, 1, 1, 2488, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2487, 2525,
-
1, 2525, 2525, 2525, 2525, 2525, 2489, 1,
-
2525, 2525, 2490, 2525, 2493, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2492, 1, 1, 2525, 1, 2525, 1, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 1, 1, 1, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
-
2525, 2525, 2525, 2525, 2525, 1, 2499, 1,
-
1, 1, 2528, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2499, 2529, 1,
-
2529, 2529, 2529, 2529, 2529, 2530, 1, 2529,
-
2529, 1, 2529, 1, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 1,
-
1, 1, 2529, 1, 2529, 1, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
-
1, 1, 1, 2529, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
-
2529, 2529, 2529, 2529, 1, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2482, 1, 2531,
-
2531, 2532, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2482, 2531, 1, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2533, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 1, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 1, 2531,
-
2531, 2534, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2535, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2533, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 1, 2536, 1, 2531,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2531, 1,
-
2537, 1, 1, 1, 2538, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2537,
-
2535, 2482, 2535, 2535, 2535, 2535, 2535, 2539,
-
1, 2535, 2535, 2490, 2535, 2484, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2492, 1, 1, 2535, 1, 2535, 1,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 1, 1, 1, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 1, 2537,
-
1, 1, 1, 2538, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2537, 1,
-
1, 1, 1, 1, 1, 1, 2539, 1,
-
1, 1, 2490, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2492, 1, 2540, 1, 2537, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2537, 1, 2541, 1, 1,
-
1, 2542, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2541, 1, 1, 1,
-
1, 1, 1, 1, 2543, 1, 1, 1,
-
2498, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2500, 1,
-
2535, 2482, 2535, 2535, 2535, 2535, 2535, 1,
-
1, 2535, 2535, 1, 2535, 2484, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 1, 1, 1, 2535, 1, 2535, 1,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 1, 1, 1, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
-
2535, 2535, 2535, 2535, 2535, 2535, 1, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 2531,
-
2531, 2531, 2531, 2531, 2531, 2531, 2531, 1,
-
2544, 1, 2482, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2482, 1, 2493, 1, 1, 1, 2524,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2493, 2481, 2482, 2481, 2481, 2481,
-
2481, 2481, 2526, 1, 2481, 2481, 1, 2481,
-
2484, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 1, 1, 1, 2481,
-
1, 2481, 1, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 1, 1, 1,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481,
-
2481, 1, 2545, 1, 1, 1, 2546, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2545, 2547, 2548, 2547, 2547, 2547, 2547,
-
2547, 2549, 1, 2547, 2547, 1, 2547, 2550,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 1, 1, 1, 2547, 1,
-
2547, 1, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 2547, 2551, 1, 1, 2547,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547,
-
1, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 1, 2485, 2485, 2552, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 1, 2553, 2537, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
1, 2554, 1, 2485, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2485, 1, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485,
-
2485, 2485, 2485, 2485, 1, 2555, 1, 1,
-
1, 2556, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2555, 2557, 2558, 2557,
-
2557, 2557, 2557, 2557, 2559, 1, 2557, 2557,
-
1, 2557, 17, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 18, 1,
-
19, 2557, 1, 2557, 17, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 1,
-
1, 1, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 1, 2560, 1, 1, 1,
-
2561, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2560, 2557, 2558, 2557, 2557,
-
2557, 2557, 2557, 2562, 1, 2557, 2557, 1,
-
2557, 1, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 1, 1, 8,
-
2557, 1, 2557, 1, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 1, 1,
-
1, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 1, 2563, 1, 2560, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2560, 1, 2564, 1,
-
2565, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2565,
-
1, 2566, 1, 1, 1, 2567, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2566, 2133, 2134, 2133, 2133, 2133, 2133, 2133,
-
2568, 1, 2133, 2133, 1, 2133, 2136, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 18, 1, 19, 2133, 1, 2133,
-
17, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2137, 1, 1, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133,
-
2133, 2133, 2133, 2133, 2133, 2133, 2133, 1,
-
2569, 1, 1, 1, 2570, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2569,
-
2140, 2141, 2140, 2140, 2140, 2140, 2140, 2571,
-
1, 2140, 2140, 1, 2140, 2572, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 1, 1, 8, 2140, 1, 2140, 1,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2144, 1, 1, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 1, 2573,
-
1, 2569, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2569, 1, 2574, 1, 1, 1, 2575, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2574, 2178, 2179, 2178, 2178, 2178, 2178,
-
2178, 2576, 1, 2178, 2178, 1, 2178, 2577,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 1, 1, 48, 2178, 1,
-
2178, 1, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2182, 1, 1, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178,
-
1, 2578, 2579, 2578, 2578, 2578, 2578, 2578,
-
1, 1, 2578, 2578, 1, 2578, 2572, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 1, 1, 1, 2578, 1, 2578,
-
1, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 1, 1, 1, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 1,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2579, 1, 2580, 2580, 2581, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2579,
-
2580, 1, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2582, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 1,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 1, 2580, 2580, 2583, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2578, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2582, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 1,
-
2584, 1, 2580, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2580, 1, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
2580, 2580, 2580, 1, 2585, 1, 2579, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2579, 1, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
1, 2586, 2586, 2587, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2588, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2589, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
-
2586, 2586, 2586, 2586, 2586, 2586, 1, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
1, 2590, 2590, 2591, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2592, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2593, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
-
2590, 2590, 2590, 2590, 2590, 2590, 1, 2594,
-
1, 2590, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2590, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2590, 2595, 1, 1, 1, 2596,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2595, 2597, 2598, 2597, 2597, 2597,
-
2597, 2597, 2599, 1, 2597, 2597, 1, 2597,
-
1, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 1, 1, 48, 2597,
-
1, 2597, 1, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 1, 1, 1,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 1, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2601, 1, 2600, 2600, 2602, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2601, 2600, 23, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2603, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600,
-
2600, 1, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 1, 2604, 2604, 2605, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2606, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2607, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 1, 2608, 1, 2604, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2604, 1, 2609, 1, 2610,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2610, 1,
-
2611, 1, 2612, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2612, 1, 2613, 1, 1, 1, 2614,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2613, 2615, 2616, 2615, 2615, 2615,
-
2615, 2615, 2617, 1, 2615, 2615, 1, 2615,
-
2618, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 1, 1, 1, 2615,
-
1, 2615, 1, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 2615, 2137, 1, 1,
-
2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615,
-
2615, 1, 2619, 1, 1, 1, 2620, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2619, 2621, 2579, 2621, 2621, 2621, 2621,
-
2621, 2622, 1, 2621, 2621, 1, 2621, 2572,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 1, 1, 1, 2621, 1,
-
2621, 1, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2144, 1, 1, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
1, 2623, 1, 2619, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2619, 1, 2236, 1, 1, 1,
-
2237, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2236, 2621, 2579, 2621, 2621,
-
2621, 2621, 2621, 2239, 1, 2621, 2621, 1,
-
2621, 2572, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 1, 1, 1,
-
2621, 1, 2621, 1, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 1, 1,
-
1, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 1, 2624, 1, 1, 1, 2625,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2624, 2626, 2627, 2626, 2626, 2626,
-
2626, 2626, 2628, 1, 2626, 2626, 1, 2626,
-
2577, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 1, 1, 1, 2626,
-
1, 2626, 1, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 2626, 2182, 1, 1,
-
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
2626, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2629, 1, 2604, 2604, 2630,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2629, 2604, 27, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2607, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
-
2604, 2604, 1, 2631, 1, 2629, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2629, 1, 2632, 1,
-
2633, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2633,
-
1, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2635, 1, 2634, 2634, 2636, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2635, 2634, 2588, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2637, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
-
1, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 1, 2638, 2638, 2639, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2640, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2641, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
1, 2642, 1, 2638, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2638, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2643, 1, 2638,
-
2638, 2644, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2643, 2638, 2592, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2641, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
-
2638, 2638, 2638, 2638, 1, 2645, 1, 2643,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2643, 1,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2647, 1, 2646, 2646, 2648, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2647,
-
2646, 2649, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2650, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
2646, 2646, 2646, 2646, 2646, 2646, 2646, 1,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 1, 2651, 2651, 2652, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2653, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2654, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 1,
-
2655, 1, 2651, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2651, 1, 2656, 1, 2657, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2657, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2658,
-
1, 2651, 2651, 2659, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2658, 2651,
-
2660, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2654, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
2651, 2651, 2651, 2651, 2651, 2651, 1, 2661,
-
1, 2658, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2658, 1, 2662, 1, 2663, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2663, 1, 2664, 1, 1,
-
1, 2665, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2664, 2666, 2667, 2666,
-
2666, 2666, 2666, 2666, 2668, 1, 2666, 2666,
-
1, 2666, 2669, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 1, 1,
-
48, 2666, 1, 2666, 1, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 2666, 1,
-
1, 1, 2666, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 2666, 2666, 2666, 2666, 2666,
-
2666, 2666, 2666, 1, 2670, 1, 1, 1,
-
2671, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2670, 3, 4, 3, 3,
-
3, 3, 3, 5, 1, 3, 3, 1,
-
3, 7, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 1, 1, 8,
-
3, 1, 3, 1, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 1,
-
1, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 2672, 1, 2670, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2670, 1, 2673, 2674,
-
2673, 2673, 2673, 2673, 2673, 1, 1, 2673,
-
2673, 1, 2673, 2675, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 1,
-
1, 1, 2673, 1, 2673, 1, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
1, 1, 1, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 1, 2676, 1, 2677,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2677, 1,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2674, 1, 2678, 2678, 2679, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2674,
-
2678, 1, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2680, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 1,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 1, 2678, 2678, 2681, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2673, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2680, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 2678,
-
2678, 2678, 2678, 2678, 2678, 2678, 2678, 1,
-
2682, 1, 2678, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2678, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2678, 2683, 1, 2674, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2674, 1, 38,
-
1, 1, 1, 39, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 38, 2684,
-
2685, 2684, 2684, 2684, 2684, 2684, 40, 1,
-
2684, 2684, 1, 2684, 2686, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
18, 1, 19, 2684, 1, 2684, 17, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 1, 1, 1, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 1, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 1,
-
2687, 2687, 2688, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2689, 2690, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2691, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
-
2687, 2687, 2687, 2687, 2687, 1, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 1,
-
2692, 2692, 2693, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2694, 2695, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2696, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692,
-
2692, 2692, 2692, 2692, 2692, 1, 2697, 1,
-
2692, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2692,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2692, 2698, 1, 1, 1, 2699, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2698, 2700, 2701, 2700, 2700, 2700, 2700,
-
2700, 2702, 1, 2700, 2700, 6, 2700, 2703,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 1, 6, 2704, 2700, 1,
-
2700, 2705, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 2700, 1, 1, 1, 2700,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-
1, 2706, 1, 1, 1, 2707, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2706, 2708, 2685, 2708, 2708, 2708, 2708, 2708,
-
2709, 1, 2708, 2708, 2710, 2708, 2711, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 18, 2710, 19, 2708, 1, 2708,
-
2712, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 1, 1, 1, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 1,
-
2713, 1, 1, 1, 2714, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2713,
-
14, 15, 14, 14, 14, 14, 14, 2715,
-
1, 14, 14, 2716, 14, 2717, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 18, 2716, 19, 14, 1, 14, 2718,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 1, 1, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 2719,
-
1, 1, 1, 2720, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2719, 1,
-
1, 1, 1, 1, 1, 1, 2721, 1,
-
1, 1, 2722, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2722, 1, 2723, 1, 1, 1, 2724,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2723, 1, 1, 1, 1, 1,
-
1, 1, 2725, 1, 1, 1, 2726, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2726, 1, 2727,
-
1, 1, 1, 2728, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2727, 2729,
-
2730, 2729, 2729, 2729, 2729, 2729, 2731, 1,
-
2729, 2729, 6, 2729, 2732, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
1, 6, 2704, 2729, 1, 2729, 2705, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
2729, 1, 1, 1, 2729, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 2729, 2729, 2729,
-
2729, 2729, 2729, 2729, 2729, 1, 2733, 1,
-
1, 1, 2734, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2733, 2735, 2310,
-
2735, 2735, 2735, 2735, 2735, 2736, 1, 2735,
-
2735, 2710, 2735, 2737, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 18,
-
2710, 19, 2735, 1, 2735, 2738, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
1, 1, 1, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 1, 2739, 1, 1,
-
1, 2740, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2739, 14, 15, 14,
-
14, 14, 14, 14, 2741, 1, 14, 14,
-
2716, 14, 2742, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 18, 2716,
-
19, 14, 1, 14, 2743, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 1,
-
1, 1, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 1, 2744, 1, 1, 1,
-
2745, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2744, 32, 33, 32, 32,
-
32, 32, 32, 2746, 1, 32, 32, 2747,
-
32, 2748, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 36, 2747, 37,
-
32, 1, 32, 2749, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 1, 1,
-
1, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 1, 2750, 1, 1, 1, 2751,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2750, 104, 15, 104, 104, 104,
-
104, 104, 2752, 1, 104, 104, 2722, 104,
-
2742, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 18, 2722, 19, 104,
-
1, 104, 2753, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 1, 1, 1,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 1, 2750, 1, 1, 1, 2751, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2750, 14, 15, 14, 14, 14, 14,
-
14, 2752, 1, 14, 14, 2722, 14, 2742,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 18, 2722, 19, 14, 1,
-
14, 2753, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 1, 1, 1, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
1, 2754, 1, 1, 1, 2755, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2754, 32, 33, 32, 32, 32, 32, 32,
-
2756, 1, 32, 32, 2726, 32, 2748, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 36, 2726, 37, 32, 1, 32,
-
2757, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 1, 1, 1, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 1,
-
2758, 1, 1, 1, 2759, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2758,
-
413, 414, 413, 413, 413, 413, 413, 2760,
-
1, 413, 413, 6, 413, 416, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 1, 6, 417, 413, 1, 413, 418,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 1, 1, 1, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 413, 413,
-
413, 413, 413, 413, 413, 413, 1, 302,
-
1, 1, 1, 2761, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 302, 421,
-
422, 421, 421, 421, 421, 421, 2762, 1,
-
421, 421, 6, 421, 424, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
1, 6, 349, 421, 1, 421, 1, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 1, 1, 1, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 421, 421, 421,
-
421, 421, 421, 421, 421, 1, 2763, 1,
-
1, 1, 2764, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2763, 695, 696,
-
695, 695, 695, 695, 695, 2765, 1, 695,
-
695, 2766, 695, 698, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 1,
-
2766, 354, 695, 1, 695, 1, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
1, 1, 1, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 695, 695, 695, 695,
-
695, 695, 695, 695, 1, 120, 1, 1,
-
1, 2767, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 120, 1, 1, 1,
-
1, 1, 1, 1, 2768, 1, 1, 1,
-
6, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 6,
-
1, 1184, 1, 1, 1, 2769, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1184, 1, 1, 1, 1, 1, 1, 1,
-
2770, 1, 1, 1, 2766, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2766, 1, 2771, 1, 1,
-
1, 2772, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2771, 2140, 2141, 2140,
-
2140, 2140, 2140, 2140, 2773, 1, 2140, 2140,
-
2774, 2140, 2775, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 18, 2774,
-
19, 2140, 1, 2140, 17, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 1,
-
1, 1, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
-
2140, 2140, 2140, 1, 2771, 1, 1, 1,
-
2772, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2771, 14, 15, 14, 14,
-
14, 14, 14, 2773, 1, 14, 14, 2774,
-
14, 2776, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 18, 2774, 19,
-
14, 1, 14, 17, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 1,
-
1, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 2777, 1, 1, 1, 2778,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2777, 32, 33, 32, 32, 32,
-
32, 32, 2779, 1, 32, 32, 2780, 32,
-
2781, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 36, 2780, 37, 32,
-
1, 32, 35, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 1, 1,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 2771, 1, 1, 1, 2772, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2771, 2150, 15, 2150, 2150, 2150, 2150,
-
2150, 2773, 1, 2150, 2150, 2774, 2150, 2776,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 18, 2774, 19, 2150, 1,
-
2150, 17, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 1, 1, 1, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
2150, 2150, 2150, 2150, 2150, 2150, 2150, 2150,
-
1, 2782, 1, 1, 1, 2783, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2782, 2171, 2141, 2171, 2171, 2171, 2171, 2171,
-
2784, 1, 2171, 2171, 2774, 2171, 2172, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 18, 2774, 19, 2171, 1, 2171,
-
17, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 1, 1, 1, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
-
2171, 2171, 2171, 2171, 2171, 2171, 2171, 1,
-
2782, 1, 1, 1, 2783, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2782,
-
14, 15, 14, 14, 14, 14, 14, 2784,
-
1, 14, 14, 2774, 14, 17, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 18, 2774, 19, 14, 1, 14, 17,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 1, 1, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 2785,
-
1, 1, 1, 2786, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2785, 32,
-
33, 32, 32, 32, 32, 32, 2787, 1,
-
32, 32, 2780, 32, 35, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
36, 2780, 37, 32, 1, 32, 35, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 1, 1, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 2788, 1,
-
1, 1, 2789, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2788, 2183, 2184,
-
2183, 2183, 2183, 2183, 2183, 2790, 1, 2183,
-
2183, 2774, 2183, 2143, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 1,
-
2774, 1, 2183, 1, 2183, 1, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
1, 1, 1, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183,
-
2183, 2183, 2183, 2183, 1, 2788, 1, 1,
-
1, 2789, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2788, 1, 1, 1,
-
1, 1, 1, 1, 2790, 1, 1, 1,
-
2774, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2774,
-
1, 2791, 1, 1, 1, 2792, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2791, 1, 1, 1, 1, 1, 1, 1,
-
2793, 1, 1, 1, 2780, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2780, 1, 2794, 1, 1,
-
1, 2795, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2794, 2309, 2310, 2309,
-
2309, 2309, 2309, 2309, 2796, 1, 2309, 2309,
-
2710, 2309, 2797, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 18, 2710,
-
19, 2309, 1, 2309, 2738, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 1,
-
1, 1, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 1, 2798, 1, 1, 1,
-
2799, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2798, 14, 15, 14, 14,
-
14, 14, 14, 2800, 1, 14, 14, 2716,
-
14, 17, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 18, 2716, 19,
-
14, 1, 14, 2743, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 1,
-
1, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 2801, 1, 1, 1, 2802,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2801, 32, 33, 32, 32, 32,
-
32, 32, 2803, 1, 32, 32, 2747, 32,
-
35, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 36, 2747, 37, 32,
-
1, 32, 2749, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 1, 1,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 2804, 1, 1, 1, 2805, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2804, 2309, 2310, 2309, 2309, 2309, 2309,
-
2309, 2806, 1, 2309, 2309, 2710, 2309, 2797,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 18, 2710, 19, 2309, 1,
-
2309, 2738, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 1, 1, 1, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
1, 2807, 1, 1, 1, 2808, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2807, 14, 15, 14, 14, 14, 14, 14,
-
2809, 1, 14, 14, 2716, 14, 1, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 2716, 8, 14, 1, 14,
-
2810, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 1, 1, 1, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 1,
-
2811, 1, 1, 1, 2812, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2811,
-
32, 33, 32, 32, 32, 32, 32, 2813,
-
1, 32, 32, 2747, 32, 1, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 2747, 48, 32, 1, 32, 2814,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 1, 1, 1, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 1, 2815,
-
1, 1, 1, 2816, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2815, 2231,
-
2184, 2231, 2231, 2231, 2231, 2231, 2817, 1,
-
2231, 2231, 2774, 2231, 2818, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
1, 2774, 1, 2231, 1, 2231, 1, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 1, 1, 1, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 2231, 2231, 2231,
-
2231, 2231, 2231, 2231, 2231, 1, 2815, 1,
-
1, 1, 2816, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2815, 1, 1,
-
1, 1, 1, 1, 1, 2817, 1, 1,
-
1, 2774, 1, 2236, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2774, 1, 2819, 1, 1, 1, 2820, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2819, 1, 1, 1, 1, 1, 1,
-
1, 2821, 1, 1, 1, 2780, 1, 2241,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2780, 1, 2815, 1,
-
1, 1, 2816, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2815, 2238, 1,
-
2238, 2238, 2238, 2238, 2238, 2817, 1, 2238,
-
2238, 2774, 2238, 2236, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 1,
-
2774, 1, 2238, 1, 2238, 1, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
1, 1, 1, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 2238, 2238, 2238, 2238,
-
2238, 2238, 2238, 2238, 1, 2822, 1, 1,
-
1, 2823, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2822, 2735, 2824, 2735,
-
2735, 2735, 2735, 2735, 2825, 1, 2735, 2735,
-
2710, 2735, 2797, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 18, 2710,
-
19, 2735, 1, 2735, 2738, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 1,
-
1, 1, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735,
-
2735, 2735, 2735, 1, 2826, 1, 1, 1,
-
2827, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2826, 104, 105, 104, 104,
-
104, 104, 104, 2828, 1, 104, 104, 2716,
-
104, 1, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 1, 2716, 8,
-
104, 1, 104, 2810, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 1, 1,
-
1, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 104, 104, 104, 104, 104, 104,
-
104, 104, 1, 2829, 1, 1, 1, 2830,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2829, 2207, 2208, 2207, 2207, 2207,
-
2207, 2207, 2831, 1, 2207, 2207, 2747, 2207,
-
1, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 1, 2747, 48, 2207,
-
1, 2207, 2814, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 1, 1, 1,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
-
2207, 1, 2733, 1, 1, 1, 2734, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2733, 2309, 2310, 2309, 2309, 2309, 2309,
-
2309, 2736, 1, 2309, 2309, 2710, 2309, 2737,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 18, 2710, 19, 2309, 1,
-
2309, 2738, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 1, 1, 1, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
1, 2832, 1, 1, 1, 2833, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2832, 2309, 2310, 2309, 2309, 2309, 2309, 2309,
-
2834, 1, 2309, 2309, 2835, 2309, 2737, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 18, 2835, 19, 2309, 1, 2309,
-
2836, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 1, 1, 1, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
-
2309, 2309, 2309, 2309, 2309, 2309, 2309, 1,
-
2837, 1, 1, 1, 2838, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2837,
-
14, 15, 14, 14, 14, 14, 14, 2839,
-
1, 14, 14, 2840, 14, 2742, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 18, 2840, 19, 14, 1, 14, 2841,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 1, 1, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 2842,
-
1, 1, 1, 2843, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2842, 32,
-
33, 32, 32, 32, 32, 32, 2844, 1,
-
32, 32, 2845, 32, 2748, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
36, 2845, 37, 32, 1, 32, 2846, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 1, 1, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 2847, 1,
-
1, 1, 2848, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2847, 14, 15,
-
14, 14, 14, 14, 14, 2849, 1, 14,
-
14, 2850, 14, 2742, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 18,
-
2850, 19, 14, 1, 14, 2851, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
1, 1, 1, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 1, 2852, 1, 1,
-
1, 2853, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2852, 32, 33, 32,
-
32, 32, 32, 32, 2854, 1, 32, 32,
-
2855, 32, 2748, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 36, 2855,
-
37, 32, 1, 32, 2856, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 1,
-
1, 1, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 1, 2857, 1, 1, 1,
-
2858, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2857, 2298, 2299, 2298, 2298,
-
2298, 2298, 2298, 2859, 1, 2298, 2298, 2710,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 1, 2710, 1,
-
2298, 1, 2298, 2860, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 1, 1,
-
1, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 2298, 2298, 2298, 2298, 2298, 2298,
-
2298, 2298, 1, 2861, 1, 1, 1, 2862,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2861, 1, 1, 1, 1, 1,
-
1, 1, 2863, 1, 1, 1, 2716, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2716, 1, 1,
-
1, 1, 2810, 1, 2864, 1, 1, 1,
-
2865, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2864, 1, 1, 1, 1,
-
1, 1, 1, 2866, 1, 1, 1, 2747,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2747, 1,
-
1, 1, 1, 2814, 1, 2867, 1, 1,
-
1, 2868, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2867, 32, 33, 32,
-
32, 32, 32, 32, 2869, 1, 32, 32,
-
2747, 32, 2870, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 36, 2747,
-
37, 32, 1, 32, 2871, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 1,
-
1, 1, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 1, 2872, 1, 1, 1,
-
2873, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2872, 2557, 15, 2557, 2557,
-
2557, 2557, 2557, 2874, 1, 2557, 2557, 2722,
-
2557, 2717, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 18, 2722, 19,
-
2557, 1, 2557, 2875, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 1, 1,
-
1, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 1, 2872, 1, 1, 1, 2873,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2872, 14, 15, 14, 14, 14,
-
14, 14, 2874, 1, 14, 14, 2722, 14,
-
2717, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 18, 2722, 19, 14,
-
1, 14, 2875, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 1, 1, 1,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 1, 2876, 1, 1, 1, 2877, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2876, 32, 33, 32, 32, 32, 32,
-
32, 2878, 1, 32, 32, 2726, 32, 2870,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 36, 2726, 37, 32, 1,
-
32, 2879, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 1, 1, 1, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
1, 2186, 1, 1, 1, 2880, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2186, 2578, 2579, 2578, 2578, 2578, 2578, 2578,
-
2790, 1, 2578, 2578, 2774, 2578, 2572, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 1, 2774, 1, 2578, 1, 2578,
-
1, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 1, 1, 1, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 2578,
-
2578, 2578, 2578, 2578, 2578, 2578, 2578, 1,
-
2881, 1, 1, 1, 2882, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2881,
-
2684, 2685, 2684, 2684, 2684, 2684, 2684, 2883,
-
1, 2684, 2684, 2710, 2684, 2884, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 18, 2710, 19, 2684, 1, 2684, 2712,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 1, 1, 1, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 1, 2885,
-
1, 1, 1, 2886, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2885, 14,
-
15, 14, 14, 14, 14, 14, 2887, 1,
-
14, 14, 2716, 14, 17, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
18, 2716, 19, 14, 1, 14, 2718, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 1, 1, 1, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 1, 2888, 1,
-
1, 1, 2889, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2888, 32, 33,
-
32, 32, 32, 32, 32, 2890, 1, 32,
-
32, 2747, 32, 35, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 36,
-
2747, 37, 32, 1, 32, 2871, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
1, 1, 1, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 1, 2891, 1, 1,
-
1, 2892, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2891, 2684, 2685, 2684,
-
2684, 2684, 2684, 2684, 2893, 1, 2684, 2684,
-
2710, 2684, 2884, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 18, 2710,
-
19, 2684, 1, 2684, 2712, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 1,
-
1, 1, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 1, 2894, 1, 1, 1,
-
2895, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2894, 14, 15, 14, 14,
-
14, 14, 14, 2896, 1, 14, 14, 2716,
-
14, 1, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 1, 2716, 8,
-
14, 1, 14, 2897, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 1,
-
1, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 2898, 1, 1, 1, 2899,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2898, 32, 33, 32, 32, 32,
-
32, 32, 2900, 1, 32, 32, 2747, 32,
-
1, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 1, 2747, 48, 32,
-
1, 32, 2901, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 1, 1,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 2235, 1, 1, 1, 2902, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2235, 2621, 2579, 2621, 2621, 2621, 2621,
-
2621, 2817, 1, 2621, 2621, 2774, 2621, 2903,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 1, 2774, 1, 2621, 1,
-
2621, 1, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 1, 1, 1, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
-
1, 2904, 1, 1, 1, 2905, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2904, 2708, 2906, 2708, 2708, 2708, 2708, 2708,
-
2907, 1, 2708, 2708, 2710, 2708, 2884, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 18, 2710, 19, 2708, 1, 2708,
-
2712, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 1, 1, 1, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708,
-
2708, 2708, 2708, 2708, 2708, 2708, 2708, 1,
-
2908, 1, 1, 1, 2909, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2908,
-
2557, 2558, 2557, 2557, 2557, 2557, 2557, 2910,
-
1, 2557, 2557, 2716, 2557, 1, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 1, 2716, 8, 2557, 1, 2557, 2897,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 1, 1, 1, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 2557, 2557,
-
2557, 2557, 2557, 2557, 2557, 2557, 1, 2911,
-
1, 1, 1, 2912, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2911, 2597,
-
2598, 2597, 2597, 2597, 2597, 2597, 2913, 1,
-
2597, 2597, 2747, 2597, 1, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
1, 2747, 48, 2597, 1, 2597, 2901, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 1, 1, 1, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
-
2597, 2597, 2597, 2597, 2597, 1, 2706, 1,
-
1, 1, 2707, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 2706, 2684, 2685,
-
2684, 2684, 2684, 2684, 2684, 2709, 1, 2684,
-
2684, 2710, 2684, 2711, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 18,
-
2710, 19, 2684, 1, 2684, 2712, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
1, 1, 1, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 1, 2914, 1, 1,
-
1, 2915, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 2914, 2684, 2685, 2684,
-
2684, 2684, 2684, 2684, 2916, 1, 2684, 2684,
-
2835, 2684, 2711, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 18, 2835,
-
19, 2684, 1, 2684, 2917, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 1,
-
1, 1, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 2684, 2684, 2684, 2684, 2684,
-
2684, 2684, 2684, 1, 2918, 1, 1, 1,
-
2919, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 2918, 14, 15, 14, 14,
-
14, 14, 14, 2920, 1, 14, 14, 2840,
-
14, 2717, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 18, 2840, 19,
-
14, 1, 14, 2921, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 1,
-
1, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 1, 2922, 1, 1, 1, 2923,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2922, 32, 33, 32, 32, 32,
-
32, 32, 2924, 1, 32, 32, 2845, 32,
-
2870, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 36, 2845, 37, 32,
-
1, 32, 2925, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 1, 1, 1,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 1, 2926, 1, 1, 1, 2927, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2926, 14, 15, 14, 14, 14, 14,
-
14, 2928, 1, 14, 14, 2850, 14, 2717,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 18, 2850, 19, 14, 1,
-
14, 2929, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 1, 1, 1, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
1, 2930, 1, 1, 1, 2931, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
2930, 32, 33, 32, 32, 32, 32, 32,
-
2932, 1, 32, 32, 2855, 32, 2870, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 36, 2855, 37, 32, 1, 32,
-
2933, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 1, 1, 1, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 1,
-
2934, 1, 1, 1, 2935, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2934,
-
2673, 2674, 2673, 2673, 2673, 2673, 2673, 2936,
-
1, 2673, 2673, 2710, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 1, 2710, 1, 2673, 1, 2673, 2937,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 1, 1, 1, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2673,
-
2673, 2673, 2673, 2673, 2673, 2673, 1, 2938,
-
1, 1, 1, 2939, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 2938, 1,
-
1, 1, 1, 1, 1, 1, 2940, 1,
-
1, 1, 2716, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 2716, 1, 1, 1, 1, 2897, 1,
-
2941, 1, 1, 1, 2942, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 2941,
-
1, 1, 1, 1, 1, 1, 1, 2943,
-
1, 1, 1, 2747, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 2747, 1, 1, 1, 1, 2901,
-
1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_address_lists_trans_targs
-
1
private :_address_lists_trans_targs, :_address_lists_trans_targs=
-
end
-
1
self._address_lists_trans_targs = [
-
1, 0, 2, 1335, 1302, 1314, 1339, 1318,
-
20, 3, 5, 1336, 6, 7, 6, 9,
-
14, 15, 49, 20, 8, 10, 11, 6,
-
13, 10, 11, 6, 13, 12, 6, 7,
-
6, 9, 14, 15, 49, 20, 16, 17,
-
19, 16, 17, 19, 18, 16, 17, 19,
-
20, 21, 22, 24, 1184, 1201, 1202, 1224,
-
1206, 21, 22, 1201, 1202, 1206, 23, 25,
-
26, 24, 1158, 28, 1170, 1337, 1119, 25,
-
26, 28, 29, 1337, 1119, 27, 25, 26,
-
28, 29, 1337, 1119, 30, 32, 1152, 1157,
-
31, 33, 34, 36, 1119, 35, 33, 34,
-
36, 1119, 38, 40, 42, 1341, 44, 45,
-
1343, 1052, 1057, 44, 45, 1057, 46, 48,
-
1344, 50, 51, 53, 96, 1008, 1009, 877,
-
1349, 71, 66, 50, 51, 53, 96, 1008,
-
864, 71, 52, 54, 55, 53, 492, 531,
-
92, 521, 1346, 71, 433, 54, 55, 57,
-
60, 531, 92, 105, 1346, 433, 56, 54,
-
57, 58, 65, 66, 59, 61, 62, 57,
-
64, 61, 62, 57, 64, 63, 57, 58,
-
57, 60, 65, 66, 71, 67, 68, 70,
-
67, 68, 70, 69, 67, 68, 70, 71,
-
72, 73, 75, 943, 960, 961, 983, 965,
-
72, 73, 960, 961, 965, 74, 76, 77,
-
75, 917, 79, 929, 88, 878, 76, 77,
-
79, 80, 88, 878, 78, 76, 77, 79,
-
80, 88, 878, 81, 83, 911, 916, 82,
-
84, 85, 87, 878, 86, 84, 85, 87,
-
878, 89, 91, 92, 1346, 90, 89, 91,
-
92, 1346, 93, 94, 544, 545, 93, 94,
-
544, 95, 97, 537, 538, 540, 536, 97,
-
98, 100, 536, 99, 101, 102, 487, 104,
-
92, 1346, 433, 101, 102, 104, 92, 1346,
-
433, 103, 101, 101, 102, 104, 92, 105,
-
1346, 433, 106, 107, 109, 481, 486, 106,
-
107, 486, 108, 110, 111, 113, 433, 112,
-
110, 110, 111, 113, 433, 115, 1347, 117,
-
118, 116, 236, 275, 155, 265, 134, 177,
-
117, 118, 120, 123, 275, 155, 168, 177,
-
119, 117, 120, 121, 128, 129, 122, 124,
-
125, 120, 127, 124, 125, 120, 127, 126,
-
120, 121, 120, 123, 128, 129, 134, 130,
-
131, 133, 130, 131, 133, 134, 132, 130,
-
131, 133, 134, 135, 136, 138, 368, 385,
-
386, 408, 390, 135, 136, 385, 386, 390,
-
137, 139, 140, 138, 342, 142, 354, 151,
-
303, 139, 140, 142, 143, 151, 303, 141,
-
139, 140, 142, 143, 151, 303, 144, 146,
-
336, 341, 145, 147, 148, 150, 303, 149,
-
147, 148, 150, 303, 152, 154, 155, 153,
-
152, 154, 155, 156, 157, 116, 159, 288,
-
302, 134, 129, 156, 157, 116, 159, 288,
-
289, 158, 160, 281, 282, 284, 280, 160,
-
161, 163, 280, 162, 164, 165, 231, 167,
-
155, 177, 164, 165, 167, 155, 177, 166,
-
164, 164, 165, 167, 155, 168, 177, 169,
-
170, 172, 225, 230, 169, 170, 230, 171,
-
173, 174, 176, 177, 175, 173, 173, 174,
-
176, 177, 178, 179, 181, 192, 207, 201,
-
221, 178, 179, 181, 192, 207, 208, 221,
-
180, 182, 183, 185, 155, 206, 1346, 186,
-
184, 182, 182, 183, 185, 155, 186, 1346,
-
187, 188, 190, 191, 187, 188, 191, 189,
-
187, 188, 190, 191, 193, 203, 204, 202,
-
193, 194, 196, 202, 195, 197, 198, 196,
-
200, 201, 199, 197, 197, 198, 200, 203,
-
204, 205, 178, 179, 181, 192, 207, 208,
-
221, 209, 214, 210, 211, 213, 212, 210,
-
211, 213, 215, 219, 218, 216, 217, 220,
-
222, 224, 223, 226, 227, 173, 229, 226,
-
227, 173, 229, 228, 169, 170, 172, 225,
-
230, 232, 233, 235, 244, 232, 233, 235,
-
234, 232, 232, 233, 235, 155, 1346, 177,
-
237, 241, 242, 240, 237, 238, 231, 240,
-
239, 241, 242, 243, 245, 246, 248, 245,
-
246, 248, 249, 247, 245, 246, 248, 249,
-
250, 251, 253, 214, 264, 208, 250, 251,
-
253, 264, 252, 254, 255, 257, 263, 258,
-
256, 254, 255, 257, 258, 259, 261, 262,
-
260, 259, 261, 262, 250, 251, 253, 214,
-
264, 266, 267, 270, 269, 266, 267, 269,
-
268, 266, 267, 269, 271, 277, 278, 276,
-
271, 272, 274, 276, 273, 117, 118, 275,
-
277, 278, 279, 281, 282, 284, 283, 284,
-
285, 287, 155, 1346, 177, 286, 284, 284,
-
285, 287, 155, 1346, 177, 156, 157, 116,
-
159, 288, 289, 290, 295, 289, 291, 292,
-
294, 249, 291, 292, 294, 293, 291, 292,
-
294, 296, 300, 299, 297, 298, 301, 302,
-
304, 305, 307, 317, 331, 326, 332, 304,
-
305, 307, 317, 331, 326, 332, 306, 308,
-
309, 311, 330, 151, 312, 310, 308, 309,
-
311, 312, 151, 313, 315, 316, 314, 313,
-
315, 316, 318, 328, 327, 319, 321, 320,
-
322, 323, 325, 324, 322, 323, 325, 329,
-
304, 305, 307, 317, 331, 326, 332, 333,
-
335, 334, 337, 338, 147, 340, 337, 338,
-
147, 340, 339, 144, 146, 336, 341, 343,
-
352, 351, 344, 346, 345, 347, 348, 350,
-
347, 348, 350, 349, 347, 348, 350, 353,
-
355, 356, 359, 358, 355, 356, 358, 357,
-
355, 356, 358, 360, 365, 366, 364, 360,
-
361, 363, 364, 362, 365, 366, 367, 369,
-
378, 379, 381, 377, 369, 370, 372, 377,
-
371, 373, 374, 376, 303, 373, 374, 376,
-
303, 375, 373, 374, 376, 303, 378, 379,
-
381, 380, 381, 382, 384, 303, 383, 381,
-
382, 384, 303, 135, 136, 138, 368, 385,
-
386, 408, 390, 387, 389, 388, 387, 389,
-
391, 392, 394, 414, 428, 423, 429, 391,
-
392, 394, 414, 428, 423, 429, 393, 395,
-
396, 398, 399, 427, 403, 409, 397, 395,
-
396, 398, 399, 409, 403, 399, 400, 402,
-
403, 401, 399, 400, 402, 403, 404, 405,
-
138, 368, 407, 408, 404, 405, 407, 406,
-
404, 405, 407, 408, 410, 412, 413, 411,
-
410, 412, 413, 415, 425, 424, 416, 418,
-
417, 419, 420, 422, 421, 419, 420, 422,
-
426, 391, 392, 394, 414, 428, 423, 429,
-
430, 432, 431, 434, 435, 437, 448, 463,
-
457, 477, 434, 435, 437, 448, 463, 464,
-
477, 436, 438, 439, 441, 92, 462, 442,
-
440, 438, 438, 439, 441, 92, 442, 443,
-
444, 446, 447, 443, 444, 447, 445, 443,
-
444, 446, 447, 449, 459, 460, 458, 449,
-
450, 452, 458, 451, 453, 454, 452, 456,
-
457, 455, 453, 453, 454, 456, 459, 460,
-
461, 434, 435, 437, 448, 463, 464, 477,
-
465, 470, 466, 467, 469, 468, 466, 467,
-
469, 471, 475, 474, 472, 473, 476, 478,
-
480, 479, 482, 483, 110, 485, 482, 483,
-
110, 485, 484, 106, 107, 109, 481, 486,
-
488, 489, 491, 500, 488, 489, 491, 490,
-
488, 488, 489, 491, 92, 433, 493, 497,
-
498, 496, 493, 494, 487, 496, 495, 497,
-
498, 499, 501, 502, 504, 501, 502, 504,
-
505, 503, 501, 502, 504, 505, 506, 507,
-
509, 470, 520, 464, 506, 507, 509, 520,
-
508, 510, 511, 513, 519, 514, 512, 510,
-
511, 513, 514, 515, 517, 518, 516, 515,
-
517, 518, 506, 507, 509, 470, 520, 522,
-
523, 526, 525, 522, 523, 525, 524, 522,
-
523, 525, 527, 533, 534, 532, 527, 528,
-
530, 532, 529, 54, 55, 531, 533, 534,
-
535, 537, 538, 540, 539, 540, 541, 543,
-
92, 433, 542, 540, 540, 541, 543, 92,
-
433, 93, 94, 53, 96, 544, 545, 864,
-
1349, 546, 547, 549, 832, 849, 863, 567,
-
562, 546, 547, 549, 832, 849, 850, 567,
-
548, 550, 551, 549, 784, 720, 545, 818,
-
1349, 567, 730, 550, 551, 553, 556, 720,
-
545, 721, 1349, 730, 552, 550, 553, 554,
-
561, 562, 555, 557, 558, 553, 560, 557,
-
558, 553, 560, 559, 553, 554, 553, 556,
-
561, 562, 567, 563, 564, 566, 563, 564,
-
566, 565, 563, 564, 566, 567, 568, 569,
-
571, 655, 672, 673, 695, 677, 568, 569,
-
672, 673, 677, 570, 572, 573, 571, 629,
-
575, 641, 584, 590, 572, 573, 575, 576,
-
584, 590, 574, 572, 573, 575, 576, 584,
-
590, 577, 579, 623, 628, 578, 580, 581,
-
583, 590, 582, 580, 581, 583, 590, 585,
-
587, 545, 1349, 586, 585, 587, 545, 1349,
-
589, 591, 592, 594, 604, 618, 613, 619,
-
591, 592, 594, 604, 618, 613, 619, 593,
-
595, 596, 598, 617, 584, 599, 597, 595,
-
596, 598, 599, 584, 600, 602, 603, 601,
-
600, 602, 603, 605, 615, 614, 606, 608,
-
607, 609, 610, 612, 611, 609, 610, 612,
-
616, 591, 592, 594, 604, 618, 613, 619,
-
620, 622, 621, 624, 625, 580, 627, 624,
-
625, 580, 627, 626, 577, 579, 623, 628,
-
630, 639, 638, 631, 633, 632, 634, 635,
-
637, 634, 635, 637, 636, 634, 635, 637,
-
640, 642, 643, 646, 645, 642, 643, 645,
-
644, 642, 643, 645, 647, 652, 653, 651,
-
647, 648, 650, 651, 649, 652, 653, 654,
-
656, 665, 666, 668, 664, 656, 657, 659,
-
664, 658, 660, 661, 663, 590, 660, 661,
-
663, 590, 662, 660, 661, 663, 590, 665,
-
666, 668, 667, 668, 669, 671, 590, 670,
-
668, 669, 671, 590, 568, 569, 571, 655,
-
672, 673, 695, 677, 674, 676, 675, 674,
-
676, 678, 679, 681, 701, 715, 710, 716,
-
678, 679, 681, 701, 715, 710, 716, 680,
-
682, 683, 685, 686, 714, 690, 696, 684,
-
682, 683, 685, 686, 696, 690, 686, 687,
-
689, 690, 688, 686, 687, 689, 690, 691,
-
692, 571, 655, 694, 695, 691, 692, 694,
-
693, 691, 692, 694, 695, 697, 699, 700,
-
698, 697, 699, 700, 702, 712, 711, 703,
-
705, 704, 706, 707, 709, 708, 706, 707,
-
709, 713, 678, 679, 681, 701, 715, 710,
-
716, 717, 719, 718, 550, 551, 720, 545,
-
721, 1349, 730, 722, 723, 725, 778, 783,
-
722, 723, 783, 724, 726, 727, 729, 730,
-
728, 726, 726, 727, 729, 730, 731, 732,
-
734, 745, 760, 754, 774, 731, 732, 734,
-
745, 760, 761, 774, 733, 735, 736, 738,
-
545, 759, 1349, 739, 737, 735, 735, 736,
-
738, 545, 739, 1349, 740, 741, 743, 744,
-
740, 741, 744, 742, 740, 741, 743, 744,
-
746, 756, 757, 755, 746, 747, 749, 755,
-
748, 750, 751, 749, 753, 754, 752, 750,
-
750, 751, 753, 756, 757, 758, 731, 732,
-
734, 745, 760, 761, 774, 762, 767, 763,
-
764, 766, 765, 763, 764, 766, 768, 772,
-
771, 769, 770, 773, 775, 777, 776, 779,
-
780, 726, 782, 779, 780, 726, 782, 781,
-
722, 723, 725, 778, 783, 785, 815, 816,
-
814, 785, 786, 788, 814, 787, 789, 790,
-
788, 792, 793, 789, 790, 792, 791, 789,
-
789, 790, 792, 794, 795, 797, 794, 795,
-
797, 798, 796, 794, 795, 797, 798, 799,
-
800, 802, 767, 813, 761, 799, 800, 802,
-
813, 801, 803, 804, 806, 812, 807, 805,
-
803, 804, 806, 807, 808, 810, 811, 809,
-
808, 810, 811, 799, 800, 802, 767, 813,
-
815, 816, 817, 819, 820, 823, 822, 819,
-
820, 822, 821, 819, 820, 822, 824, 829,
-
830, 828, 824, 825, 827, 828, 826, 829,
-
830, 831, 833, 842, 843, 845, 841, 833,
-
834, 836, 841, 835, 837, 838, 840, 545,
-
1349, 730, 837, 838, 840, 545, 1349, 730,
-
839, 837, 837, 838, 840, 545, 1349, 730,
-
842, 843, 845, 844, 845, 846, 848, 545,
-
1349, 730, 847, 845, 845, 846, 848, 545,
-
1349, 730, 546, 547, 549, 832, 849, 850,
-
851, 856, 850, 852, 853, 855, 798, 852,
-
853, 855, 854, 852, 853, 855, 857, 861,
-
860, 858, 859, 862, 863, 865, 870, 864,
-
866, 867, 869, 505, 866, 867, 869, 868,
-
866, 867, 869, 871, 875, 874, 872, 873,
-
876, 877, 879, 880, 882, 892, 906, 901,
-
907, 879, 880, 882, 892, 906, 901, 907,
-
881, 883, 884, 886, 905, 88, 887, 885,
-
883, 884, 886, 887, 88, 888, 890, 891,
-
889, 888, 890, 891, 893, 903, 902, 894,
-
896, 895, 897, 898, 900, 899, 897, 898,
-
900, 904, 879, 880, 882, 892, 906, 901,
-
907, 908, 910, 909, 912, 913, 84, 915,
-
912, 913, 84, 915, 914, 81, 83, 911,
-
916, 918, 927, 926, 919, 921, 920, 922,
-
923, 925, 922, 923, 925, 924, 922, 923,
-
925, 928, 930, 931, 934, 933, 930, 931,
-
933, 932, 930, 931, 933, 935, 940, 941,
-
939, 935, 936, 938, 939, 937, 940, 941,
-
942, 944, 953, 954, 956, 952, 944, 945,
-
947, 952, 946, 948, 949, 951, 878, 948,
-
949, 951, 878, 950, 948, 949, 951, 878,
-
953, 954, 956, 955, 956, 957, 959, 878,
-
958, 956, 957, 959, 878, 72, 73, 75,
-
943, 960, 961, 983, 965, 962, 964, 963,
-
962, 964, 966, 967, 969, 989, 1003, 998,
-
1004, 966, 967, 969, 989, 1003, 998, 1004,
-
968, 970, 971, 973, 974, 1002, 978, 984,
-
972, 970, 971, 973, 974, 984, 978, 974,
-
975, 977, 978, 976, 974, 975, 977, 978,
-
979, 980, 75, 943, 982, 983, 979, 980,
-
982, 981, 979, 980, 982, 983, 985, 987,
-
988, 986, 985, 987, 988, 990, 1000, 999,
-
991, 993, 992, 994, 995, 997, 996, 994,
-
995, 997, 1001, 966, 967, 969, 989, 1003,
-
998, 1004, 1005, 1007, 1006, 50, 51, 1008,
-
1009, 1010, 1011, 1013, 1010, 1011, 1013, 1012,
-
1010, 1011, 1013, 1015, 1016, 1351, 1025, 1037,
-
1031, 1048, 1015, 1016, 1351, 1025, 1037, 1038,
-
1048, 1017, 1019, 1352, 1021, 1022, 1354, 1024,
-
1021, 1022, 1024, 1023, 1021, 1022, 1354, 1024,
-
1026, 1033, 1034, 1032, 1026, 1027, 1355, 1032,
-
1028, 1030, 1356, 1355, 1031, 1033, 1034, 1035,
-
1015, 1016, 1351, 1025, 1037, 1038, 1048, 1358,
-
1041, 1040, 1359, 1042, 1046, 1045, 1043, 1044,
-
1047, 1049, 1051, 1050, 1053, 1054, 1344, 1056,
-
1053, 1054, 1344, 1056, 1055, 44, 45, 1343,
-
1052, 1057, 1059, 1079, 1080, 1078, 1059, 1060,
-
1361, 1078, 1061, 1063, 1362, 1065, 1365, 1067,
-
1068, 1367, 1041, 1077, 1038, 1067, 1068, 1367,
-
1077, 1069, 1071, 1368, 1072, 1073, 1370, 1075,
-
1074, 1072, 1073, 1370, 1075, 1067, 1068, 1367,
-
1041, 1077, 1079, 1080, 1081, 1083, 1372, 1085,
-
1089, 1090, 1088, 1085, 1086, 1374, 1088, 1087,
-
1089, 1090, 1091, 1093, 1099, 1100, 1378, 1098,
-
1093, 1094, 1375, 1098, 1095, 1097, 1376, 1099,
-
1100, 1378, 1101, 1103, 1378, 1105, 1106, 1340,
-
1092, 1104, 1108, 1105, 1106, 1340, 1092, 1104,
-
1108, 1107, 1380, 1111, 1108, 1110, 1381, 1112,
-
1116, 1115, 1113, 1114, 1117, 1361, 1058, 1118,
-
1120, 1121, 1123, 1133, 1147, 1142, 1148, 1120,
-
1121, 1123, 1133, 1147, 1142, 1148, 1122, 1124,
-
1125, 1127, 1146, 1337, 1128, 1126, 1124, 1125,
-
1127, 1128, 1337, 1129, 1131, 1132, 1130, 1129,
-
1131, 1132, 1134, 1144, 1143, 1135, 1137, 1136,
-
1138, 1139, 1141, 1140, 1138, 1139, 1141, 1145,
-
1120, 1121, 1123, 1133, 1147, 1142, 1148, 1149,
-
1151, 1150, 1153, 1154, 33, 1156, 1153, 1154,
-
33, 1156, 1155, 30, 32, 1152, 1157, 1159,
-
1168, 1167, 1160, 1162, 1161, 1163, 1164, 1166,
-
1163, 1164, 1166, 1165, 1163, 1164, 1166, 1169,
-
1171, 1172, 1175, 1174, 1171, 1172, 1174, 1173,
-
1171, 1172, 1174, 1176, 1181, 1182, 1180, 1176,
-
1177, 1179, 1180, 1178, 1181, 1182, 1183, 1185,
-
1194, 1195, 1197, 1193, 1185, 1186, 1188, 1193,
-
1187, 1189, 1190, 1192, 1119, 1189, 1190, 1192,
-
1119, 1191, 1189, 1190, 1192, 1119, 1194, 1195,
-
1197, 1196, 1197, 1198, 1200, 1119, 1199, 1197,
-
1198, 1200, 1119, 21, 22, 24, 1184, 1201,
-
1202, 1224, 1206, 1203, 1205, 1204, 1203, 1205,
-
1207, 1208, 1210, 1230, 1244, 1239, 1245, 1207,
-
1208, 1210, 1230, 1244, 1239, 1245, 1209, 1211,
-
1212, 1214, 1215, 1243, 1219, 1225, 1213, 1211,
-
1212, 1214, 1215, 1225, 1219, 1215, 1216, 1218,
-
1219, 1217, 1215, 1216, 1218, 1219, 1220, 1221,
-
24, 1184, 1223, 1224, 1220, 1221, 1223, 1222,
-
1220, 1221, 1223, 1224, 1226, 1228, 1229, 1227,
-
1226, 1228, 1229, 1231, 1241, 1240, 1232, 1234,
-
1233, 1235, 1236, 1238, 1237, 1235, 1236, 1238,
-
1242, 1207, 1208, 1210, 1230, 1244, 1239, 1245,
-
1246, 1248, 1247, 1250, 1251, 1384, 1268, 1273,
-
1250, 1251, 1273, 1252, 1254, 1385, 1256, 1257,
-
1259, 1256, 1257, 1259, 1260, 1258, 1256, 1257,
-
1259, 1260, 1387, 1261, 1262, 1266, 1265, 1263,
-
1264, 1267, 1269, 1270, 1385, 1272, 1269, 1270,
-
1385, 1272, 1271, 1250, 1251, 1384, 1268, 1273,
-
1275, 1289, 1290, 1288, 1275, 1276, 1388, 1288,
-
1277, 1279, 1389, 1281, 1392, 1283, 1284, 1394,
-
1261, 1287, 1260, 1283, 1284, 1394, 1287, 1285,
-
1283, 1284, 1394, 1261, 1287, 1289, 1290, 1291,
-
1293, 1396, 1295, 1299, 1300, 1298, 1295, 1296,
-
1398, 1298, 1297, 1299, 1300, 1301, 1303, 1309,
-
1310, 1402, 1308, 1303, 1304, 1399, 1308, 1305,
-
1307, 1400, 1309, 1310, 1402, 1311, 1313, 1402,
-
1315, 1316, 1335, 1302, 1314, 1318, 1315, 1316,
-
1317, 1404, 1321, 1318, 1320, 1405, 1322, 1326,
-
1325, 1323, 1324, 1327, 1388, 1274, 1328, 1330,
-
1331, 1330, 1407, 1333, 1330, 1331, 1330, 1407,
-
1333, 1332, 1, 2, 1335, 1302, 1314, 1328,
-
20, 15, 1336, 4, 1335, 1383, 1339, 1395,
-
1255, 1336, 4, 1383, 1339, 1249, 1255, 1337,
-
37, 1338, 1339, 1337, 37, 1338, 1339, 1339,
-
39, 1340, 1092, 1104, 1118, 1341, 41, 1340,
-
1342, 1371, 1014, 1341, 41, 1342, 43, 1014,
-
1341, 41, 1342, 1339, 43, 1014, 1344, 47,
-
1345, 1014, 1344, 47, 1345, 1014, 1347, 114,
-
1348, 114, 1348, 1347, 114, 1348, 1339, 588,
-
1350, 588, 1350, 1352, 1018, 1353, 1339, 1036,
-
1020, 1352, 1018, 1353, 1339, 1020, 1356, 1029,
-
1357, 1356, 1029, 1357, 1359, 1039, 1360, 1359,
-
1039, 1360, 1362, 1062, 1363, 1364, 1362, 1062,
-
1363, 1362, 1062, 1363, 1365, 1064, 1366, 1365,
-
1064, 1366, 1066, 1365, 1064, 1366, 1066, 1368,
-
1070, 1369, 1076, 1368, 1070, 1369, 1372, 1082,
-
1084, 1373, 1372, 1082, 1373, 1372, 1082, 1373,
-
1376, 1096, 1377, 1339, 1014, 1376, 1096, 1377,
-
1339, 1014, 1376, 1096, 1377, 1339, 1014, 1378,
-
1102, 1379, 1339, 1014, 1378, 1102, 1379, 1339,
-
1014, 1381, 1109, 1382, 1066, 1381, 1109, 1382,
-
1381, 1109, 1382, 1336, 4, 1383, 1249, 1255,
-
1385, 1253, 1386, 1255, 1385, 1253, 1386, 1255,
-
1039, 1389, 1278, 1390, 1391, 1389, 1278, 1390,
-
1389, 1278, 1390, 1392, 1280, 1393, 1392, 1280,
-
1393, 1282, 1392, 1280, 1393, 1282, 1070, 1286,
-
1396, 1292, 1294, 1397, 1396, 1292, 1397, 1396,
-
1292, 1397, 1400, 1306, 1401, 1255, 1400, 1306,
-
1401, 1255, 1400, 1306, 1401, 1255, 1402, 1312,
-
1403, 1255, 1402, 1312, 1403, 1255, 1405, 1319,
-
1406, 1282, 1405, 1319, 1406, 1405, 1319, 1406
-
]
-
-
1
class << self
-
1
attr_accessor :_address_lists_trans_actions
-
1
private :_address_lists_trans_actions, :_address_lists_trans_actions=
-
end
-
1
self._address_lists_trans_actions = [
-
0, 0, 0, 1, 1, 2, 0, 1,
-
3, 0, 0, 0, 4, 4, 0, 0,
-
5, 0, 6, 7, 0, 8, 8, 9,
-
8, 0, 0, 10, 0, 0, 11, 11,
-
12, 12, 13, 12, 14, 15, 4, 4,
-
5, 0, 0, 2, 0, 12, 12, 16,
-
17, 18, 18, 1, 1, 19, 20, 1,
-
20, 0, 0, 2, 0, 0, 0, 21,
-
21, 0, 0, 22, 0, 21, 23, 0,
-
0, 2, 0, 0, 24, 0, 12, 12,
-
16, 12, 12, 25, 0, 0, 0, 2,
-
0, 0, 0, 2, 0, 0, 12, 12,
-
16, 12, 0, 0, 0, 0, 4, 4,
-
0, 0, 5, 0, 0, 2, 0, 0,
-
0, 26, 26, 26, 26, 27, 0, 26,
-
0, 28, 29, 0, 0, 1, 1, 2,
-
1, 3, 0, 30, 30, 0, 0, 31,
-
32, 0, 32, 7, 23, 4, 4, 0,
-
0, 5, 33, 0, 33, 24, 0, 0,
-
4, 4, 5, 0, 0, 8, 8, 9,
-
8, 0, 0, 10, 0, 0, 11, 11,
-
12, 12, 13, 12, 15, 4, 4, 5,
-
0, 0, 2, 0, 12, 12, 16, 17,
-
18, 18, 1, 1, 19, 20, 1, 20,
-
0, 0, 2, 0, 0, 0, 21, 21,
-
0, 0, 22, 0, 21, 23, 0, 0,
-
2, 0, 0, 24, 0, 12, 12, 16,
-
12, 12, 25, 0, 0, 0, 2, 0,
-
0, 0, 2, 0, 0, 12, 12, 16,
-
12, 0, 2, 34, 34, 0, 12, 16,
-
35, 35, 26, 26, 27, 0, 0, 0,
-
2, 0, 8, 8, 8, 9, 8, 0,
-
0, 10, 0, 0, 30, 30, 0, 31,
-
36, 36, 37, 4, 4, 5, 38, 38,
-
39, 0, 0, 11, 11, 13, 40, 12,
-
40, 41, 4, 4, 0, 0, 5, 0,
-
0, 2, 0, 4, 4, 5, 0, 0,
-
0, 11, 11, 13, 12, 0, 0, 30,
-
30, 0, 0, 31, 32, 0, 7, 23,
-
4, 4, 0, 0, 5, 33, 0, 24,
-
0, 0, 4, 4, 5, 0, 0, 8,
-
8, 9, 8, 0, 0, 10, 0, 0,
-
11, 11, 12, 12, 13, 12, 15, 4,
-
4, 5, 0, 0, 2, 3, 0, 12,
-
12, 16, 17, 18, 18, 1, 1, 19,
-
20, 1, 20, 0, 0, 2, 0, 0,
-
0, 21, 21, 0, 0, 22, 0, 21,
-
23, 0, 0, 2, 0, 0, 24, 0,
-
12, 12, 16, 12, 12, 25, 0, 0,
-
0, 2, 0, 0, 0, 2, 0, 0,
-
12, 12, 16, 12, 0, 2, 34, 0,
-
12, 16, 35, 26, 26, 26, 26, 27,
-
26, 28, 29, 0, 0, 1, 1, 2,
-
1, 0, 8, 8, 8, 9, 8, 0,
-
0, 10, 0, 0, 30, 30, 0, 31,
-
36, 37, 4, 4, 5, 38, 39, 0,
-
0, 11, 11, 13, 40, 12, 41, 4,
-
4, 0, 0, 5, 0, 0, 2, 0,
-
4, 4, 5, 0, 0, 0, 11, 11,
-
13, 12, 42, 42, 43, 43, 44, 43,
-
43, 0, 0, 0, 0, 2, 0, 0,
-
0, 4, 4, 5, 45, 0, 45, 0,
-
0, 0, 11, 11, 13, 46, 12, 46,
-
4, 4, 0, 5, 0, 0, 2, 0,
-
12, 12, 12, 16, 8, 8, 8, 8,
-
0, 0, 10, 0, 0, 4, 4, 0,
-
5, 0, 0, 0, 11, 11, 13, 0,
-
0, 0, 12, 12, 12, 12, 16, 12,
-
12, 0, 0, 0, 0, 2, 0, 12,
-
12, 16, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 8, 8, 9, 8, 0,
-
0, 10, 0, 0, 12, 12, 12, 12,
-
16, 30, 30, 31, 0, 4, 4, 5,
-
0, 0, 11, 11, 13, 47, 47, 25,
-
8, 8, 8, 8, 0, 0, 10, 0,
-
0, 0, 0, 0, 30, 30, 31, 0,
-
0, 2, 24, 0, 12, 12, 16, 25,
-
43, 43, 43, 43, 48, 43, 0, 0,
-
0, 2, 0, 0, 0, 2, 0, 0,
-
0, 12, 12, 16, 12, 0, 0, 2,
-
0, 12, 12, 16, 12, 12, 12, 12,
-
16, 30, 30, 0, 31, 0, 0, 2,
-
0, 12, 12, 16, 8, 8, 8, 8,
-
0, 0, 10, 0, 0, 11, 11, 13,
-
0, 0, 0, 0, 0, 10, 0, 4,
-
4, 5, 49, 49, 50, 0, 0, 11,
-
11, 13, 51, 51, 52, 12, 12, 53,
-
53, 16, 53, 0, 0, 0, 21, 21,
-
22, 23, 0, 0, 2, 0, 12, 12,
-
16, 0, 0, 0, 0, 0, 0, 0,
-
43, 43, 43, 43, 48, 43, 43, 0,
-
0, 0, 0, 2, 0, 0, 0, 0,
-
0, 2, 0, 54, 0, 0, 12, 12,
-
16, 12, 55, 0, 0, 2, 0, 12,
-
12, 16, 0, 0, 0, 0, 0, 0,
-
0, 0, 2, 0, 12, 12, 16, 0,
-
12, 12, 12, 12, 16, 12, 12, 0,
-
0, 0, 8, 8, 9, 8, 0, 0,
-
10, 0, 0, 12, 12, 12, 16, 0,
-
0, 0, 0, 0, 0, 21, 21, 22,
-
0, 0, 2, 0, 12, 12, 16, 0,
-
21, 21, 0, 22, 0, 0, 2, 0,
-
12, 12, 16, 8, 8, 8, 8, 0,
-
0, 10, 0, 0, 0, 0, 0, 8,
-
8, 8, 9, 8, 0, 0, 10, 0,
-
0, 21, 21, 22, 37, 0, 0, 2,
-
39, 0, 12, 12, 16, 41, 0, 0,
-
10, 0, 0, 0, 2, 50, 0, 12,
-
12, 16, 52, 12, 12, 53, 53, 16,
-
12, 53, 12, 0, 2, 0, 12, 16,
-
43, 43, 43, 43, 48, 43, 43, 0,
-
0, 0, 0, 2, 0, 0, 0, 0,
-
0, 2, 54, 0, 54, 0, 0, 12,
-
12, 16, 55, 12, 55, 0, 0, 2,
-
0, 0, 12, 12, 16, 12, 56, 56,
-
56, 56, 57, 56, 0, 0, 2, 0,
-
12, 12, 16, 0, 0, 0, 2, 0,
-
12, 12, 16, 0, 0, 0, 0, 0,
-
0, 0, 0, 2, 0, 12, 12, 16,
-
0, 12, 12, 12, 12, 16, 12, 12,
-
0, 0, 0, 42, 42, 43, 43, 44,
-
43, 43, 0, 0, 0, 0, 2, 0,
-
0, 0, 4, 4, 5, 45, 0, 0,
-
0, 0, 11, 11, 13, 46, 12, 4,
-
4, 0, 5, 0, 0, 2, 0, 12,
-
12, 12, 16, 8, 8, 8, 8, 0,
-
0, 10, 0, 0, 4, 4, 0, 5,
-
0, 0, 0, 11, 11, 13, 0, 0,
-
0, 12, 12, 12, 12, 16, 12, 12,
-
0, 0, 0, 0, 2, 0, 12, 12,
-
16, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 8, 8, 9, 8, 0, 0,
-
10, 0, 0, 12, 12, 12, 12, 16,
-
30, 30, 31, 0, 4, 4, 5, 0,
-
0, 11, 11, 13, 47, 25, 8, 8,
-
8, 8, 0, 0, 10, 0, 0, 0,
-
0, 0, 30, 30, 31, 0, 0, 2,
-
24, 0, 12, 12, 16, 25, 43, 43,
-
43, 43, 48, 43, 0, 0, 0, 2,
-
0, 0, 0, 2, 0, 0, 0, 12,
-
12, 16, 12, 0, 0, 2, 0, 12,
-
12, 16, 12, 12, 12, 12, 16, 30,
-
30, 0, 31, 0, 0, 2, 0, 12,
-
12, 16, 8, 8, 8, 8, 0, 0,
-
10, 0, 0, 11, 11, 13, 0, 0,
-
0, 0, 0, 10, 0, 4, 4, 5,
-
49, 50, 0, 0, 11, 11, 13, 51,
-
52, 12, 12, 53, 53, 16, 12, 53,
-
12, 26, 26, 26, 26, 27, 26, 28,
-
29, 0, 0, 1, 1, 2, 1, 3,
-
0, 30, 30, 0, 0, 31, 32, 0,
-
32, 7, 23, 4, 4, 0, 0, 5,
-
33, 0, 33, 24, 0, 0, 4, 4,
-
5, 0, 0, 8, 8, 9, 8, 0,
-
0, 10, 0, 0, 11, 11, 12, 12,
-
13, 12, 15, 4, 4, 5, 0, 0,
-
2, 0, 12, 12, 16, 17, 18, 18,
-
1, 1, 19, 20, 1, 20, 0, 0,
-
2, 0, 0, 0, 21, 21, 0, 0,
-
22, 0, 21, 23, 0, 0, 2, 0,
-
0, 24, 0, 12, 12, 16, 12, 12,
-
25, 0, 0, 0, 2, 0, 0, 0,
-
2, 0, 0, 12, 12, 16, 12, 0,
-
2, 34, 34, 0, 12, 16, 35, 35,
-
0, 43, 43, 43, 43, 48, 43, 43,
-
0, 0, 0, 0, 2, 0, 0, 0,
-
0, 0, 2, 0, 54, 0, 0, 12,
-
12, 16, 12, 55, 0, 0, 2, 0,
-
12, 12, 16, 0, 0, 0, 0, 0,
-
0, 0, 0, 2, 0, 12, 12, 16,
-
0, 12, 12, 12, 12, 16, 12, 12,
-
0, 0, 0, 8, 8, 9, 8, 0,
-
0, 10, 0, 0, 12, 12, 12, 16,
-
0, 0, 0, 0, 0, 0, 21, 21,
-
22, 0, 0, 2, 0, 12, 12, 16,
-
0, 21, 21, 0, 22, 0, 0, 2,
-
0, 12, 12, 16, 8, 8, 8, 8,
-
0, 0, 10, 0, 0, 0, 0, 0,
-
8, 8, 8, 9, 8, 0, 0, 10,
-
0, 0, 21, 21, 22, 37, 0, 0,
-
2, 39, 0, 12, 12, 16, 41, 0,
-
0, 10, 0, 0, 0, 2, 50, 0,
-
12, 12, 16, 52, 12, 12, 53, 53,
-
16, 12, 53, 12, 0, 2, 0, 12,
-
16, 43, 43, 43, 43, 48, 43, 43,
-
0, 0, 0, 0, 2, 0, 0, 0,
-
0, 0, 2, 54, 0, 54, 0, 0,
-
12, 12, 16, 55, 12, 55, 0, 0,
-
2, 0, 0, 12, 12, 16, 12, 56,
-
56, 56, 56, 57, 56, 0, 0, 2,
-
0, 12, 12, 16, 0, 0, 0, 2,
-
0, 12, 12, 16, 0, 0, 0, 0,
-
0, 0, 0, 0, 2, 0, 12, 12,
-
16, 0, 12, 12, 12, 12, 16, 12,
-
12, 0, 0, 0, 11, 11, 13, 47,
-
12, 47, 25, 4, 4, 0, 0, 5,
-
0, 0, 2, 0, 4, 4, 5, 0,
-
0, 0, 11, 11, 13, 12, 42, 42,
-
43, 43, 44, 43, 43, 0, 0, 0,
-
0, 2, 0, 0, 0, 4, 4, 5,
-
45, 0, 45, 0, 0, 0, 11, 11,
-
13, 46, 12, 46, 4, 4, 0, 5,
-
0, 0, 2, 0, 12, 12, 12, 16,
-
8, 8, 8, 8, 0, 0, 10, 0,
-
0, 4, 4, 0, 5, 0, 0, 0,
-
11, 11, 13, 0, 0, 0, 12, 12,
-
12, 12, 16, 12, 12, 0, 0, 0,
-
0, 2, 0, 12, 12, 16, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 8,
-
8, 9, 8, 0, 0, 10, 0, 0,
-
12, 12, 12, 12, 16, 8, 8, 8,
-
8, 0, 0, 10, 0, 0, 30, 30,
-
0, 31, 0, 4, 4, 5, 0, 0,
-
11, 11, 13, 30, 30, 31, 0, 0,
-
2, 24, 0, 12, 12, 16, 25, 43,
-
43, 43, 43, 48, 43, 0, 0, 0,
-
2, 0, 0, 0, 2, 0, 0, 0,
-
12, 12, 16, 12, 0, 0, 2, 0,
-
12, 12, 16, 12, 12, 12, 12, 16,
-
0, 0, 0, 30, 30, 0, 31, 0,
-
0, 2, 0, 12, 12, 16, 8, 8,
-
8, 8, 0, 0, 10, 0, 0, 0,
-
0, 0, 8, 8, 8, 9, 8, 0,
-
0, 10, 0, 0, 30, 30, 31, 36,
-
36, 37, 4, 4, 5, 38, 38, 39,
-
0, 0, 11, 11, 13, 40, 40, 41,
-
0, 0, 10, 0, 4, 4, 5, 49,
-
49, 50, 0, 0, 11, 11, 13, 51,
-
51, 52, 12, 12, 53, 53, 16, 53,
-
0, 0, 0, 21, 21, 22, 23, 0,
-
0, 2, 0, 12, 12, 16, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
21, 21, 22, 23, 0, 0, 2, 0,
-
12, 12, 16, 0, 0, 0, 0, 0,
-
0, 0, 43, 43, 43, 43, 48, 43,
-
43, 0, 0, 0, 0, 2, 0, 0,
-
0, 0, 0, 2, 0, 54, 0, 0,
-
12, 12, 16, 12, 55, 0, 0, 2,
-
0, 12, 12, 16, 0, 0, 0, 0,
-
0, 0, 0, 0, 2, 0, 12, 12,
-
16, 0, 12, 12, 12, 12, 16, 12,
-
12, 0, 0, 0, 8, 8, 9, 8,
-
0, 0, 10, 0, 0, 12, 12, 12,
-
16, 0, 0, 0, 0, 0, 0, 21,
-
21, 22, 0, 0, 2, 0, 12, 12,
-
16, 0, 21, 21, 0, 22, 0, 0,
-
2, 0, 12, 12, 16, 8, 8, 8,
-
8, 0, 0, 10, 0, 0, 0, 0,
-
0, 8, 8, 8, 9, 8, 0, 0,
-
10, 0, 0, 21, 21, 22, 37, 0,
-
0, 2, 39, 0, 12, 12, 16, 41,
-
0, 0, 10, 0, 0, 0, 2, 50,
-
0, 12, 12, 16, 52, 12, 12, 53,
-
53, 16, 12, 53, 12, 0, 2, 0,
-
12, 16, 43, 43, 43, 43, 48, 43,
-
43, 0, 0, 0, 0, 2, 0, 0,
-
0, 0, 0, 2, 54, 0, 54, 0,
-
0, 12, 12, 16, 55, 12, 55, 0,
-
0, 2, 0, 0, 12, 12, 16, 12,
-
56, 56, 56, 56, 57, 56, 0, 0,
-
2, 0, 12, 12, 16, 0, 0, 0,
-
2, 0, 12, 12, 16, 0, 0, 0,
-
0, 0, 0, 0, 0, 2, 0, 12,
-
12, 16, 0, 12, 12, 12, 12, 16,
-
12, 12, 0, 0, 0, 12, 12, 16,
-
12, 26, 26, 58, 0, 0, 2, 0,
-
12, 12, 16, 42, 42, 43, 43, 44,
-
43, 43, 0, 0, 0, 0, 2, 0,
-
0, 0, 0, 0, 4, 4, 0, 5,
-
0, 0, 2, 0, 12, 12, 12, 16,
-
8, 8, 8, 8, 0, 0, 10, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
12, 12, 12, 12, 16, 12, 12, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 8, 8, 9, 8,
-
0, 0, 10, 0, 0, 12, 12, 12,
-
12, 16, 8, 8, 8, 8, 0, 0,
-
10, 0, 0, 0, 0, 0, 0, 43,
-
43, 43, 43, 48, 43, 0, 0, 0,
-
2, 0, 0, 0, 0, 0, 0, 2,
-
0, 12, 12, 12, 16, 12, 12, 12,
-
12, 16, 0, 0, 0, 0, 0, 8,
-
8, 8, 8, 0, 0, 10, 0, 0,
-
0, 0, 0, 8, 8, 8, 9, 8,
-
0, 0, 10, 0, 0, 0, 0, 0,
-
0, 10, 0, 0, 0, 12, 12, 53,
-
53, 16, 53, 0, 0, 1, 1, 2,
-
1, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
43, 43, 43, 43, 48, 43, 43, 0,
-
0, 0, 0, 2, 0, 0, 0, 0,
-
0, 2, 0, 54, 0, 0, 12, 12,
-
16, 12, 55, 0, 0, 2, 0, 12,
-
12, 16, 0, 0, 0, 0, 0, 0,
-
0, 0, 2, 0, 12, 12, 16, 0,
-
12, 12, 12, 12, 16, 12, 12, 0,
-
0, 0, 8, 8, 9, 8, 0, 0,
-
10, 0, 0, 12, 12, 12, 16, 0,
-
0, 0, 0, 0, 0, 21, 21, 22,
-
0, 0, 2, 0, 12, 12, 16, 0,
-
21, 21, 0, 22, 0, 0, 2, 0,
-
12, 12, 16, 8, 8, 8, 8, 0,
-
0, 10, 0, 0, 0, 0, 0, 8,
-
8, 8, 9, 8, 0, 0, 10, 0,
-
0, 21, 21, 22, 37, 0, 0, 2,
-
39, 0, 12, 12, 16, 41, 0, 0,
-
10, 0, 0, 0, 2, 50, 0, 12,
-
12, 16, 52, 12, 12, 53, 53, 16,
-
12, 53, 12, 0, 2, 0, 12, 16,
-
43, 43, 43, 43, 48, 43, 43, 0,
-
0, 0, 0, 2, 0, 0, 0, 0,
-
0, 2, 54, 0, 54, 0, 0, 12,
-
12, 16, 55, 12, 55, 0, 0, 2,
-
0, 0, 12, 12, 16, 12, 56, 56,
-
56, 56, 57, 56, 0, 0, 2, 0,
-
12, 12, 16, 0, 0, 0, 2, 0,
-
12, 12, 16, 0, 0, 0, 0, 0,
-
0, 0, 0, 2, 0, 12, 12, 16,
-
0, 12, 12, 12, 12, 16, 12, 12,
-
0, 0, 0, 4, 4, 0, 0, 5,
-
0, 0, 2, 0, 0, 0, 42, 42,
-
44, 0, 0, 2, 0, 0, 12, 12,
-
16, 12, 0, 0, 0, 0, 0, 0,
-
0, 0, 8, 8, 9, 8, 0, 0,
-
10, 0, 0, 12, 12, 12, 12, 16,
-
8, 8, 8, 8, 0, 0, 10, 0,
-
0, 0, 0, 0, 0, 43, 43, 43,
-
43, 48, 43, 0, 0, 0, 2, 0,
-
12, 12, 12, 12, 16, 0, 0, 0,
-
0, 0, 8, 8, 8, 8, 0, 0,
-
10, 0, 0, 0, 0, 0, 8, 8,
-
8, 9, 8, 0, 0, 10, 0, 0,
-
0, 0, 0, 0, 10, 0, 0, 0,
-
12, 12, 53, 53, 16, 53, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 59,
-
59, 60, 61, 59, 0, 0, 2, 62,
-
0, 0, 63, 63, 63, 63, 64, 63,
-
28, 65, 30, 30, 0, 31, 32, 0,
-
23, 4, 4, 5, 33, 0, 24, 34,
-
34, 2, 34, 35, 35, 16, 35, 63,
-
63, 63, 63, 64, 63, 30, 30, 0,
-
31, 0, 23, 4, 4, 5, 0, 24,
-
11, 11, 13, 47, 12, 25, 4, 4,
-
5, 0, 11, 11, 13, 12, 26, 26,
-
27, 0, 2, 12, 12, 16, 12, 0,
-
2, 12, 16, 4, 4, 5, 45, 0,
-
0, 11, 11, 13, 46, 12, 4, 4,
-
5, 11, 11, 13, 45, 45, 2, 46,
-
46, 16, 30, 30, 31, 0, 4, 4,
-
5, 11, 11, 13, 30, 30, 31, 33,
-
33, 2, 24, 47, 47, 16, 25, 45,
-
45, 2, 0, 46, 46, 16, 30, 30,
-
0, 31, 33, 33, 2, 47, 47, 16,
-
30, 30, 31, 36, 37, 4, 4, 5,
-
38, 39, 11, 11, 13, 40, 41, 4,
-
4, 5, 49, 50, 11, 11, 13, 51,
-
52, 32, 32, 22, 23, 33, 33, 2,
-
47, 47, 16, 11, 11, 13, 12, 25,
-
4, 4, 5, 0, 11, 11, 13, 12,
-
0, 30, 30, 31, 0, 4, 4, 5,
-
11, 11, 13, 30, 30, 31, 33, 33,
-
2, 24, 47, 47, 16, 25, 0, 0,
-
30, 30, 0, 31, 33, 33, 2, 47,
-
47, 16, 30, 30, 31, 37, 4, 4,
-
5, 39, 11, 11, 13, 41, 4, 4,
-
5, 50, 11, 11, 13, 52, 32, 32,
-
22, 23, 33, 33, 2, 47, 47, 16
-
]
-
-
1
class << self
-
1
attr_accessor :_address_lists_eof_actions
-
1
private :_address_lists_eof_actions, :_address_lists_eof_actions=
-
end
-
1
self._address_lists_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 32,
-
33, 34, 35, 0, 32, 33, 47, 34,
-
34, 35, 0, 0, 12, 0, 12, 45,
-
45, 46, 45, 45, 45, 46, 45, 45,
-
46, 32, 33, 47, 32, 33, 47, 45,
-
45, 46, 45, 32, 33, 47, 32, 36,
-
38, 40, 49, 51, 32, 33, 47, 47,
-
34, 34, 35, 45, 32, 33, 47, 32,
-
33, 47, 45, 32, 33, 47, 32, 36,
-
38, 40, 49, 51, 32, 33, 47, 0
-
]
-
-
1
class << self
-
1
attr_accessor :address_lists_start
-
end
-
1
self.address_lists_start = 1334;
-
1
class << self
-
1
attr_accessor :address_lists_first_final
-
end
-
1
self.address_lists_first_final = 1334;
-
1
class << self
-
1
attr_accessor :address_lists_error
-
end
-
1
self.address_lists_error = 0;
-
-
1
class << self
-
1
attr_accessor :address_lists_en_comment_tail
-
end
-
1
self.address_lists_en_comment_tail = 1329;
-
1
class << self
-
1
attr_accessor :address_lists_en_main
-
end
-
1
self.address_lists_en_main = 1334;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl"
-
-
1
def self.parse(data)
-
6
p = 0
-
6
eof = data.length
-
6
stack = []
-
-
6
actions = []
-
6
data_unpacked = data.bytes.to_a
-
-
# line 14059 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb"
-
begin
-
6
p ||= 0
-
6
pe ||= data.length
-
6
cs = address_lists_start
-
6
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl"
-
-
# line 14069 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb"
-
begin
-
6
testEof = false
-
6
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
6
_goto_level = 0
-
6
_resume = 10
-
6
_eof_trans = 15
-
6
_again = 20
-
6
_test_eof = 30
-
6
_out = 40
-
6
while true
-
100
if _goto_level <= 0
-
6
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
6
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
100
if _goto_level <= _resume
-
100
_keys = cs << 1
-
100
_inds = _address_lists_index_offsets[cs]
-
100
_slen = _address_lists_key_spans[cs]
-
100
_trans = if ( _slen > 0 &&
-
100
_address_lists_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
100
( data_unpacked[p]) <= _address_lists_trans_keys[_keys + 1]
-
) then
-
100
_address_lists_indicies[ _inds + ( data_unpacked[p]) - _address_lists_trans_keys[_keys] ]
-
else
-
_address_lists_indicies[ _inds + _slen ]
-
end
-
100
cs = _address_lists_trans_targs[_trans]
-
100
if _address_lists_trans_actions[_trans] != 0
-
16
case _address_lists_trans_actions[_trans]
-
when 34 then
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 3 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 12 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 59 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 54 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 43 then
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
5
actions.push(13, p) end
-
when 24 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 21 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
when 1 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 50 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 20 then
-
# line 34 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(31, p) end
-
when 4 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 10 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 8 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 2 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
when 62 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 28 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 29 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
when 35 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 17 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 55 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 25 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 53 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 52 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 11 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 16 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
when 60 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
when 61 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 45 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 48 then
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
when 33 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 39 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 23 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
5
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
5
actions.push(18, p) end
-
when 22 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
when 18 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 34 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(31, p) end
-
when 49 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 56 then
-
# line 33 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(30, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 7 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 42 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 6 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 19 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(16, p) end
-
when 30 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
when 9 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 5 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 26 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 46 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 47 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 41 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 51 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 15 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 14 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 19 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(16, p) end
-
when 13 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 65 then
-
# line 20 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(17, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
when 38 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 32 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 37 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 19 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 34 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(31, p) end
-
when 57 then
-
# line 33 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(30, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
when 44 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 31 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
when 27 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 40 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 63 then
-
# line 20 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
6
actions.push(17, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
6
actions.push(37, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
6
actions.push(2, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
6
actions.push(20, p) end
-
when 36 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 58 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 64 then
-
# line 20 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(17, p) end
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 1329
-
_goto_level = _again
-
next
-
end
-
end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 14709 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb"
-
end
-
end
-
end
-
100
if _goto_level <= _again
-
100
if cs == 0
-
_goto_level = _out
-
next
-
end
-
100
p += 1
-
100
if p != pe
-
94
_goto_level = _resume
-
94
next
-
end
-
end
-
6
if _goto_level <= _test_eof
-
6
if p == eof
-
6
case _address_lists_eof_actions[cs]
-
when 34 then
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 12 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 35 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 45 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
5
actions.push(12, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
5
actions.push(1, p) end
-
when 33 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 49 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 46 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 47 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 51 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 38 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 32 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(18, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(1, p) end
-
when 40 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 36 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
# line 14839 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb"
-
end
-
end
-
-
end
-
6
if _goto_level <= _out
-
6
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 14853 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb"
-
6
1334
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl"
-
-
6
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module ContentDispositionMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb"
-
1
class << self
-
1
attr_accessor :_content_disposition_trans_keys
-
1
private :_content_disposition_trans_keys, :_content_disposition_trans_keys=
-
end
-
1
self._content_disposition_trans_keys = [
-
0, 0, 9, 59, 10, 10,
-
9, 32, 9, 59, 9,
-
126, 10, 10, 9, 32,
-
33, 126, 9, 126, 9, 40,
-
10, 10, 9, 32, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 10, 10, 9, 32,
-
0, 127, 9, 40, 10,
-
10, 9, 32, 9, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 0, 127, 9,
-
126, 9, 59, 9, 59,
-
9, 126, 9, 59, 9, 59,
-
9, 126, 0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_disposition_key_spans
-
1
private :_content_disposition_key_spans, :_content_disposition_key_spans=
-
end
-
1
self._content_disposition_key_spans = [
-
0, 51, 1, 24, 51, 118, 1, 24,
-
94, 118, 32, 1, 24, 127, 127, 1,
-
24, 1, 24, 128, 32, 1, 24, 118,
-
127, 127, 1, 24, 128, 118, 51, 51,
-
118, 51, 51, 118, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_disposition_index_offsets
-
1
private :_content_disposition_index_offsets, :_content_disposition_index_offsets=
-
end
-
1
self._content_disposition_index_offsets = [
-
0, 0, 52, 54, 79, 131, 250, 252,
-
277, 372, 491, 524, 526, 551, 679, 807,
-
809, 834, 836, 861, 990, 1023, 1025, 1050,
-
1169, 1297, 1425, 1427, 1452, 1581, 1700, 1752,
-
1804, 1923, 1975, 2027, 2146
-
]
-
-
1
class << self
-
1
attr_accessor :_content_disposition_indicies
-
1
private :_content_disposition_indicies, :_content_disposition_indicies=
-
end
-
1
self._content_disposition_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
1, 1, 1, 1, 1, 1, 1, 3,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 4, 1, 5, 1, 0, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 0, 1, 6,
-
1, 1, 1, 7, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 6, 1,
-
1, 1, 1, 1, 1, 1, 8, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 9, 1, 4, 1, 1, 1, 10,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 4, 11, 11, 11, 11, 11,
-
11, 11, 12, 1, 11, 11, 11, 11,
-
11, 1, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 1, 1, 1, 1,
-
1, 1, 1, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 1, 1, 1,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 1, 13, 1, 4, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 4, 1, 14, 14, 14,
-
14, 14, 14, 14, 1, 1, 14, 14,
-
14, 14, 14, 1, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 1,
-
1, 15, 1, 1, 1, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 1,
-
1, 1, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 1, 16, 1, 1, 1,
-
17, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 16, 18, 19, 18, 18,
-
18, 18, 18, 20, 1, 18, 18, 18,
-
18, 18, 1, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 1, 1, 1,
-
18, 1, 1, 1, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 1, 1,
-
1, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 1, 21, 1, 1, 1, 22,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 21, 1, 23, 1, 1, 1,
-
1, 1, 24, 1, 25, 1, 21, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 21, 1, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
1, 26, 26, 27, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
28, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 29, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 1, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
1, 30, 30, 31, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
32, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 33, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 1, 34,
-
1, 30, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
30, 1, 35, 1, 36, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 36, 1, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 30, 30, 30,
-
30, 30, 30, 30, 30, 1, 37, 1,
-
1, 1, 38, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 37, 1, 39,
-
1, 1, 1, 1, 1, 40, 1, 41,
-
1, 42, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
42, 1, 9, 1, 1, 1, 43, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 9, 44, 44, 44, 44, 44, 44,
-
44, 45, 1, 44, 44, 44, 44, 44,
-
1, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 1, 1, 1, 1, 1,
-
1, 1, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 1, 1, 1, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
1, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 1, 46, 46, 47, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
48, 49, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 50, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
46, 46, 46, 46, 46, 46, 46, 46,
-
1, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 1, 51, 51, 52, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
53, 54, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 55, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
1, 56, 1, 51, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 51, 1, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 51, 51, 51, 51,
-
51, 51, 51, 51, 1, 57, 1, 1,
-
1, 58, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 57, 59, 59, 59,
-
59, 59, 59, 59, 60, 1, 59, 59,
-
59, 59, 59, 1, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 1, 61,
-
1, 1, 1, 1, 1, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 1,
-
1, 1, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 1, 62, 1, 1, 1,
-
63, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 62, 1, 1, 1, 1,
-
1, 1, 1, 64, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 65, 1,
-
66, 1, 1, 1, 67, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 66,
-
1, 1, 1, 1, 1, 1, 1, 68,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 69, 1, 70, 1, 1, 1,
-
71, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 70, 72, 1, 72, 72,
-
72, 72, 72, 73, 1, 72, 72, 72,
-
72, 72, 1, 72, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 1, 65, 1,
-
72, 1, 1, 1, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 72, 1, 1,
-
1, 72, 72, 72, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 72, 72, 72,
-
72, 72, 72, 72, 72, 72, 72, 72,
-
72, 72, 1, 42, 1, 1, 1, 74,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 42, 1, 1, 1, 1, 1,
-
1, 1, 75, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 4, 1, 76,
-
1, 1, 1, 77, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 76, 1,
-
1, 1, 1, 1, 1, 1, 78, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 9, 1, 79, 1, 1, 1, 80,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 79, 81, 81, 81, 81, 81,
-
81, 81, 82, 1, 81, 81, 81, 81,
-
81, 1, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 1, 83, 1, 1,
-
1, 1, 1, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 1, 1, 1,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_disposition_trans_targs
-
1
private :_content_disposition_trans_targs, :_content_disposition_trans_targs=
-
end
-
1
self._content_disposition_trans_targs = [
-
1, 0, 2, 4, 5, 3, 1, 2,
-
4, 5, 6, 8, 23, 7, 8, 9,
-
10, 11, 32, 13, 20, 10, 11, 13,
-
20, 12, 14, 15, 30, 19, 14, 15,
-
30, 19, 16, 18, 30, 10, 11, 13,
-
20, 22, 33, 6, 8, 23, 25, 26,
-
25, 36, 28, 25, 26, 25, 36, 28,
-
27, 1, 2, 35, 4, 5, 30, 17,
-
31, 5, 30, 17, 31, 5, 33, 21,
-
32, 34, 21, 34, 33, 21, 34, 1,
-
2, 35, 4, 5
-
]
-
-
1
class << self
-
1
attr_accessor :_content_disposition_trans_actions
-
1
private :_content_disposition_trans_actions, :_content_disposition_trans_actions=
-
end
-
1
self._content_disposition_trans_actions = [
-
0, 0, 0, 1, 0, 0, 2, 2,
-
3, 2, 0, 4, 1, 0, 0, 5,
-
6, 6, 6, 6, 7, 0, 0, 0,
-
1, 0, 8, 8, 9, 8, 0, 0,
-
10, 0, 0, 0, 0, 2, 2, 2,
-
3, 0, 0, 2, 11, 3, 12, 12,
-
13, 14, 12, 0, 0, 1, 15, 0,
-
0, 16, 16, 17, 18, 16, 19, 19,
-
20, 19, 21, 21, 22, 21, 19, 19,
-
0, 23, 0, 1, 2, 2, 3, 24,
-
24, 0, 25, 24
-
]
-
-
1
class << self
-
1
attr_accessor :_content_disposition_eof_actions
-
1
private :_content_disposition_eof_actions, :_content_disposition_eof_actions=
-
end
-
1
self._content_disposition_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 16, 19, 21,
-
19, 0, 2, 24, 0
-
]
-
-
1
class << self
-
1
attr_accessor :content_disposition_start
-
end
-
1
self.content_disposition_start = 29;
-
1
class << self
-
1
attr_accessor :content_disposition_first_final
-
end
-
1
self.content_disposition_first_final = 29;
-
1
class << self
-
1
attr_accessor :content_disposition_error
-
end
-
1
self.content_disposition_error = 0;
-
-
1
class << self
-
1
attr_accessor :content_disposition_en_comment_tail
-
end
-
1
self.content_disposition_en_comment_tail = 24;
-
1
class << self
-
1
attr_accessor :content_disposition_en_main
-
end
-
1
self.content_disposition_en_main = 29;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl"
-
-
1
def self.parse(data)
-
p = 0
-
eof = data.length
-
stack = []
-
-
actions = []
-
data_unpacked = data.bytes.to_a
-
-
# line 416 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb"
-
begin
-
p ||= 0
-
pe ||= data.length
-
cs = content_disposition_start
-
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl"
-
-
# line 426 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb"
-
begin
-
testEof = false
-
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
_goto_level = 0
-
_resume = 10
-
_eof_trans = 15
-
_again = 20
-
_test_eof = 30
-
_out = 40
-
while true
-
if _goto_level <= 0
-
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
if _goto_level <= _resume
-
_keys = cs << 1
-
_inds = _content_disposition_index_offsets[cs]
-
_slen = _content_disposition_key_spans[cs]
-
_trans = if ( _slen > 0 &&
-
_content_disposition_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
( data_unpacked[p]) <= _content_disposition_trans_keys[_keys + 1]
-
) then
-
_content_disposition_indicies[ _inds + ( data_unpacked[p]) - _content_disposition_trans_keys[_keys] ]
-
else
-
_content_disposition_indicies[ _inds + _slen ]
-
end
-
cs = _content_disposition_trans_targs[_trans]
-
if _content_disposition_trans_actions[_trans] != 0
-
case _content_disposition_trans_actions[_trans]
-
when 2 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 12 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 24 then
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(10, p) end
-
when 17 then
-
# line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(11, p) end
-
when 5 then
-
# line 35 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(32, p) end
-
when 4 then
-
# line 36 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(33, p) end
-
when 19 then
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 6 then
-
# line 38 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(35, p) end
-
when 10 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 8 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 1 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
when 15 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 11 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 36 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(33, p) end
-
when 21 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
when 13 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
when 14 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 25 then
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(10, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
when 16 then
-
# line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(11, p) end
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(10, p) end
-
when 23 then
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
when 7 then
-
# line 38 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(35, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
when 9 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 20 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 22 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 18 then
-
# line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(11, p) end
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(10, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 24
-
_goto_level = _again
-
next
-
end
-
end
-
# line 682 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb"
-
end
-
end
-
end
-
if _goto_level <= _again
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
p += 1
-
if p != pe
-
_goto_level = _resume
-
next
-
end
-
end
-
if _goto_level <= _test_eof
-
if p == eof
-
case _content_disposition_eof_actions[cs]
-
when 2 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 24 then
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(10, p) end
-
when 19 then
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 21 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 16 then
-
# line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(11, p) end
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(10, p) end
-
# line 726 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb"
-
end
-
end
-
-
end
-
if _goto_level <= _out
-
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 740 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb"
-
29
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl"
-
-
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module ContentLocationMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
-
1
class << self
-
1
attr_accessor :_content_location_trans_keys
-
1
private :_content_location_trans_keys, :_content_location_trans_keys=
-
end
-
1
self._content_location_trans_keys = [
-
0, 0, 9, 126, 10, 10,
-
9, 32, 10, 10, 9,
-
32, 1, 127, 10, 10,
-
9, 32, -128, -1, 10, 10,
-
9, 32, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 0, 127, 9, 126,
-
9, 40, 9, 40, 1,
-
127, 1, 127, 1, 127,
-
1, 127, 9, 126, 0, 0,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_location_key_spans
-
1
private :_content_location_key_spans, :_content_location_key_spans=
-
end
-
1
self._content_location_key_spans = [
-
0, 118, 1, 24, 1, 24, 127, 1,
-
24, 128, 1, 24, 118, 127, 127, 1,
-
24, 128, 118, 32, 32, 127, 127, 127,
-
127, 118, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_location_index_offsets
-
1
private :_content_location_index_offsets, :_content_location_index_offsets=
-
end
-
1
self._content_location_index_offsets = [
-
0, 0, 119, 121, 146, 148, 173, 301,
-
303, 328, 457, 459, 484, 603, 731, 859,
-
861, 886, 1015, 1134, 1167, 1200, 1328, 1456,
-
1584, 1712, 1831
-
]
-
-
1
class << self
-
1
attr_accessor :_content_location_indicies
-
1
private :_content_location_indicies, :_content_location_indicies=
-
end
-
1
self._content_location_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
3, 4, 3, 3, 3, 3, 3, 5,
-
1, 3, 3, 3, 3, 3, 1, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 1, 1, 3, 1, 1, 1,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 6,
-
1, 0, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
0, 1, 7, 1, 8, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 8, 1, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 1, 9,
-
9, 10, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 11, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
12, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 1, 13, 1, 9,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 9, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
9, 14, 1, 15, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 15, 1, 16, 1, 1, 1,
-
17, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 16, 18, 19, 18, 18,
-
18, 18, 18, 20, 1, 18, 18, 18,
-
18, 18, 1, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 1, 1, 1,
-
18, 1, 1, 1, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 1, 1,
-
1, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 1, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 1, 21, 21, 22,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 23, 24, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 25, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 21, 21, 21, 21, 21, 21,
-
21, 21, 1, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 1, 26, 26, 27,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 28, 29, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 30, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 1, 31, 1, 26, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 26, 1, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 26, 26,
-
26, 26, 26, 26, 26, 26, 1, 32,
-
1, 1, 1, 33, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 32, 34,
-
34, 34, 34, 34, 34, 34, 35, 1,
-
34, 34, 34, 34, 34, 1, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
1, 1, 1, 34, 1, 1, 1, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 1, 1, 1, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 1, 8, 1,
-
1, 1, 36, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 8, 1, 1,
-
1, 1, 1, 1, 1, 37, 1, 38,
-
1, 1, 1, 39, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 38, 1,
-
1, 1, 1, 1, 1, 1, 40, 1,
-
41, 41, 41, 41, 41, 41, 41, 41,
-
42, 1, 41, 41, 43, 41, 41, 41,
-
41, 41, 41, 41, 41, 41, 41, 41,
-
41, 41, 41, 41, 41, 41, 41, 42,
-
44, 45, 44, 44, 44, 44, 44, 46,
-
41, 44, 44, 44, 44, 44, 41, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 41, 41, 41, 44, 41, 41, 41,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 41, 47, 41, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 44, 44,
-
44, 44, 44, 44, 44, 44, 41, 1,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
15, 1, 9, 9, 48, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 15,
-
9, 11, 9, 9, 9, 9, 9, 49,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 12, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 1,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
50, 1, 9, 9, 51, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 50,
-
9, 11, 9, 9, 9, 9, 9, 52,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 12, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 1,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
53, 1, 9, 9, 54, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 53,
-
55, 56, 55, 55, 55, 55, 55, 57,
-
9, 55, 55, 55, 55, 55, 9, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 9, 9, 9, 55, 9, 9, 9,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 9, 12, 9, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 9, 1,
-
32, 1, 1, 1, 33, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 32,
-
34, 34, 34, 34, 34, 34, 34, 58,
-
1, 34, 34, 34, 34, 34, 1, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 1, 1, 1, 34, 1, 1, 1,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 1, 1, 1, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 34, 34,
-
34, 34, 34, 34, 34, 34, 1, 1,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_location_trans_targs
-
1
private :_content_location_trans_targs, :_content_location_trans_targs=
-
end
-
1
self._content_location_trans_targs = [
-
1, 0, 2, 18, 21, 12, 3, 5,
-
19, 6, 7, 19, 9, 8, 11, 22,
-
1, 2, 18, 21, 12, 14, 15, 14,
-
26, 17, 14, 15, 14, 26, 17, 16,
-
19, 4, 18, 20, 4, 20, 19, 4,
-
20, 6, 22, 10, 24, 25, 23, 9,
-
10, 23, 22, 10, 23, 22, 10, 24,
-
25, 23, 20
-
]
-
-
1
class << self
-
1
attr_accessor :_content_location_trans_actions
-
1
private :_content_location_trans_actions, :_content_location_trans_actions=
-
end
-
1
self._content_location_trans_actions = [
-
0, 0, 0, 1, 1, 2, 0, 0,
-
0, 0, 0, 3, 0, 0, 0, 0,
-
4, 4, 5, 5, 6, 7, 7, 8,
-
9, 7, 0, 0, 2, 10, 0, 0,
-
11, 11, 0, 12, 0, 2, 4, 4,
-
6, 13, 14, 14, 13, 15, 16, 13,
-
0, 2, 4, 4, 6, 11, 11, 0,
-
3, 12, 17
-
]
-
-
1
class << self
-
1
attr_accessor :_content_location_eof_actions
-
1
private :_content_location_eof_actions, :_content_location_eof_actions=
-
end
-
1
self._content_location_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 11, 0, 4, 11, 0, 4,
-
11, 11, 0
-
]
-
-
1
class << self
-
1
attr_accessor :content_location_start
-
end
-
1
self.content_location_start = 1;
-
1
class << self
-
1
attr_accessor :content_location_first_final
-
end
-
1
self.content_location_first_final = 18;
-
1
class << self
-
1
attr_accessor :content_location_error
-
end
-
1
self.content_location_error = 0;
-
-
1
class << self
-
1
attr_accessor :content_location_en_comment_tail
-
end
-
1
self.content_location_en_comment_tail = 13;
-
1
class << self
-
1
attr_accessor :content_location_en_main
-
end
-
1
self.content_location_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
-
-
1
def self.parse(data)
-
p = 0
-
eof = data.length
-
stack = []
-
-
actions = []
-
data_unpacked = data.bytes.to_a
-
-
# line 365 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
-
begin
-
p ||= 0
-
pe ||= data.length
-
cs = content_location_start
-
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
-
-
# line 375 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
-
begin
-
testEof = false
-
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
_goto_level = 0
-
_resume = 10
-
_eof_trans = 15
-
_again = 20
-
_test_eof = 30
-
_out = 40
-
while true
-
if _goto_level <= 0
-
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
if _goto_level <= _resume
-
_keys = cs << 1
-
_inds = _content_location_index_offsets[cs]
-
_slen = _content_location_key_spans[cs]
-
_trans = if ( _slen > 0 &&
-
_content_location_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
( data_unpacked[p]) <= _content_location_trans_keys[_keys + 1]
-
) then
-
_content_location_indicies[ _inds + ( data_unpacked[p]) - _content_location_trans_keys[_keys] ]
-
else
-
_content_location_indicies[ _inds + _slen ]
-
end
-
cs = _content_location_trans_targs[_trans]
-
if _content_location_trans_actions[_trans] != 0
-
case _content_location_trans_actions[_trans]
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 7 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 3 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 13 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 11 then
-
# line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(46, p) end
-
when 1 then
-
# line 50 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(47, p) end
-
when 2 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 13
-
_goto_level = _again
-
next
-
end
-
end
-
when 10 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 5 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 50 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(47, p) end
-
when 6 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 13
-
_goto_level = _again
-
next
-
end
-
end
-
when 8 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 13
-
_goto_level = _again
-
next
-
end
-
end
-
when 9 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 15 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 14 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(46, p) end
-
when 12 then
-
# line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(46, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 13
-
_goto_level = _again
-
next
-
end
-
end
-
when 17 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 13
-
_goto_level = _again
-
next
-
end
-
end
-
# line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(46, p) end
-
when 16 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(46, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 13
-
_goto_level = _again
-
next
-
end
-
end
-
# line 563 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
-
end
-
end
-
end
-
if _goto_level <= _again
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
p += 1
-
if p != pe
-
_goto_level = _resume
-
next
-
end
-
end
-
if _goto_level <= _test_eof
-
if p == eof
-
case _content_location_eof_actions[cs]
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 11 then
-
# line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(46, p) end
-
# line 589 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
-
end
-
end
-
-
end
-
if _goto_level <= _out
-
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 603 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
-
18
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
-
-
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module ContentTransferEncodingMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb"
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_trans_keys
-
1
private :_content_transfer_encoding_trans_keys, :_content_transfer_encoding_trans_keys=
-
end
-
1
self._content_transfer_encoding_trans_keys = [
-
0, 0, 9, 126, 10, 10,
-
9, 32, 10, 10, 9,
-
32, 10, 10, 9, 32,
-
9, 126, 1, 127, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 9, 126, 9, 59,
-
9, 59, 9, 40, 9, 40,
-
0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_key_spans
-
1
private :_content_transfer_encoding_key_spans, :_content_transfer_encoding_key_spans=
-
end
-
1
self._content_transfer_encoding_key_spans = [
-
0, 118, 1, 24, 1, 24, 1, 24,
-
118, 127, 127, 1, 24, 128, 118, 51,
-
51, 32, 32, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_index_offsets
-
1
private :_content_transfer_encoding_index_offsets, :_content_transfer_encoding_index_offsets=
-
end
-
1
self._content_transfer_encoding_index_offsets = [
-
0, 0, 119, 121, 146, 148, 173, 175,
-
200, 319, 447, 575, 577, 602, 731, 850,
-
902, 954, 987, 1020
-
]
-
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_indicies
-
1
private :_content_transfer_encoding_indicies, :_content_transfer_encoding_indicies=
-
end
-
1
self._content_transfer_encoding_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
3, 3, 3, 3, 3, 3, 3, 4,
-
1, 3, 3, 3, 3, 3, 1, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 1, 1, 1, 1, 1, 1,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 5,
-
1, 0, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
0, 1, 6, 1, 7, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 7, 1, 8, 1, 9,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 9, 1,
-
10, 1, 1, 1, 11, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 10,
-
12, 12, 12, 12, 12, 12, 12, 13,
-
1, 12, 12, 12, 12, 12, 1, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 1, 1, 1, 1, 1, 1, 1,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 1, 1, 1, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 1, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
1, 14, 14, 15, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 16, 17,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 18, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 1, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
1, 19, 19, 20, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 21, 22,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 23, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 1, 24,
-
1, 19, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
19, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 19, 25, 1, 1, 1, 26,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 25, 27, 27, 27, 27, 27,
-
27, 27, 28, 1, 27, 27, 27, 27,
-
27, 1, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 1, 29, 1, 1,
-
1, 1, 1, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 1, 1, 1,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 1, 7, 1, 1, 1, 30, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 7, 1, 1, 1, 1, 1, 1,
-
1, 31, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 9, 1, 32, 1,
-
1, 1, 33, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 32, 1, 1,
-
1, 1, 1, 1, 1, 34, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
35, 1, 9, 1, 1, 1, 36, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 9, 1, 1, 1, 1, 1, 1,
-
1, 37, 1, 35, 1, 1, 1, 38,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 35, 1, 1, 1, 1, 1,
-
1, 1, 39, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_trans_targs
-
1
private :_content_transfer_encoding_trans_targs, :_content_transfer_encoding_trans_targs=
-
end
-
1
self._content_transfer_encoding_trans_targs = [
-
1, 0, 2, 14, 8, 3, 5, 15,
-
7, 17, 1, 2, 14, 8, 10, 11,
-
10, 19, 13, 10, 11, 10, 19, 13,
-
12, 15, 4, 14, 16, 17, 4, 16,
-
15, 4, 16, 17, 6, 18, 6, 18
-
]
-
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_trans_actions
-
1
private :_content_transfer_encoding_trans_actions, :_content_transfer_encoding_trans_actions=
-
end
-
1
self._content_transfer_encoding_trans_actions = [
-
0, 0, 0, 1, 2, 0, 0, 0,
-
0, 0, 3, 3, 4, 5, 6, 6,
-
7, 8, 6, 0, 0, 2, 9, 0,
-
0, 10, 10, 0, 11, 10, 0, 2,
-
3, 3, 5, 3, 0, 2, 3, 5
-
]
-
-
1
class << self
-
1
attr_accessor :_content_transfer_encoding_eof_actions
-
1
private :_content_transfer_encoding_eof_actions, :_content_transfer_encoding_eof_actions=
-
end
-
1
self._content_transfer_encoding_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 10, 0,
-
3, 0, 3, 0
-
]
-
-
1
class << self
-
1
attr_accessor :content_transfer_encoding_start
-
end
-
1
self.content_transfer_encoding_start = 1;
-
1
class << self
-
1
attr_accessor :content_transfer_encoding_first_final
-
end
-
1
self.content_transfer_encoding_first_final = 14;
-
1
class << self
-
1
attr_accessor :content_transfer_encoding_error
-
end
-
1
self.content_transfer_encoding_error = 0;
-
-
1
class << self
-
1
attr_accessor :content_transfer_encoding_en_comment_tail
-
end
-
1
self.content_transfer_encoding_en_comment_tail = 9;
-
1
class << self
-
1
attr_accessor :content_transfer_encoding_en_main
-
end
-
1
self.content_transfer_encoding_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl"
-
-
1
def self.parse(data)
-
2
p = 0
-
2
eof = data.length
-
2
stack = []
-
-
2
actions = []
-
2
data_unpacked = data.bytes.to_a
-
-
# line 251 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb"
-
begin
-
2
p ||= 0
-
2
pe ||= data.length
-
2
cs = content_transfer_encoding_start
-
2
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl"
-
-
# line 261 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb"
-
begin
-
2
testEof = false
-
2
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
2
_goto_level = 0
-
2
_resume = 10
-
2
_eof_trans = 15
-
2
_again = 20
-
2
_test_eof = 30
-
2
_out = 40
-
2
while true
-
32
if _goto_level <= 0
-
2
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
2
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
32
if _goto_level <= _resume
-
32
_keys = cs << 1
-
32
_inds = _content_transfer_encoding_index_offsets[cs]
-
32
_slen = _content_transfer_encoding_key_spans[cs]
-
32
_trans = if ( _slen > 0 &&
-
32
_content_transfer_encoding_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
32
( data_unpacked[p]) <= _content_transfer_encoding_trans_keys[_keys + 1]
-
) then
-
32
_content_transfer_encoding_indicies[ _inds + ( data_unpacked[p]) - _content_transfer_encoding_trans_keys[_keys] ]
-
else
-
_content_transfer_encoding_indicies[ _inds + _slen ]
-
end
-
32
cs = _content_transfer_encoding_trans_targs[_trans]
-
32
if _content_transfer_encoding_trans_actions[_trans] != 0
-
2
case _content_transfer_encoding_trans_actions[_trans]
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 6 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 10 then
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(14, p) end
-
when 1 then
-
# line 18 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
2
actions.push(15, p) end
-
when 2 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 9
-
_goto_level = _again
-
next
-
end
-
end
-
when 9 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 18 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(15, p) end
-
when 5 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 9
-
_goto_level = _again
-
next
-
end
-
end
-
when 7 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 9
-
_goto_level = _again
-
next
-
end
-
end
-
when 8 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 11 then
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(14, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 9
-
_goto_level = _again
-
next
-
end
-
end
-
# line 396 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb"
-
end
-
end
-
end
-
32
if _goto_level <= _again
-
32
if cs == 0
-
_goto_level = _out
-
next
-
end
-
32
p += 1
-
32
if p != pe
-
30
_goto_level = _resume
-
30
next
-
end
-
end
-
2
if _goto_level <= _test_eof
-
2
if p == eof
-
2
case _content_transfer_encoding_eof_actions[cs]
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 10 then
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
2
actions.push(14, p) end
-
# line 422 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb"
-
end
-
end
-
-
end
-
2
if _goto_level <= _out
-
2
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 436 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb"
-
2
14
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl"
-
-
2
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module ContentTypeMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb"
-
1
class << self
-
1
attr_accessor :_content_type_trans_keys
-
1
private :_content_type_trans_keys, :_content_type_trans_keys=
-
end
-
1
self._content_type_trans_keys = [
-
0, 0, 33, 126, 33, 126,
-
33, 126, 9, 126, 10,
-
10, 9, 32, 33, 126,
-
9, 126, 9, 40, 10, 10,
-
9, 32, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 0, 127,
-
9, 40, 10, 10, 9, 32,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 9, 126, 9, 59,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 9, 126,
-
0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_type_key_spans
-
1
private :_content_type_key_spans, :_content_type_key_spans=
-
end
-
1
self._content_type_key_spans = [
-
0, 94, 94, 94, 118, 1, 24, 94,
-
118, 32, 1, 24, 127, 127, 1, 24,
-
1, 24, 118, 118, 1, 24, 118, 128,
-
32, 1, 24, 118, 127, 127, 1, 24,
-
128, 118, 51, 118, 118, 118, 118, 118,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_type_index_offsets
-
1
private :_content_type_index_offsets, :_content_type_index_offsets=
-
end
-
1
self._content_type_index_offsets = [
-
0, 0, 95, 190, 285, 404, 406, 431,
-
526, 645, 678, 680, 705, 833, 961, 963,
-
988, 990, 1015, 1134, 1253, 1255, 1280, 1399,
-
1528, 1561, 1563, 1588, 1707, 1835, 1963, 1965,
-
1990, 2119, 2238, 2290, 2409, 2528, 2647, 2766,
-
2885
-
]
-
-
1
class << self
-
1
attr_accessor :_content_type_indicies
-
1
private :_content_type_indicies, :_content_type_indicies=
-
end
-
1
self._content_type_indicies = [
-
0, 0, 0, 0, 0, 0, 0, 1,
-
1, 0, 0, 0, 0, 0, 1, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 1, 1, 1, 1, 1, 1, 1,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 1, 1, 1, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 1, 2,
-
2, 2, 2, 2, 2, 2, 1, 1,
-
2, 2, 2, 2, 2, 3, 2, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
1, 1, 1, 1, 1, 1, 1, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
2, 1, 1, 1, 2, 2, 2, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
2, 2, 2, 2, 2, 2, 2, 2,
-
2, 2, 2, 2, 2, 1, 4, 4,
-
4, 4, 4, 4, 4, 1, 1, 4,
-
4, 4, 4, 4, 1, 4, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 1,
-
1, 1, 1, 1, 1, 1, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
1, 1, 1, 4, 4, 4, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 4, 4, 4, 1, 5, 1, 1,
-
1, 6, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 5, 7, 7, 7,
-
7, 7, 7, 7, 8, 1, 7, 7,
-
7, 7, 7, 1, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 1, 9,
-
1, 1, 1, 1, 1, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 1,
-
1, 1, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 1, 10, 1, 5, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 5, 1, 11,
-
11, 11, 11, 11, 11, 11, 1, 1,
-
11, 11, 11, 11, 11, 1, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
1, 1, 1, 12, 1, 1, 1, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 1, 1, 1, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 11, 11, 11,
-
11, 11, 11, 11, 11, 1, 13, 1,
-
1, 1, 14, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 13, 15, 16,
-
15, 15, 15, 15, 15, 17, 1, 15,
-
15, 15, 15, 15, 1, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 1,
-
1, 1, 15, 1, 1, 1, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 15,
-
1, 1, 1, 15, 15, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 15, 15,
-
15, 15, 15, 15, 1, 18, 1, 1,
-
1, 19, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 18, 1, 20, 1,
-
1, 1, 1, 1, 21, 1, 22, 1,
-
18, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 18,
-
1, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 1, 23, 23, 24, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 25, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 26, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
1, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 1, 27, 27, 28, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 29, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 30, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
1, 31, 1, 27, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 27, 1, 32, 1, 33, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 33, 1, 34,
-
1, 1, 1, 35, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 34, 7,
-
7, 7, 7, 7, 7, 7, 36, 1,
-
7, 7, 7, 7, 7, 1, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
1, 9, 1, 1, 1, 1, 1, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 1, 1, 1, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 1, 34, 1,
-
1, 1, 35, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 34, 7, 7,
-
7, 7, 7, 7, 7, 36, 1, 7,
-
7, 7, 7, 7, 1, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 1,
-
1, 1, 1, 1, 1, 1, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
1, 1, 1, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 1, 37, 1, 34,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 34, 1,
-
38, 1, 1, 1, 39, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 38,
-
40, 40, 40, 40, 40, 40, 40, 41,
-
1, 40, 40, 40, 40, 40, 1, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 1, 1, 1, 1, 1, 1, 1,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 1, 1, 1, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 1, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 27,
-
27, 27, 27, 27, 27, 27, 27, 1,
-
42, 1, 1, 1, 43, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 42,
-
1, 44, 1, 1, 1, 1, 1, 45,
-
1, 46, 1, 47, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 47, 1, 48, 1, 1, 1,
-
49, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 48, 40, 40, 40, 40,
-
40, 40, 40, 50, 1, 40, 40, 40,
-
40, 40, 1, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 1, 51, 1,
-
1, 1, 1, 1, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 1, 1,
-
1, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 1, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 1, 52, 52, 53,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 54, 55, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 56, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 52, 52, 52, 52,
-
52, 52, 1, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 1, 57, 57, 58,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 59, 60, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 61, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 1, 62, 1, 57, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 57, 1, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 57, 57, 57, 57, 57, 1, 63,
-
1, 1, 1, 64, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 63, 65,
-
65, 65, 65, 65, 65, 65, 66, 1,
-
65, 65, 65, 65, 65, 1, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
1, 67, 1, 1, 1, 1, 1, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 1, 1, 1, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 1, 68, 1,
-
1, 1, 69, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 68, 1, 1,
-
1, 1, 1, 1, 1, 70, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
71, 1, 68, 1, 1, 1, 69, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 68, 7, 7, 7, 7, 7, 7,
-
7, 70, 1, 7, 7, 7, 7, 7,
-
1, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 1, 71, 1, 1, 1,
-
1, 1, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 1, 1, 1, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
1, 72, 1, 1, 1, 73, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
72, 40, 40, 40, 40, 40, 40, 40,
-
74, 1, 40, 40, 40, 40, 40, 1,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 1, 75, 1, 1, 1, 1,
-
1, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 1, 1, 1, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 1,
-
76, 1, 1, 1, 77, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 76,
-
78, 1, 78, 78, 78, 78, 78, 79,
-
1, 78, 78, 78, 78, 78, 1, 78,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 1, 71, 1, 78, 1, 1, 1,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 78, 1, 1, 1, 78, 78, 78,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 78, 78, 78, 78, 78, 78, 78,
-
78, 78, 78, 78, 78, 78, 1, 47,
-
1, 1, 1, 80, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 47, 7,
-
7, 7, 7, 7, 7, 7, 81, 1,
-
7, 7, 7, 7, 7, 1, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
1, 9, 1, 1, 1, 1, 1, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 1, 1, 1, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 7, 7, 7,
-
7, 7, 7, 7, 7, 1, 82, 1,
-
1, 1, 83, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 82, 40, 40,
-
40, 40, 40, 40, 40, 84, 1, 40,
-
40, 40, 40, 40, 1, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 1,
-
51, 1, 1, 1, 1, 1, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
1, 1, 1, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 40, 40, 40, 40,
-
40, 40, 40, 40, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_content_type_trans_targs
-
1
private :_content_type_trans_targs, :_content_type_trans_targs=
-
end
-
1
self._content_type_trans_targs = [
-
2, 0, 2, 3, 33, 4, 5, 7,
-
27, 18, 6, 7, 8, 9, 10, 37,
-
12, 24, 9, 10, 12, 24, 11, 13,
-
14, 34, 23, 13, 14, 34, 23, 15,
-
17, 35, 19, 20, 22, 21, 19, 20,
-
7, 22, 9, 10, 12, 24, 26, 38,
-
4, 5, 27, 18, 29, 30, 29, 40,
-
32, 29, 30, 29, 40, 32, 31, 4,
-
5, 33, 27, 18, 35, 16, 36, 18,
-
35, 16, 36, 18, 38, 25, 37, 39,
-
25, 39, 38, 25, 39
-
]
-
-
1
class << self
-
1
attr_accessor :_content_type_trans_actions
-
1
private :_content_type_trans_actions, :_content_type_trans_actions=
-
end
-
1
self._content_type_trans_actions = [
-
1, 0, 0, 2, 3, 0, 0, 4,
-
5, 0, 0, 0, 6, 7, 7, 7,
-
7, 8, 0, 0, 0, 5, 0, 9,
-
9, 10, 9, 0, 0, 11, 0, 0,
-
0, 0, 0, 0, 5, 0, 12, 12,
-
13, 14, 12, 12, 12, 14, 0, 0,
-
12, 12, 14, 12, 15, 15, 16, 17,
-
15, 0, 0, 5, 18, 0, 0, 19,
-
19, 0, 20, 19, 21, 21, 22, 21,
-
23, 23, 24, 23, 21, 21, 0, 25,
-
0, 5, 12, 12, 14
-
]
-
-
1
class << self
-
1
attr_accessor :_content_type_eof_actions
-
1
private :_content_type_eof_actions, :_content_type_eof_actions=
-
end
-
1
self._content_type_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 19, 21, 21, 23, 21, 0, 12,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :content_type_start
-
end
-
1
self.content_type_start = 1;
-
1
class << self
-
1
attr_accessor :content_type_first_final
-
end
-
1
self.content_type_first_final = 33;
-
1
class << self
-
1
attr_accessor :content_type_error
-
end
-
1
self.content_type_error = 0;
-
-
1
class << self
-
1
attr_accessor :content_type_en_comment_tail
-
end
-
1
self.content_type_en_comment_tail = 28;
-
1
class << self
-
1
attr_accessor :content_type_en_main
-
end
-
1
self.content_type_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl"
-
-
1
def self.parse(data)
-
3
p = 0
-
3
eof = data.length
-
3
stack = []
-
-
3
actions = []
-
3
data_unpacked = data.bytes.to_a
-
-
# line 513 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb"
-
begin
-
3
p ||= 0
-
3
pe ||= data.length
-
3
cs = content_type_start
-
3
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl"
-
-
# line 523 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb"
-
begin
-
3
testEof = false
-
3
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
3
_goto_level = 0
-
3
_resume = 10
-
3
_eof_trans = 15
-
3
_again = 20
-
3
_test_eof = 30
-
3
_out = 40
-
3
while true
-
43
if _goto_level <= 0
-
3
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
3
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
43
if _goto_level <= _resume
-
43
_keys = cs << 1
-
43
_inds = _content_type_index_offsets[cs]
-
43
_slen = _content_type_key_spans[cs]
-
43
_trans = if ( _slen > 0 &&
-
43
_content_type_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
43
( data_unpacked[p]) <= _content_type_trans_keys[_keys + 1]
-
) then
-
43
_content_type_indicies[ _inds + ( data_unpacked[p]) - _content_type_trans_keys[_keys] ]
-
else
-
_content_type_indicies[ _inds + _slen ]
-
end
-
43
cs = _content_type_trans_targs[_trans]
-
43
if _content_type_trans_actions[_trans] != 0
-
13
case _content_type_trans_actions[_trans]
-
when 12 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 15 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 2 then
-
# line 25 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
3
actions.push(22, p) end
-
when 1 then
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
3
actions.push(23, p) end
-
when 6 then
-
# line 35 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(32, p) end
-
when 4 then
-
# line 36 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(33, p) end
-
when 21 then
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 7 then
-
# line 38 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(35, p) end
-
when 11 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 9 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 19 then
-
# line 45 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(42, p) end
-
when 3 then
-
# line 46 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
3
actions.push(43, p) end
-
when 5 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
when 18 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 13 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 36 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(33, p) end
-
when 23 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 14 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
when 16 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
when 17 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 25 then
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
when 8 then
-
# line 38 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(35, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
when 10 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 20 then
-
# line 45 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(42, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
when 22 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
when 24 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 28
-
_goto_level = _again
-
next
-
end
-
end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
# line 763 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb"
-
end
-
end
-
end
-
43
if _goto_level <= _again
-
43
if cs == 0
-
_goto_level = _out
-
next
-
end
-
43
p += 1
-
43
if p != pe
-
40
_goto_level = _resume
-
40
next
-
end
-
end
-
3
if _goto_level <= _test_eof
-
3
if p == eof
-
3
case _content_type_eof_actions[cs]
-
when 12 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 21 then
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(34, p) end
-
when 19 then
-
# line 45 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
2
actions.push(42, p) end
-
when 23 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(34, p) end
-
# line 800 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb"
-
end
-
end
-
-
end
-
3
if _goto_level <= _out
-
3
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 814 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb"
-
3
33
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl"
-
-
3
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module DateTimeMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb"
-
1
class << self
-
1
attr_accessor :_date_time_trans_keys
-
1
private :_date_time_trans_keys, :_date_time_trans_keys=
-
end
-
1
self._date_time_trans_keys = [
-
0, 0, 9, 87, 9, 87,
-
10, 10, 9, 32, 9,
-
87, 9, 83, 9, 83,
-
10, 10, 9, 32, 9, 83,
-
112, 117, 114, 114, 9,
-
57, 10, 10, 9, 32,
-
9, 57, 48, 57, 9, 57,
-
9, 57, 10, 10, 9,
-
32, 9, 57, 48, 57,
-
9, 58, 10, 10, 9, 32,
-
9, 58, 9, 57, 10,
-
10, 9, 32, 9, 57,
-
48, 57, 9, 58, 9, 122,
-
10, 10, 9, 32, 9,
-
58, 9, 57, 10, 10,
-
9, 32, 9, 57, 48, 57,
-
9, 40, 9, 122, 10,
-
10, 9, 32, 9, 40,
-
48, 57, 48, 57, 48, 57,
-
48, 57, 10, 10, 9,
-
32, 84, 84, 103, 103,
-
101, 101, 99, 99, 101, 101,
-
98, 98, 97, 117, 110,
-
110, 108, 110, 97, 97,
-
114, 121, 111, 111, 118, 118,
-
99, 99, 116, 116, 101,
-
101, 112, 112, 114, 114,
-
105, 105, 9, 44, 10, 10,
-
9, 32, 9, 44, 9,
-
57, 9, 57, 10, 10,
-
9, 32, 9, 57, 111, 111,
-
110, 110, 97, 117, 116,
-
116, 104, 117, 117, 117,
-
101, 101, 101, 101, 100, 100,
-
1, 127, 1, 127, 10,
-
10, 9, 32, 0, 127,
-
9, 40, 9, 40, 9, 40,
-
9, 83, 9, 77, 9,
-
84, 0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_date_time_key_spans
-
1
private :_date_time_key_spans, :_date_time_key_spans=
-
end
-
1
self._date_time_key_spans = [
-
0, 79, 79, 1, 24, 79, 75, 75,
-
1, 24, 75, 6, 1, 49, 1, 24,
-
49, 10, 49, 49, 1, 24, 49, 10,
-
50, 1, 24, 50, 49, 1, 24, 49,
-
10, 50, 114, 1, 24, 50, 49, 1,
-
24, 49, 10, 32, 114, 1, 24, 32,
-
10, 10, 10, 10, 1, 24, 1, 1,
-
1, 1, 1, 1, 21, 1, 3, 1,
-
8, 1, 1, 1, 1, 1, 1, 1,
-
1, 36, 1, 24, 36, 49, 49, 1,
-
24, 49, 1, 1, 21, 1, 14, 1,
-
1, 1, 1, 127, 127, 1, 24, 128,
-
32, 32, 32, 75, 69, 76, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_date_time_index_offsets
-
1
private :_date_time_index_offsets, :_date_time_index_offsets=
-
end
-
1
self._date_time_index_offsets = [
-
0, 0, 80, 160, 162, 187, 267, 343,
-
419, 421, 446, 522, 529, 531, 581, 583,
-
608, 658, 669, 719, 769, 771, 796, 846,
-
857, 908, 910, 935, 986, 1036, 1038, 1063,
-
1113, 1124, 1175, 1290, 1292, 1317, 1368, 1418,
-
1420, 1445, 1495, 1506, 1539, 1654, 1656, 1681,
-
1714, 1725, 1736, 1747, 1758, 1760, 1785, 1787,
-
1789, 1791, 1793, 1795, 1797, 1819, 1821, 1825,
-
1827, 1836, 1838, 1840, 1842, 1844, 1846, 1848,
-
1850, 1852, 1889, 1891, 1916, 1953, 2003, 2053,
-
2055, 2080, 2130, 2132, 2134, 2156, 2158, 2173,
-
2175, 2177, 2179, 2181, 2309, 2437, 2439, 2464,
-
2593, 2626, 2659, 2692, 2768, 2838, 2915
-
]
-
-
1
class << self
-
1
attr_accessor :_date_time_indicies
-
1
private :_date_time_indicies, :_date_time_indicies=
-
end
-
1
self._date_time_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
1, 1, 1, 1, 1, 1, 1, 3,
-
1, 1, 1, 1, 1, 1, 1, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 5, 1, 1,
-
1, 1, 1, 1, 6, 1, 1, 1,
-
1, 1, 7, 8, 1, 1, 9, 1,
-
10, 1, 1, 1, 11, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 10,
-
1, 1, 1, 1, 1, 1, 1, 12,
-
1, 1, 1, 1, 1, 1, 1, 13,
-
13, 13, 13, 13, 13, 13, 13, 13,
-
13, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 5, 1, 1,
-
1, 1, 1, 1, 6, 1, 1, 1,
-
1, 1, 7, 8, 1, 1, 9, 1,
-
14, 1, 10, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 10, 1, 15, 1, 1, 1, 16,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 15, 1, 1, 1, 1, 1,
-
1, 1, 17, 1, 1, 1, 1, 1,
-
1, 1, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
19, 1, 1, 1, 1, 1, 1, 20,
-
1, 1, 1, 1, 1, 21, 22, 1,
-
1, 23, 1, 24, 1, 1, 1, 25,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 24, 1, 1, 1, 1, 1,
-
1, 1, 26, 1, 1, 1, 1, 1,
-
1, 1, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 1, 1, 1, 1,
-
1, 1, 1, 27, 1, 1, 28, 1,
-
29, 1, 1, 1, 30, 1, 1, 31,
-
32, 33, 1, 1, 1, 34, 1, 24,
-
1, 1, 1, 25, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 24, 1,
-
1, 1, 1, 1, 1, 1, 26, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 27,
-
1, 1, 28, 1, 29, 1, 1, 1,
-
30, 1, 1, 31, 32, 33, 1, 1,
-
1, 34, 1, 35, 1, 24, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 24, 1, 36, 1,
-
1, 1, 37, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 36, 1, 1,
-
1, 1, 1, 1, 1, 38, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 39, 1,
-
1, 40, 1, 41, 1, 1, 1, 42,
-
1, 1, 43, 44, 45, 1, 1, 1,
-
46, 1, 47, 1, 1, 1, 1, 48,
-
1, 49, 1, 49, 1, 1, 1, 50,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 49, 1, 1, 1, 1, 1,
-
1, 1, 51, 1, 1, 1, 1, 1,
-
1, 1, 52, 52, 52, 52, 52, 52,
-
52, 52, 52, 52, 1, 53, 1, 49,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 49, 1,
-
54, 1, 1, 1, 55, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 54,
-
1, 1, 1, 1, 1, 1, 1, 56,
-
1, 1, 1, 1, 1, 1, 1, 57,
-
57, 57, 57, 57, 57, 57, 57, 57,
-
57, 1, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 1, 59, 1, 1,
-
1, 60, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 59, 1, 1, 1,
-
1, 1, 1, 1, 61, 1, 1, 1,
-
1, 1, 1, 1, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 1, 59,
-
1, 1, 1, 60, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 59, 1,
-
1, 1, 1, 1, 1, 1, 61, 1,
-
1, 1, 1, 1, 1, 1, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
1, 63, 1, 59, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 59, 1, 64, 1, 1, 1,
-
65, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 64, 1, 1, 1, 1,
-
1, 1, 1, 66, 1, 1, 1, 1,
-
1, 1, 1, 67, 67, 67, 67, 67,
-
67, 67, 67, 67, 67, 1, 68, 68,
-
68, 68, 68, 68, 68, 68, 68, 68,
-
1, 68, 1, 1, 1, 69, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
68, 1, 1, 1, 1, 1, 1, 1,
-
70, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 71, 1, 72, 1, 68, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 68, 1, 73,
-
1, 1, 1, 74, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 73, 1,
-
1, 1, 1, 1, 1, 1, 75, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
76, 1, 71, 1, 1, 1, 77, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 71, 1, 1, 1, 1, 1, 1,
-
1, 78, 1, 1, 1, 1, 1, 1,
-
1, 79, 79, 79, 79, 79, 79, 79,
-
79, 79, 79, 1, 80, 1, 71, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 71, 1, 76,
-
1, 1, 1, 81, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 76, 1,
-
1, 1, 1, 1, 1, 1, 82, 1,
-
1, 1, 1, 1, 1, 1, 83, 83,
-
83, 83, 83, 83, 83, 83, 83, 83,
-
1, 84, 84, 84, 84, 84, 84, 84,
-
84, 84, 84, 1, 85, 1, 1, 1,
-
86, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 85, 1, 1, 1, 1,
-
1, 1, 1, 87, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 88, 1, 85,
-
1, 1, 1, 86, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 85, 1,
-
1, 1, 1, 1, 1, 1, 87, 1,
-
1, 89, 1, 89, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
88, 1, 1, 1, 1, 1, 1, 90,
-
90, 91, 90, 91, 90, 92, 90, 90,
-
1, 90, 90, 91, 90, 90, 91, 90,
-
90, 90, 90, 93, 90, 90, 90, 90,
-
90, 1, 1, 1, 1, 1, 1, 90,
-
90, 90, 90, 90, 90, 90, 90, 90,
-
1, 90, 90, 90, 90, 90, 90, 90,
-
90, 90, 90, 90, 90, 90, 90, 90,
-
90, 1, 94, 1, 85, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 85, 1, 95, 1, 1,
-
1, 96, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 95, 1, 1, 1,
-
1, 1, 1, 1, 97, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 98, 1,
-
88, 1, 1, 1, 99, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 88,
-
1, 1, 1, 1, 1, 1, 1, 100,
-
1, 1, 1, 1, 1, 1, 1, 101,
-
101, 101, 101, 101, 101, 101, 101, 101,
-
101, 1, 102, 1, 88, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 88, 1, 98, 1, 1,
-
1, 103, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 98, 1, 1, 1,
-
1, 1, 1, 1, 104, 1, 1, 1,
-
1, 1, 1, 1, 105, 105, 105, 105,
-
105, 105, 105, 105, 105, 105, 1, 106,
-
106, 106, 106, 106, 106, 106, 106, 106,
-
106, 1, 107, 1, 1, 1, 108, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 107, 1, 1, 1, 1, 1, 1,
-
1, 109, 1, 107, 1, 1, 1, 108,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 107, 1, 1, 1, 1, 1,
-
1, 1, 109, 1, 1, 89, 1, 89,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 90, 90, 91, 90, 91,
-
90, 92, 90, 90, 1, 90, 90, 91,
-
90, 90, 91, 90, 90, 90, 90, 93,
-
90, 90, 90, 90, 90, 1, 1, 1,
-
1, 1, 1, 90, 90, 90, 90, 90,
-
90, 90, 90, 90, 1, 90, 90, 90,
-
90, 90, 90, 90, 90, 90, 90, 90,
-
90, 90, 90, 90, 90, 1, 110, 1,
-
107, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 107,
-
1, 111, 1, 1, 1, 112, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
111, 1, 1, 1, 1, 1, 1, 1,
-
113, 1, 114, 114, 114, 114, 114, 114,
-
114, 114, 114, 114, 1, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 1,
-
116, 116, 116, 116, 116, 116, 116, 116,
-
116, 116, 1, 90, 90, 90, 90, 90,
-
90, 90, 90, 90, 90, 1, 117, 1,
-
118, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 118,
-
1, 90, 1, 49, 1, 119, 1, 49,
-
1, 120, 1, 49, 1, 121, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 122, 1, 49, 1, 49, 1, 49,
-
1, 123, 1, 49, 1, 1, 1, 1,
-
1, 1, 49, 1, 124, 1, 49, 1,
-
125, 1, 49, 1, 126, 1, 49, 1,
-
127, 1, 128, 1, 128, 1, 1, 1,
-
129, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 128, 1, 1, 1, 1,
-
1, 1, 1, 130, 1, 1, 1, 131,
-
1, 132, 1, 128, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 128, 1, 133, 1, 1, 1,
-
134, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 133, 1, 1, 1, 1,
-
1, 1, 1, 135, 1, 1, 1, 136,
-
1, 137, 1, 1, 1, 138, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
137, 1, 1, 1, 1, 1, 1, 1,
-
139, 1, 1, 1, 1, 1, 1, 1,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 4, 1, 140, 1, 1, 1, 141,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 140, 1, 1, 1, 1, 1,
-
1, 1, 142, 1, 1, 1, 1, 1,
-
1, 1, 13, 13, 13, 13, 13, 13,
-
13, 13, 13, 13, 1, 143, 1, 140,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 140, 1,
-
144, 1, 1, 1, 145, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 144,
-
1, 1, 1, 1, 1, 1, 1, 146,
-
1, 1, 1, 1, 1, 1, 1, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 1, 147, 1, 128, 1, 148, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 147, 1, 128, 1, 149, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 150, 1, 128, 1, 128,
-
1, 151, 1, 128, 1, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 1, 152,
-
152, 153, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 154, 155, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
156, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 152, 152, 152, 152,
-
152, 152, 152, 152, 1, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 1, 157,
-
157, 158, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 159, 160, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
161, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 1, 162, 1, 157,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 157, 1,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
157, 157, 157, 157, 157, 157, 157, 157,
-
1, 163, 1, 1, 1, 164, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
163, 1, 1, 1, 1, 1, 1, 1,
-
165, 1, 118, 1, 1, 1, 166, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 118, 1, 1, 1, 1, 1, 1,
-
1, 167, 1, 168, 1, 1, 1, 169,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 168, 1, 1, 1, 1, 1,
-
1, 1, 170, 1, 163, 1, 1, 1,
-
164, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 163, 1, 1, 1, 1,
-
1, 1, 1, 165, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 171,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 171, 1,
-
163, 1, 1, 1, 164, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 163,
-
1, 1, 1, 1, 1, 1, 1, 165,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 171, 1, 163, 1,
-
1, 1, 164, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 163, 1, 1,
-
1, 1, 1, 1, 1, 165, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 90, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_date_time_trans_targs
-
1
private :_date_time_trans_targs, :_date_time_trans_targs=
-
end
-
1
self._date_time_trans_targs = [
-
2, 0, 3, 5, 6, 71, 82, 84,
-
86, 89, 2, 3, 5, 6, 4, 2,
-
3, 5, 6, 71, 82, 84, 86, 89,
-
7, 8, 10, 11, 56, 58, 60, 63,
-
65, 67, 69, 9, 7, 8, 10, 11,
-
56, 58, 60, 63, 65, 67, 69, 12,
-
55, 13, 14, 16, 17, 15, 13, 14,
-
16, 17, 18, 19, 20, 22, 23, 21,
-
19, 20, 22, 23, 24, 25, 27, 28,
-
26, 24, 25, 27, 28, 29, 31, 32,
-
30, 29, 31, 32, 33, 34, 35, 37,
-
38, 48, 96, 99, 100, 101, 36, 34,
-
35, 37, 38, 39, 41, 42, 40, 39,
-
41, 42, 43, 44, 45, 47, 46, 44,
-
45, 47, 49, 50, 51, 53, 97, 57,
-
59, 61, 62, 64, 66, 68, 70, 72,
-
73, 74, 76, 77, 75, 73, 74, 76,
-
77, 78, 79, 81, 78, 79, 81, 80,
-
78, 79, 81, 83, 85, 87, 88, 90,
-
92, 93, 92, 102, 95, 92, 93, 92,
-
102, 95, 94, 97, 52, 98, 52, 98,
-
97, 52, 98, 54
-
]
-
-
1
class << self
-
1
attr_accessor :_date_time_trans_actions
-
1
private :_date_time_trans_actions, :_date_time_trans_actions=
-
end
-
1
self._date_time_trans_actions = [
-
1, 0, 1, 2, 1, 0, 0, 0,
-
0, 0, 0, 0, 3, 0, 0, 4,
-
4, 5, 4, 4, 4, 4, 4, 4,
-
0, 0, 3, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 4, 4, 5, 4,
-
4, 4, 4, 4, 4, 4, 4, 0,
-
0, 0, 0, 3, 0, 0, 4, 4,
-
5, 4, 0, 0, 0, 3, 6, 0,
-
4, 4, 5, 7, 0, 0, 3, 0,
-
0, 4, 4, 5, 4, 0, 3, 0,
-
0, 4, 5, 4, 0, 0, 0, 3,
-
0, 0, 0, 0, 0, 0, 0, 4,
-
4, 5, 4, 0, 3, 0, 0, 4,
-
5, 4, 0, 0, 0, 3, 0, 4,
-
4, 5, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 3, 0, 0, 4, 4, 5,
-
4, 1, 1, 8, 0, 0, 3, 0,
-
4, 4, 5, 0, 0, 0, 0, 0,
-
9, 9, 10, 11, 9, 0, 0, 3,
-
12, 0, 0, 13, 13, 14, 0, 3,
-
4, 4, 5, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_date_time_eof_actions
-
1
private :_date_time_eof_actions, :_date_time_eof_actions=
-
end
-
1
self._date_time_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
13, 0, 4, 13, 13, 13, 0
-
]
-
-
1
class << self
-
1
attr_accessor :date_time_start
-
end
-
1
self.date_time_start = 1;
-
1
class << self
-
1
attr_accessor :date_time_first_final
-
end
-
1
self.date_time_first_final = 96;
-
1
class << self
-
1
attr_accessor :date_time_error
-
end
-
1
self.date_time_error = 0;
-
-
1
class << self
-
1
attr_accessor :date_time_en_comment_tail
-
end
-
1
self.date_time_en_comment_tail = 91;
-
1
class << self
-
1
attr_accessor :date_time_en_main
-
end
-
1
self.date_time_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl"
-
-
1
def self.parse(data)
-
p = 0
-
eof = data.length
-
stack = []
-
-
actions = []
-
data_unpacked = data.bytes.to_a
-
-
# line 583 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb"
-
begin
-
p ||= 0
-
pe ||= data.length
-
cs = date_time_start
-
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl"
-
-
# line 593 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb"
-
begin
-
testEof = false
-
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
_goto_level = 0
-
_resume = 10
-
_eof_trans = 15
-
_again = 20
-
_test_eof = 30
-
_out = 40
-
while true
-
if _goto_level <= 0
-
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
if _goto_level <= _resume
-
_keys = cs << 1
-
_inds = _date_time_index_offsets[cs]
-
_slen = _date_time_key_spans[cs]
-
_trans = if ( _slen > 0 &&
-
_date_time_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
( data_unpacked[p]) <= _date_time_trans_keys[_keys + 1]
-
) then
-
_date_time_indicies[ _inds + ( data_unpacked[p]) - _date_time_trans_keys[_keys] ]
-
else
-
_date_time_indicies[ _inds + _slen ]
-
end
-
cs = _date_time_trans_targs[_trans]
-
if _date_time_trans_actions[_trans] != 0
-
case _date_time_trans_actions[_trans]
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 9 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 1 then
-
# line 12 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(9, p) end
-
when 13 then
-
# line 47 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(44, p) end
-
when 3 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 91
-
_goto_level = _again
-
next
-
end
-
end
-
when 12 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 5 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 91
-
_goto_level = _again
-
next
-
end
-
end
-
when 10 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 91
-
_goto_level = _again
-
next
-
end
-
end
-
when 11 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 6 then
-
# line 11 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(8, p) end
-
# line 48 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(45, p) end
-
when 8 then
-
# line 12 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(9, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 91
-
_goto_level = _again
-
next
-
end
-
end
-
when 14 then
-
# line 47 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(44, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 91
-
_goto_level = _again
-
next
-
end
-
end
-
when 2 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 91
-
_goto_level = _again
-
next
-
end
-
end
-
# line 12 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(9, p) end
-
when 7 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 11 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(8, p) end
-
# line 48 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(45, p) end
-
# line 766 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb"
-
end
-
end
-
end
-
if _goto_level <= _again
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
p += 1
-
if p != pe
-
_goto_level = _resume
-
next
-
end
-
end
-
if _goto_level <= _test_eof
-
if p == eof
-
case _date_time_eof_actions[cs]
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 13 then
-
# line 47 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(44, p) end
-
# line 792 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb"
-
end
-
end
-
-
end
-
if _goto_level <= _out
-
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 806 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb"
-
96
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl"
-
-
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
-
-
# line 10 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module EnvelopeFromMachine
-
-
# line 13 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
-
1
class << self
-
1
attr_accessor :_envelope_from_trans_keys
-
1
private :_envelope_from_trans_keys, :_envelope_from_trans_keys=
-
end
-
1
self._envelope_from_trans_keys = [
-
0, 0, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 64, 10, 10,
-
9, 32, 9, 87, 9, 64,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 9, 64,
-
10, 10, 9, 32, 9, 87,
-
9, 64, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 46, 10, 10,
-
9, 32, 9, 87, 9,
-
46, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
114, 114, 105, 105, 32,
-
32, 32, 83, 112, 117,
-
114, 114, 32, 32, 9, 57,
-
10, 10, 9, 32, 9,
-
57, 9, 57, 9, 40,
-
10, 10, 9, 32, 9, 57,
-
10, 10, 9, 32, 9,
-
57, 48, 57, 9, 58,
-
10, 10, 9, 32, 9, 58,
-
9, 57, 10, 10, 9,
-
32, 9, 57, 48, 57,
-
9, 58, 10, 10, 9, 32,
-
9, 58, 10, 10, 9,
-
32, 9, 58, 48, 57,
-
10, 10, 9, 32, 9, 57,
-
10, 10, 9, 32, 9,
-
57, 48, 57, 9, 40,
-
10, 10, 9, 32, 9, 57,
-
10, 10, 9, 32, 9,
-
57, 9, 40, 9, 58,
-
9, 40, 103, 103, 101, 101,
-
99, 99, 101, 101, 98,
-
98, 97, 117, 110, 110,
-
108, 110, 97, 97, 114, 121,
-
111, 111, 118, 118, 99,
-
99, 116, 116, 101, 101,
-
112, 112, 111, 111, 110, 110,
-
97, 117, 116, 116, 104,
-
117, 117, 117, 101, 101,
-
101, 101, 100, 100, 1, 127,
-
1, 127, 10, 10, 9,
-
32, 9, 126, 9, 40,
-
10, 10, 9, 32, 9, 87,
-
9, 40, 33, 126, -128,
-
-1, 10, 10, 9, 32,
-
9, 126, 9, 126, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 1, 127, 1, 127,
-
10, 10, 9, 32, -128, -1,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 87, 9,
-
64, -128, -1, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 87,
-
101, 114, 97, 111, 97,
-
117, 9, 126, 9, 126,
-
9, 126, 9, 126, 9, 126,
-
9, 126, 9, 126, 9,
-
126, 9, 126, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 126, -128, -1, 1,
-
127, 10, 10, 9, 32,
-
1, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
64, 10, 10, 9, 32,
-
9, 87, 9, 64, -128, -1,
-
1, 127, 10, 10, 9,
-
32, 9, 64, 10, 10,
-
9, 32, 9, 87, 9, 64,
-
9, 126, 33, 126, 62,
-
62, 32, 32, 32, 87,
-
70, 87, 1, 127, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 9, 57, 9, 40,
-
9, 40, 0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_envelope_from_key_spans
-
1
private :_envelope_from_key_spans, :_envelope_from_key_spans=
-
end
-
1
self._envelope_from_key_spans = [
-
0, 118, 118, 1, 24, 118, 56, 1,
-
24, 79, 56, 118, 1, 24, 118, 56,
-
1, 24, 79, 56, 118, 118, 1, 24,
-
118, 38, 1, 24, 79, 38, 118, 1,
-
24, 118, 118, 1, 1, 1, 52, 6,
-
1, 1, 49, 1, 24, 49, 49, 32,
-
1, 24, 49, 1, 24, 49, 10, 50,
-
1, 24, 50, 49, 1, 24, 49, 10,
-
50, 1, 24, 50, 1, 24, 50, 10,
-
1, 24, 49, 1, 24, 49, 10, 32,
-
1, 24, 49, 1, 24, 49, 32, 50,
-
32, 1, 1, 1, 1, 1, 21, 1,
-
3, 1, 8, 1, 1, 1, 1, 1,
-
1, 1, 1, 21, 1, 14, 1, 1,
-
1, 1, 127, 127, 1, 24, 118, 32,
-
1, 24, 79, 32, 94, 128, 1, 24,
-
118, 118, 127, 1, 24, 128, 127, 127,
-
1, 24, 128, 118, 127, 127, 1, 24,
-
118, 56, 1, 24, 79, 56, 128, 1,
-
24, 118, 118, 1, 24, 118, 118, 118,
-
118, 118, 79, 14, 15, 21, 118, 118,
-
118, 118, 118, 118, 118, 118, 118, 127,
-
127, 1, 24, 118, 128, 127, 1, 24,
-
127, 127, 1, 24, 118, 56, 1, 24,
-
79, 56, 128, 127, 1, 24, 56, 1,
-
24, 79, 56, 118, 94, 1, 1, 56,
-
18, 127, 127, 1, 24, 128, 49, 32,
-
32, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_envelope_from_index_offsets
-
1
private :_envelope_from_index_offsets, :_envelope_from_index_offsets=
-
end
-
1
self._envelope_from_index_offsets = [
-
0, 0, 119, 238, 240, 265, 384, 441,
-
443, 468, 548, 605, 724, 726, 751, 870,
-
927, 929, 954, 1034, 1091, 1210, 1329, 1331,
-
1356, 1475, 1514, 1516, 1541, 1621, 1660, 1779,
-
1781, 1806, 1925, 2044, 2046, 2048, 2050, 2103,
-
2110, 2112, 2114, 2164, 2166, 2191, 2241, 2291,
-
2324, 2326, 2351, 2401, 2403, 2428, 2478, 2489,
-
2540, 2542, 2567, 2618, 2668, 2670, 2695, 2745,
-
2756, 2807, 2809, 2834, 2885, 2887, 2912, 2963,
-
2974, 2976, 3001, 3051, 3053, 3078, 3128, 3139,
-
3172, 3174, 3199, 3249, 3251, 3276, 3326, 3359,
-
3410, 3443, 3445, 3447, 3449, 3451, 3453, 3475,
-
3477, 3481, 3483, 3492, 3494, 3496, 3498, 3500,
-
3502, 3504, 3506, 3508, 3530, 3532, 3547, 3549,
-
3551, 3553, 3555, 3683, 3811, 3813, 3838, 3957,
-
3990, 3992, 4017, 4097, 4130, 4225, 4354, 4356,
-
4381, 4500, 4619, 4747, 4749, 4774, 4903, 5031,
-
5159, 5161, 5186, 5315, 5434, 5562, 5690, 5692,
-
5717, 5836, 5893, 5895, 5920, 6000, 6057, 6186,
-
6188, 6213, 6332, 6451, 6453, 6478, 6597, 6716,
-
6835, 6954, 7073, 7153, 7168, 7184, 7206, 7325,
-
7444, 7563, 7682, 7801, 7920, 8039, 8158, 8277,
-
8405, 8533, 8535, 8560, 8679, 8808, 8936, 8938,
-
8963, 9091, 9219, 9221, 9246, 9365, 9422, 9424,
-
9449, 9529, 9586, 9715, 9843, 9845, 9870, 9927,
-
9929, 9954, 10034, 10091, 10210, 10305, 10307, 10309,
-
10366, 10385, 10513, 10641, 10643, 10668, 10797, 10847,
-
10880, 10913
-
]
-
-
1
class << self
-
1
attr_accessor :_envelope_from_indicies
-
1
private :_envelope_from_indicies, :_envelope_from_indicies=
-
end
-
1
self._envelope_from_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
3, 4, 3, 3, 3, 3, 3, 5,
-
1, 3, 3, 1, 3, 6, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 1, 7, 3, 1, 3, 1,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 8,
-
1, 1, 1, 9, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 8, 10,
-
11, 10, 10, 10, 10, 10, 12, 1,
-
10, 10, 1, 10, 13, 10, 10, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
1, 1, 1, 10, 1, 10, 1, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
10, 1, 1, 1, 10, 10, 10, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
10, 10, 10, 10, 10, 10, 10, 10,
-
10, 10, 10, 10, 10, 1, 14, 1,
-
8, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 8,
-
1, 15, 1, 1, 1, 16, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
17, 18, 19, 18, 18, 18, 18, 18,
-
20, 1, 18, 18, 1, 18, 21, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 1, 1, 1, 18, 1, 18,
-
22, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 1, 1, 1, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 1,
-
23, 1, 1, 1, 24, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 25,
-
1, 1, 1, 1, 1, 1, 1, 26,
-
1, 1, 1, 1, 1, 27, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 28,
-
1, 29, 1, 23, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 23, 1, 23, 1, 1, 1,
-
24, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 25, 1, 1, 1, 1,
-
1, 1, 1, 26, 1, 1, 1, 1,
-
1, 27, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 28, 1, 1, 1, 1,
-
1, 30, 1, 1, 1, 1, 1, 1,
-
31, 1, 1, 1, 1, 1, 32, 33,
-
1, 1, 34, 1, 35, 1, 1, 1,
-
36, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 37, 1, 1, 1, 1,
-
1, 1, 1, 38, 1, 1, 1, 1,
-
1, 39, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 40, 1, 27, 1, 1,
-
1, 41, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 27, 42, 43, 42,
-
42, 42, 42, 42, 44, 1, 42, 42,
-
1, 42, 1, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 1, 1,
-
1, 42, 1, 42, 1, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 1,
-
1, 1, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 1, 45, 1, 27, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 27, 1, 46,
-
1, 1, 1, 47, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 48, 42,
-
1, 42, 42, 42, 42, 42, 49, 1,
-
42, 42, 1, 42, 27, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
1, 1, 1, 42, 1, 42, 50, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 1, 1, 1, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 46, 1,
-
1, 1, 47, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 48, 1, 1,
-
1, 1, 1, 1, 1, 49, 1, 1,
-
1, 1, 1, 27, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 50, 1, 51,
-
1, 46, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
46, 1, 46, 1, 1, 1, 47, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 48, 1, 1, 1, 1, 1, 1,
-
1, 49, 1, 1, 1, 1, 1, 27,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 50, 1, 1, 1, 1, 1, 30,
-
1, 1, 1, 1, 1, 1, 31, 1,
-
1, 1, 1, 1, 32, 33, 1, 1,
-
34, 1, 52, 1, 1, 1, 53, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 54, 1, 1, 1, 1, 1, 1,
-
1, 55, 1, 1, 1, 1, 1, 39,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 56, 1, 57, 1, 1, 1, 58,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 57, 59, 60, 59, 59, 59,
-
59, 59, 61, 1, 59, 59, 1, 59,
-
62, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 1, 1, 1, 59,
-
1, 59, 1, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 63, 1, 1,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 59, 59, 59, 59, 59, 59, 59,
-
59, 1, 64, 1, 1, 1, 65, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 64, 66, 67, 66, 66, 66, 66,
-
66, 68, 1, 66, 66, 1, 66, 69,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 1, 1, 1, 66, 1,
-
66, 1, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 70, 1, 1, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
1, 71, 1, 64, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 64, 1, 72, 1, 1, 1,
-
73, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 74, 66, 67, 66, 66,
-
66, 66, 66, 75, 1, 66, 66, 1,
-
66, 76, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 1, 1, 1,
-
66, 1, 66, 1, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 1, 1,
-
1, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 1, 72, 1, 1, 1, 73,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 74, 1, 1, 1, 1, 1,
-
1, 1, 75, 1, 1, 1, 1, 1,
-
77, 1, 78, 1, 72, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 72, 1, 72, 1, 1,
-
1, 73, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 74, 1, 1, 1,
-
1, 1, 1, 1, 75, 1, 1, 1,
-
1, 1, 77, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 30, 1, 1, 1, 1, 1,
-
1, 31, 1, 1, 1, 1, 1, 32,
-
33, 1, 1, 34, 1, 79, 1, 1,
-
1, 80, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 81, 1, 1, 1,
-
1, 1, 1, 1, 82, 1, 1, 1,
-
1, 1, 83, 1, 77, 1, 1, 1,
-
84, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 77, 85, 1, 85, 85,
-
85, 85, 85, 86, 1, 85, 85, 1,
-
85, 1, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 1, 1, 1,
-
85, 1, 85, 1, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 1, 1,
-
1, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 1, 87, 1, 77, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 77, 1, 72, 1,
-
1, 1, 73, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 74, 85, 1,
-
85, 85, 85, 85, 85, 75, 1, 85,
-
85, 1, 85, 77, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 1,
-
1, 1, 85, 1, 85, 1, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
1, 1, 1, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 85, 85, 85, 85,
-
85, 85, 85, 85, 1, 83, 1, 1,
-
1, 88, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 83, 89, 1, 89,
-
89, 89, 89, 89, 90, 1, 89, 89,
-
1, 89, 1, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 1, 1,
-
1, 89, 1, 89, 1, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 1,
-
1, 1, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 1, 91, 1, 92, 1,
-
93, 1, 93, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 94, 1, 1, 95, 1,
-
96, 1, 1, 1, 97, 1, 1, 98,
-
99, 100, 1, 1, 1, 101, 1, 102,
-
1, 1, 1, 1, 103, 1, 104, 1,
-
105, 1, 105, 1, 1, 1, 106, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 105, 1, 1, 1, 1, 1, 1,
-
1, 107, 1, 1, 1, 1, 1, 1,
-
1, 108, 108, 108, 108, 108, 108, 108,
-
108, 108, 108, 1, 109, 1, 105, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 105, 1, 110,
-
1, 1, 1, 111, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 110, 1,
-
1, 1, 1, 1, 1, 1, 112, 1,
-
1, 1, 1, 1, 1, 1, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
1, 114, 1, 1, 1, 115, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
116, 1, 1, 1, 1, 1, 1, 1,
-
117, 1, 1, 1, 1, 1, 1, 1,
-
114, 114, 114, 114, 114, 114, 114, 114,
-
114, 114, 1, 114, 1, 1, 1, 115,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 116, 1, 1, 1, 1, 1,
-
1, 1, 117, 1, 118, 1, 114, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 114, 1, 116,
-
1, 1, 1, 119, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 116, 1,
-
1, 1, 1, 1, 1, 1, 120, 1,
-
1, 1, 1, 1, 1, 1, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
1, 122, 1, 116, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 116, 1, 123, 1, 1, 1,
-
124, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 123, 1, 1, 1, 1,
-
1, 1, 1, 125, 1, 1, 1, 1,
-
1, 1, 1, 126, 126, 126, 126, 126,
-
126, 126, 126, 126, 126, 1, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
1, 127, 1, 1, 1, 128, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
127, 1, 1, 1, 1, 1, 1, 1,
-
129, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 130, 1, 131, 1, 127, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 127, 1, 132,
-
1, 1, 1, 133, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 132, 1,
-
1, 1, 1, 1, 1, 1, 134, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
135, 1, 130, 1, 1, 1, 136, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 130, 1, 1, 1, 1, 1, 1,
-
1, 137, 1, 1, 1, 1, 1, 1,
-
1, 138, 138, 138, 138, 138, 138, 138,
-
138, 138, 138, 1, 139, 1, 130, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 130, 1, 135,
-
1, 1, 1, 140, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 135, 1,
-
1, 1, 1, 1, 1, 1, 141, 1,
-
1, 1, 1, 1, 1, 1, 142, 142,
-
142, 142, 142, 142, 142, 142, 142, 142,
-
1, 143, 143, 143, 143, 143, 143, 143,
-
143, 143, 143, 1, 143, 1, 1, 1,
-
144, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 145, 1, 1, 1, 1,
-
1, 1, 1, 146, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 147, 1, 148,
-
1, 143, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
143, 1, 145, 1, 1, 1, 149, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 145, 1, 1, 1, 1, 1, 1,
-
1, 150, 1, 1, 1, 1, 1, 1,
-
1, 151, 151, 151, 151, 151, 151, 151,
-
151, 151, 151, 147, 1, 152, 1, 145,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 145, 1,
-
153, 1, 1, 1, 154, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 153,
-
1, 1, 1, 1, 1, 1, 1, 155,
-
1, 1, 1, 1, 1, 1, 1, 156,
-
156, 156, 156, 156, 156, 156, 156, 156,
-
156, 157, 1, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 1, 159, 1,
-
160, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 160,
-
1, 147, 1, 1, 1, 161, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
147, 1, 1, 1, 1, 1, 1, 1,
-
162, 1, 1, 1, 1, 1, 1, 1,
-
163, 163, 163, 163, 163, 163, 163, 163,
-
163, 163, 1, 164, 1, 147, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 147, 1, 157, 1,
-
1, 1, 165, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 157, 1, 1,
-
1, 1, 1, 1, 1, 166, 1, 1,
-
1, 1, 1, 1, 1, 167, 167, 167,
-
167, 167, 167, 167, 167, 167, 167, 1,
-
168, 168, 168, 168, 168, 168, 168, 168,
-
168, 168, 1, 168, 1, 1, 1, 169,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 170, 1, 1, 1, 1, 1,
-
1, 1, 171, 1, 172, 1, 168, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 168, 1, 170,
-
1, 1, 1, 173, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 170, 1,
-
1, 1, 1, 1, 1, 1, 174, 1,
-
1, 1, 1, 1, 1, 1, 151, 151,
-
151, 151, 151, 151, 151, 151, 151, 151,
-
1, 175, 1, 170, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 170, 1, 176, 1, 1, 1,
-
177, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 176, 1, 1, 1, 1,
-
1, 1, 1, 178, 1, 1, 1, 1,
-
1, 1, 1, 156, 156, 156, 156, 156,
-
156, 156, 156, 156, 156, 1, 179, 1,
-
1, 1, 180, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 176, 1, 1,
-
1, 1, 1, 1, 1, 181, 1, 182,
-
1, 1, 1, 183, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 153, 1,
-
1, 1, 1, 1, 1, 1, 184, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
157, 1, 185, 1, 1, 1, 186, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 123, 1, 1, 1, 1, 1, 1,
-
1, 187, 1, 104, 1, 188, 1, 104,
-
1, 189, 1, 104, 1, 190, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 191, 1, 104, 1, 104, 1, 104,
-
1, 192, 1, 104, 1, 1, 1, 1,
-
1, 1, 104, 1, 193, 1, 104, 1,
-
194, 1, 104, 1, 195, 1, 104, 1,
-
196, 1, 92, 1, 197, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
196, 1, 92, 1, 198, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 199, 1, 92, 1, 92, 1, 200,
-
1, 92, 1, 201, 201, 201, 201, 201,
-
201, 201, 201, 67, 1, 201, 201, 202,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 67, 201, 1, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 203, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 1, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 1, 201, 201, 204,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 205, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 203, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 201, 201, 201, 201, 201, 201,
-
201, 201, 1, 206, 1, 201, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 201, 1, 207, 1,
-
1, 1, 208, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 209, 205, 67,
-
205, 205, 205, 205, 205, 210, 1, 205,
-
205, 1, 205, 69, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 1,
-
1, 1, 205, 1, 205, 1, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
1, 1, 1, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 1, 207, 1, 1,
-
1, 208, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 209, 1, 1, 1,
-
1, 1, 1, 1, 210, 1, 211, 1,
-
207, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 207,
-
1, 207, 1, 1, 1, 208, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
209, 1, 1, 1, 1, 1, 1, 1,
-
210, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 30, 1,
-
1, 1, 1, 1, 1, 31, 1, 1,
-
1, 1, 1, 32, 33, 1, 1, 34,
-
1, 212, 1, 1, 1, 213, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
214, 1, 1, 1, 1, 1, 1, 1,
-
215, 1, 205, 67, 205, 205, 205, 205,
-
205, 1, 1, 205, 205, 1, 205, 69,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 1, 1, 1, 205, 1,
-
205, 1, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 1, 1, 1, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
205, 205, 205, 205, 205, 205, 205, 205,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 201, 216, 1, 67, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 67, 1, 77, 1, 1,
-
1, 84, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 77, 66, 67, 66,
-
66, 66, 66, 66, 86, 1, 66, 66,
-
1, 66, 69, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 1, 1,
-
1, 66, 1, 66, 1, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 1,
-
1, 1, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 1, 217, 1, 1, 1,
-
218, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 217, 219, 220, 219, 219,
-
219, 219, 219, 221, 1, 219, 219, 1,
-
219, 222, 219, 219, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 1, 1, 1,
-
219, 1, 219, 1, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 219, 223, 1,
-
1, 219, 219, 219, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 219, 219, 219,
-
219, 219, 219, 219, 219, 219, 219, 219,
-
219, 219, 1, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 1, 70, 70, 224,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 1, 225, 207,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 70, 70, 70, 70, 70, 70,
-
70, 70, 1, 226, 1, 70, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 70, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 70, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
1, 227, 227, 228, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
229, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 230, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 227, 227,
-
227, 227, 227, 227, 227, 227, 1, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
1, 231, 231, 232, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
233, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 234, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 231, 231,
-
231, 231, 231, 231, 231, 231, 1, 235,
-
1, 231, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
231, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 231, 39, 1, 1, 1, 236,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 39, 237, 238, 237, 237, 237,
-
237, 237, 239, 1, 237, 237, 1, 237,
-
1, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 1, 1, 1, 237,
-
1, 237, 1, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 1, 1, 1,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 1, 240, 240, 240, 240, 240, 240,
-
240, 240, 19, 1, 240, 240, 241, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 19, 240, 1, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 242, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 1, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 1, 240, 240, 243, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 244, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 242, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 240, 240, 240, 240, 240, 240, 240,
-
240, 1, 245, 1, 240, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 240, 1, 246, 1, 1,
-
1, 247, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 248, 244, 19, 244,
-
244, 244, 244, 244, 249, 1, 244, 244,
-
1, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 1, 1,
-
1, 244, 1, 244, 22, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 1,
-
1, 1, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 1, 250, 1, 1, 1,
-
251, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 252, 1, 1, 1, 1,
-
1, 1, 1, 253, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 28, 1, 254, 1, 250,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 250, 1,
-
250, 1, 1, 1, 251, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 252,
-
1, 1, 1, 1, 1, 1, 1, 253,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 28,
-
1, 1, 1, 1, 1, 30, 1, 1,
-
1, 1, 1, 1, 31, 1, 1, 1,
-
1, 1, 32, 33, 1, 1, 34, 1,
-
255, 1, 1, 1, 256, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 257,
-
1, 1, 1, 1, 1, 1, 1, 258,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 40,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 240, 259, 1, 19, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 19, 1, 260, 1, 1,
-
1, 261, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 262, 18, 263, 18,
-
18, 18, 18, 18, 264, 1, 18, 18,
-
1, 18, 244, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 1, 1,
-
1, 18, 1, 18, 22, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 1,
-
1, 1, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 1, 265, 1, 1, 1,
-
266, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 267, 42, 43, 42, 42,
-
42, 42, 42, 268, 1, 42, 42, 1,
-
42, 1, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 1, 1,
-
42, 1, 42, 28, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 1, 1,
-
1, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 1, 269, 1, 265, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 265, 1, 265, 1,
-
1, 1, 266, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 267, 42, 43,
-
42, 42, 42, 42, 42, 268, 1, 42,
-
42, 1, 42, 1, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 1,
-
1, 1, 42, 1, 42, 28, 42, 42,
-
42, 42, 42, 270, 42, 42, 42, 42,
-
42, 42, 271, 42, 42, 42, 42, 42,
-
272, 273, 42, 42, 274, 42, 42, 42,
-
1, 1, 1, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 275, 1, 1,
-
1, 276, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 277, 237, 238, 237,
-
237, 237, 237, 237, 278, 1, 237, 237,
-
1, 237, 1, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 1, 1,
-
1, 237, 1, 237, 40, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 1,
-
1, 1, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 237, 237, 237, 237, 237,
-
237, 237, 237, 1, 46, 1, 1, 1,
-
47, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 48, 42, 1, 42, 42,
-
42, 42, 42, 49, 1, 42, 42, 1,
-
42, 27, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 1, 1,
-
42, 1, 42, 50, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 1, 1,
-
1, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 279, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 1, 46, 1, 1, 1, 47,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 48, 42, 1, 42, 42, 42,
-
42, 42, 49, 1, 42, 42, 1, 42,
-
27, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 1, 1, 42,
-
1, 42, 50, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 1, 1,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 280, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 1, 46, 1, 1, 1, 47, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 281, 42, 1, 42, 42, 42, 42,
-
42, 49, 1, 42, 42, 1, 42, 27,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 1, 1, 1, 42, 1,
-
42, 50, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 1, 1, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
1, 46, 1, 1, 1, 47, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
281, 1, 1, 1, 1, 1, 1, 1,
-
49, 1, 1, 1, 1, 1, 27, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
50, 94, 1, 1, 95, 1, 282, 1,
-
1, 1, 97, 1, 1, 283, 99, 100,
-
1, 1, 1, 284, 33, 1, 1, 34,
-
1, 189, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 91, 1,
-
192, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 196, 1,
-
197, 1, 1, 1, 195, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 196, 1, 46, 1,
-
1, 1, 47, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 48, 42, 1,
-
42, 42, 42, 42, 42, 49, 1, 42,
-
42, 1, 42, 27, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 1,
-
1, 1, 42, 1, 42, 50, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
1, 1, 1, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 285, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 46, 1, 1,
-
1, 47, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 48, 42, 1, 42,
-
42, 42, 42, 42, 49, 1, 42, 42,
-
1, 42, 27, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 1, 1,
-
1, 42, 1, 42, 50, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 1,
-
1, 1, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 280, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 1, 46, 1, 1, 1,
-
47, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 48, 42, 1, 42, 42,
-
42, 42, 42, 49, 1, 42, 42, 1,
-
42, 27, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 1, 1,
-
42, 1, 42, 50, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 1, 1,
-
1, 42, 42, 42, 286, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
285, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 1, 46, 1, 1, 1, 47,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 48, 42, 1, 42, 42, 42,
-
42, 42, 49, 1, 42, 42, 1, 42,
-
27, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 1, 1, 42,
-
1, 42, 50, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 1, 1,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 280, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 1, 46, 1, 1, 1, 47, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 48, 42, 1, 42, 42, 42, 42,
-
42, 49, 1, 42, 42, 1, 42, 27,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 1, 1, 1, 42, 1,
-
42, 50, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 1, 1, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 287, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 288, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
1, 46, 1, 1, 1, 47, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
48, 42, 1, 42, 42, 42, 42, 42,
-
49, 1, 42, 42, 1, 42, 27, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 1, 1, 1, 42, 1, 42,
-
50, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 1, 1, 1, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 280, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 1,
-
46, 1, 1, 1, 47, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 48,
-
42, 1, 42, 42, 42, 42, 42, 49,
-
1, 42, 42, 1, 42, 27, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 1, 1, 1, 42, 1, 42, 50,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 1, 1, 1, 42, 42, 42,
-
42, 42, 42, 42, 280, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 1, 46,
-
1, 1, 1, 47, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 48, 42,
-
1, 42, 42, 42, 42, 42, 49, 1,
-
42, 42, 1, 42, 27, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
1, 1, 1, 42, 1, 42, 50, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 1, 1, 1, 42, 42, 42, 42,
-
42, 42, 42, 289, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 1, 46, 1,
-
1, 1, 47, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 48, 42, 1,
-
42, 42, 42, 42, 42, 49, 1, 42,
-
42, 1, 42, 27, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 1,
-
1, 1, 42, 1, 42, 50, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
1, 1, 1, 42, 42, 42, 42, 42,
-
42, 280, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 42, 42, 42, 42,
-
42, 42, 42, 42, 1, 290, 290, 290,
-
290, 290, 290, 290, 290, 291, 1, 290,
-
290, 292, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 291, 290, 229, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
293, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 290, 290, 290, 290,
-
290, 290, 290, 290, 1, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 1, 294,
-
294, 295, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 296, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
297, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 1, 298, 1, 294,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 294, 1,
-
15, 1, 1, 1, 16, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 17,
-
244, 19, 244, 244, 244, 244, 244, 20,
-
1, 244, 244, 1, 244, 21, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 1, 1, 1, 244, 1, 244, 22,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 1, 1, 1, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
299, 1, 294, 294, 300, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 299,
-
294, 233, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 297, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 294,
-
294, 294, 294, 294, 294, 294, 294, 1,
-
301, 1, 299, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 299, 1, 302, 302, 302, 302, 302,
-
302, 302, 302, 303, 1, 302, 302, 304,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 303, 302, 305, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 306, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 302, 302, 302, 302, 302, 302,
-
302, 302, 1, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 1, 307, 307, 308,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 309, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 310, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 1, 311, 1, 307, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 307, 1, 312, 1,
-
1, 1, 313, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 314, 244, 19,
-
244, 244, 244, 244, 244, 315, 1, 244,
-
244, 1, 244, 21, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 1,
-
1, 1, 244, 1, 244, 316, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
1, 1, 1, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 1, 317, 1, 1,
-
1, 318, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 319, 1, 1, 1,
-
1, 1, 1, 1, 320, 1, 1, 1,
-
1, 1, 27, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 321, 1, 322, 1,
-
317, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 317,
-
1, 317, 1, 1, 1, 318, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
319, 1, 1, 1, 1, 1, 1, 1,
-
320, 1, 1, 1, 1, 1, 27, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
321, 1, 1, 1, 1, 1, 30, 1,
-
1, 1, 1, 1, 1, 31, 1, 1,
-
1, 1, 1, 32, 33, 1, 1, 34,
-
1, 323, 1, 1, 1, 324, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
325, 1, 1, 1, 1, 1, 1, 1,
-
326, 1, 1, 1, 1, 1, 39, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
327, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 328, 1, 307, 307, 329,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 328, 307, 330, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 310, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 307, 307, 307, 307, 307, 307,
-
307, 307, 1, 331, 1, 328, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 328, 1, 332, 1,
-
1, 1, 333, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 334, 1, 1,
-
1, 1, 1, 1, 1, 335, 1, 1,
-
1, 1, 1, 27, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 336, 1, 337,
-
1, 332, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
332, 1, 332, 1, 1, 1, 333, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 334, 1, 1, 1, 1, 1, 1,
-
1, 335, 1, 1, 1, 1, 1, 27,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 336, 1, 1, 1, 1, 1, 30,
-
1, 1, 1, 1, 1, 1, 31, 1,
-
1, 1, 1, 1, 32, 33, 1, 1,
-
34, 1, 338, 1, 1, 1, 339, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 340, 1, 1, 1, 1, 1, 1,
-
1, 341, 1, 1, 1, 1, 1, 39,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 342, 1, 343, 1, 1, 1, 344,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 343, 345, 346, 345, 345, 345,
-
345, 345, 347, 1, 345, 345, 1, 345,
-
348, 345, 345, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 1, 1, 1, 345,
-
1, 345, 1, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 345, 1, 1, 1,
-
345, 345, 345, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 345, 345, 345, 345,
-
345, 345, 345, 345, 345, 345, 345, 345,
-
345, 1, 244, 19, 244, 244, 244, 244,
-
244, 1, 1, 244, 244, 1, 244, 349,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 1, 1, 1, 244, 1,
-
244, 1, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 1, 1, 1, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
244, 244, 244, 244, 244, 244, 244, 244,
-
1, 350, 1, 351, 1, 352, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 30, 1, 1, 1, 1,
-
1, 1, 31, 1, 1, 1, 1, 1,
-
32, 33, 1, 1, 34, 1, 30, 1,
-
1, 1, 1, 1, 1, 31, 1, 1,
-
1, 1, 1, 32, 33, 1, 1, 34,
-
1, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 1, 353, 353, 354, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
355, 356, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 357, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
353, 353, 353, 353, 353, 353, 353, 353,
-
1, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 1, 358, 358, 359, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
360, 361, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 362, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
358, 358, 358, 358, 358, 358, 358, 358,
-
1, 363, 1, 358, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 358, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 358, 160, 1, 1,
-
1, 364, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 160, 1, 1, 1,
-
1, 1, 1, 1, 365, 1, 1, 1,
-
1, 1, 1, 1, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 1, 160,
-
1, 1, 1, 364, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 160, 1,
-
1, 1, 1, 1, 1, 1, 365, 1,
-
366, 1, 1, 1, 367, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 366,
-
1, 1, 1, 1, 1, 1, 1, 368,
-
1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_envelope_from_trans_targs
-
1
private :_envelope_from_trans_targs, :_envelope_from_trans_targs=
-
end
-
1
self._envelope_from_trans_targs = [
-
2, 0, 3, 5, 184, 203, 204, 205,
-
2, 3, 5, 184, 203, 204, 4, 6,
-
7, 9, 5, 140, 10, 153, 20, 6,
-
7, 9, 10, 11, 20, 8, 35, 105,
-
107, 109, 112, 6, 7, 9, 10, 11,
-
20, 12, 14, 134, 139, 13, 15, 16,
-
18, 19, 20, 17, 15, 16, 18, 19,
-
20, 21, 22, 24, 114, 129, 124, 130,
-
21, 22, 24, 114, 129, 124, 130, 23,
-
25, 26, 28, 29, 128, 30, 27, 25,
-
26, 28, 29, 30, 31, 33, 34, 32,
-
31, 33, 34, 36, 37, 38, 39, 90,
-
92, 94, 97, 99, 101, 103, 40, 89,
-
41, 42, 43, 45, 46, 44, 42, 43,
-
45, 46, 47, 48, 50, 88, 49, 51,
-
53, 54, 52, 50, 51, 53, 54, 55,
-
56, 58, 59, 57, 55, 56, 58, 59,
-
60, 62, 63, 61, 60, 62, 63, 64,
-
65, 67, 87, 74, 66, 68, 70, 71,
-
69, 67, 68, 70, 71, 74, 214, 73,
-
215, 75, 77, 78, 76, 75, 77, 78,
-
79, 80, 82, 86, 81, 83, 85, 84,
-
82, 83, 85, 79, 80, 86, 64, 65,
-
87, 47, 48, 88, 91, 93, 95, 96,
-
98, 100, 102, 104, 106, 108, 110, 111,
-
113, 115, 126, 125, 116, 118, 117, 119,
-
120, 122, 123, 121, 119, 120, 122, 123,
-
127, 21, 22, 24, 114, 129, 124, 130,
-
131, 133, 132, 135, 136, 15, 138, 135,
-
136, 15, 138, 137, 12, 14, 134, 139,
-
141, 151, 150, 142, 144, 143, 145, 146,
-
148, 149, 145, 146, 148, 149, 147, 145,
-
146, 148, 149, 152, 154, 155, 157, 175,
-
158, 154, 155, 157, 158, 156, 159, 166,
-
168, 170, 173, 154, 155, 157, 158, 160,
-
161, 162, 163, 164, 165, 167, 169, 171,
-
172, 174, 176, 181, 182, 180, 176, 177,
-
179, 180, 178, 181, 182, 183, 185, 195,
-
196, 198, 194, 185, 186, 188, 194, 187,
-
189, 190, 192, 193, 20, 189, 190, 192,
-
193, 20, 191, 189, 190, 192, 193, 20,
-
195, 196, 198, 197, 198, 199, 201, 202,
-
20, 200, 198, 199, 201, 202, 20, 2,
-
3, 5, 184, 203, 204, 204, 206, 207,
-
208, 210, 211, 210, 217, 213, 210, 211,
-
210, 217, 213, 212, 72, 216, 215, 72,
-
216
-
]
-
-
1
class << self
-
1
attr_accessor :_envelope_from_trans_actions
-
1
private :_envelope_from_trans_actions, :_envelope_from_trans_actions=
-
end
-
1
self._envelope_from_trans_actions = [
-
1, 0, 1, 1, 1, 2, 1, 3,
-
0, 0, 4, 4, 5, 4, 0, 6,
-
6, 7, 0, 0, 8, 0, 9, 0,
-
0, 10, 5, 0, 11, 0, 12, 12,
-
12, 12, 12, 13, 13, 14, 15, 13,
-
16, 0, 0, 0, 5, 0, 0, 0,
-
17, 5, 0, 0, 13, 13, 18, 15,
-
13, 19, 19, 19, 19, 20, 19, 19,
-
0, 0, 0, 0, 5, 0, 0, 0,
-
0, 0, 21, 5, 0, 0, 0, 13,
-
13, 22, 15, 13, 0, 0, 5, 0,
-
13, 13, 15, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 5, 0, 0, 13, 13,
-
15, 13, 0, 0, 0, 5, 0, 0,
-
5, 0, 0, 13, 13, 15, 13, 0,
-
0, 5, 0, 0, 13, 13, 15, 13,
-
0, 5, 0, 0, 13, 15, 13, 0,
-
0, 0, 5, 0, 0, 0, 5, 0,
-
0, 13, 13, 15, 13, 13, 0, 0,
-
0, 0, 5, 0, 0, 13, 15, 13,
-
0, 0, 0, 5, 0, 0, 5, 0,
-
13, 13, 15, 13, 13, 15, 13, 13,
-
15, 13, 13, 15, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 21, 5, 0, 13, 13, 22, 15,
-
0, 13, 13, 13, 13, 15, 13, 13,
-
0, 0, 0, 23, 23, 24, 23, 0,
-
0, 25, 0, 0, 13, 13, 13, 15,
-
0, 0, 0, 0, 0, 0, 6, 6,
-
7, 8, 0, 0, 10, 5, 0, 13,
-
13, 14, 15, 0, 6, 6, 7, 0,
-
8, 0, 0, 10, 5, 0, 12, 12,
-
12, 12, 12, 13, 13, 14, 15, 0,
-
0, 17, 12, 12, 12, 0, 0, 0,
-
0, 0, 23, 23, 23, 23, 0, 0,
-
25, 0, 0, 0, 0, 0, 23, 23,
-
23, 24, 23, 0, 0, 25, 0, 0,
-
6, 6, 26, 8, 27, 0, 0, 28,
-
5, 29, 0, 13, 13, 30, 15, 31,
-
0, 0, 25, 0, 0, 0, 32, 5,
-
33, 0, 13, 13, 34, 15, 35, 13,
-
13, 36, 36, 15, 36, 0, 0, 17,
-
17, 37, 37, 38, 39, 37, 0, 0,
-
5, 40, 0, 0, 0, 5, 13, 13,
-
15
-
]
-
-
1
class << self
-
1
attr_accessor :_envelope_from_eof_actions
-
1
private :_envelope_from_eof_actions, :_envelope_from_eof_actions=
-
end
-
1
self._envelope_from_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 41, 41,
-
42, 0
-
]
-
-
1
class << self
-
1
attr_accessor :envelope_from_start
-
end
-
1
self.envelope_from_start = 1;
-
1
class << self
-
1
attr_accessor :envelope_from_first_final
-
end
-
1
self.envelope_from_first_final = 214;
-
1
class << self
-
1
attr_accessor :envelope_from_error
-
end
-
1
self.envelope_from_error = 0;
-
-
1
class << self
-
1
attr_accessor :envelope_from_en_comment_tail
-
end
-
1
self.envelope_from_en_comment_tail = 209;
-
1
class << self
-
1
attr_accessor :envelope_from_en_main
-
end
-
1
self.envelope_from_en_main = 1;
-
-
-
# line 17 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
-
-
1
def self.parse(data)
-
p = 0
-
eof = data.length
-
stack = []
-
-
actions = []
-
data_unpacked = data.bytes.to_a
-
-
# line 1721 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
-
begin
-
p ||= 0
-
pe ||= data.length
-
cs = envelope_from_start
-
top = 0
-
end
-
-
# line 26 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
-
-
# line 1731 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
-
begin
-
testEof = false
-
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
_goto_level = 0
-
_resume = 10
-
_eof_trans = 15
-
_again = 20
-
_test_eof = 30
-
_out = 40
-
while true
-
if _goto_level <= 0
-
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
if _goto_level <= _resume
-
_keys = cs << 1
-
_inds = _envelope_from_index_offsets[cs]
-
_slen = _envelope_from_key_spans[cs]
-
_trans = if ( _slen > 0 &&
-
_envelope_from_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
( data_unpacked[p]) <= _envelope_from_trans_keys[_keys + 1]
-
) then
-
_envelope_from_indicies[ _inds + ( data_unpacked[p]) - _envelope_from_trans_keys[_keys] ]
-
else
-
_envelope_from_indicies[ _inds + _slen ]
-
end
-
cs = _envelope_from_trans_targs[_trans]
-
if _envelope_from_trans_actions[_trans] != 0
-
case _envelope_from_trans_actions[_trans]
-
when 17 then
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 3 then
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
when 13 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 37 then
-
# line 8 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 12 then
-
# line 10 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(7, p) end
-
when 19 then
-
# line 16 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 11 then
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 6 then
-
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
when 4 then
-
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 33 then
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 25 then
-
# line 41 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 23 then
-
# line 42 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 5 then
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 209
-
_goto_level = _again
-
next
-
end
-
end
-
when 40 then
-
# line 6 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 1 then
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 18 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 16 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 36 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 35 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 15 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 209
-
_goto_level = _again
-
next
-
end
-
end
-
when 38 then
-
# line 8 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 209
-
_goto_level = _again
-
next
-
end
-
end
-
when 39 then
-
# line 8 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 21 then
-
# line 15 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 20 then
-
# line 16 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 209
-
_goto_level = _again
-
next
-
end
-
end
-
when 10 then
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 29 then
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 9 then
-
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 8 then
-
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 209
-
_goto_level = _again
-
next
-
end
-
end
-
when 32 then
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 24 then
-
# line 42 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 2 then
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(2, p) end
-
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 209
-
_goto_level = _again
-
next
-
end
-
end
-
when 22 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 14 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 31 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 34 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 28 then
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 7 then
-
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 27 then
-
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 30 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
when 26 then
-
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(1, p) end
-
# line 2095 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
-
end
-
end
-
end
-
if _goto_level <= _again
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
p += 1
-
if p != pe
-
_goto_level = _resume
-
next
-
end
-
end
-
if _goto_level <= _test_eof
-
if p == eof
-
case _envelope_from_eof_actions[cs]
-
when 41 then
-
# line 9 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(6, p) end
-
when 42 then
-
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 9 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(6, p) end
-
# line 2124 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
-
end
-
end
-
-
end
-
if _goto_level <= _out
-
break
-
end
-
end
-
end
-
-
# line 27 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 2138 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
-
214
-
# line 28 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
-
-
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module MessageIdsMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb"
-
1
class << self
-
1
attr_accessor :_message_ids_trans_keys
-
1
private :_message_ids_trans_keys, :_message_ids_trans_keys=
-
end
-
1
self._message_ids_trans_keys = [
-
0, 0, 9, 60, 10, 10,
-
9, 32, 9, 60, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 9, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 62, 10, 10, 9,
-
32, 9, 62, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 62, 10, 10, 9,
-
32, 9, 62, 33, 126,
-
-128, -1, 10, 10, 9, 32,
-
9, 126, 9, 126, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 9, 126, 9, 126,
-
33, 126, 33, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, -128, -1, 9, 126,
-
1, 127, 1, 127, 10,
-
10, 9, 32, 9, 126,
-
9, 64, 10, 10, 9, 32,
-
9, 64, -128, -1, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
9, 126, -128, -1, 1, 127,
-
10, 10, 9, 32, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9, 64,
-
10, 10, 9, 32, 9,
-
64, -128, -1, 1, 127,
-
10, 10, 9, 32, 9, 64,
-
10, 10, 9, 32, 9,
-
64, 9, 126, 33, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, -128, -1, 9,
-
60, 9, 60, 9, 60,
-
0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_message_ids_key_spans
-
1
private :_message_ids_key_spans, :_message_ids_key_spans=
-
end
-
1
self._message_ids_key_spans = [
-
0, 52, 1, 24, 52, 118, 118, 1,
-
24, 118, 56, 1, 24, 56, 118, 1,
-
24, 118, 56, 1, 24, 56, 118, 118,
-
1, 24, 118, 54, 1, 24, 54, 118,
-
1, 24, 118, 1, 24, 118, 127, 127,
-
1, 24, 118, 54, 1, 24, 54, 94,
-
128, 1, 24, 118, 118, 127, 1, 24,
-
128, 118, 118, 94, 94, 127, 127, 1,
-
24, 128, 118, 127, 127, 1, 24, 118,
-
56, 1, 24, 56, 128, 1, 24, 118,
-
118, 1, 24, 118, 127, 127, 1, 24,
-
118, 128, 127, 1, 24, 127, 127, 1,
-
24, 118, 56, 1, 24, 56, 128, 127,
-
1, 24, 56, 1, 24, 56, 118, 94,
-
127, 127, 1, 24, 128, 52, 52, 52,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :_message_ids_index_offsets
-
1
private :_message_ids_index_offsets, :_message_ids_index_offsets=
-
end
-
1
self._message_ids_index_offsets = [
-
0, 0, 53, 55, 80, 133, 252, 371,
-
373, 398, 517, 574, 576, 601, 658, 777,
-
779, 804, 923, 980, 982, 1007, 1064, 1183,
-
1302, 1304, 1329, 1448, 1503, 1505, 1530, 1585,
-
1704, 1706, 1731, 1850, 1852, 1877, 1996, 2124,
-
2252, 2254, 2279, 2398, 2453, 2455, 2480, 2535,
-
2630, 2759, 2761, 2786, 2905, 3024, 3152, 3154,
-
3179, 3308, 3427, 3546, 3641, 3736, 3864, 3992,
-
3994, 4019, 4148, 4267, 4395, 4523, 4525, 4550,
-
4669, 4726, 4728, 4753, 4810, 4939, 4941, 4966,
-
5085, 5204, 5206, 5231, 5350, 5478, 5606, 5608,
-
5633, 5752, 5881, 6009, 6011, 6036, 6164, 6292,
-
6294, 6319, 6438, 6495, 6497, 6522, 6579, 6708,
-
6836, 6838, 6863, 6920, 6922, 6947, 7004, 7123,
-
7218, 7346, 7474, 7476, 7501, 7630, 7683, 7736,
-
7789
-
]
-
-
1
class << self
-
1
attr_accessor :_message_ids_indicies
-
1
private :_message_ids_indicies, :_message_ids_indicies=
-
end
-
1
self._message_ids_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
1, 1, 1, 1, 1, 1, 1, 3,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 4, 1, 5, 1, 0,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 0, 1,
-
6, 1, 1, 1, 7, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 6,
-
1, 1, 1, 1, 1, 1, 1, 8,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 9, 1, 10, 1, 1,
-
1, 11, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 10, 12, 13, 12,
-
12, 12, 12, 12, 14, 1, 12, 12,
-
1, 12, 15, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 1, 1,
-
1, 12, 1, 12, 1, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 1,
-
1, 1, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 1, 16, 1, 1, 1,
-
17, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 16, 12, 13, 12, 12,
-
12, 12, 12, 18, 1, 12, 12, 1,
-
12, 15, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 1, 1, 1,
-
12, 1, 12, 1, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 1, 1,
-
1, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 1, 19, 1, 16, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 16, 1, 20, 1,
-
1, 1, 21, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 20, 22, 23,
-
22, 22, 22, 22, 22, 24, 1, 22,
-
22, 1, 22, 25, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 1,
-
1, 1, 22, 1, 22, 26, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
1, 1, 1, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 1, 27, 1, 1,
-
1, 28, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 27, 1, 1, 1,
-
1, 1, 1, 1, 29, 1, 1, 1,
-
1, 1, 30, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 31, 1, 32, 1,
-
27, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 27,
-
1, 33, 1, 1, 1, 34, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
33, 1, 1, 1, 1, 1, 1, 1,
-
35, 1, 1, 1, 1, 1, 36, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
37, 1, 30, 1, 1, 1, 38, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 30, 39, 40, 39, 39, 39, 39,
-
39, 41, 1, 39, 39, 1, 39, 1,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 1, 1, 1, 39, 1,
-
39, 1, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 1, 1, 1, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
1, 42, 1, 30, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 30, 1, 43, 1, 1, 1,
-
44, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 43, 39, 1, 39, 39,
-
39, 39, 39, 45, 1, 39, 39, 1,
-
39, 30, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 1, 1, 1,
-
39, 1, 39, 46, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 1, 1,
-
1, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 1, 43, 1, 1, 1, 44,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 43, 1, 1, 1, 1, 1,
-
1, 1, 45, 1, 1, 1, 1, 1,
-
30, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 46, 1, 47, 1, 43, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 43, 1, 48,
-
1, 1, 1, 49, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 48, 1,
-
1, 1, 1, 1, 1, 1, 50, 1,
-
1, 1, 1, 1, 36, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 51, 1,
-
52, 1, 1, 1, 53, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 52,
-
54, 55, 54, 54, 54, 54, 54, 56,
-
1, 54, 54, 1, 54, 57, 54, 54,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 1, 1, 1, 54, 1, 54, 58,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 54, 59, 1, 1, 54, 54, 54,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 54, 54, 54, 54, 54, 54, 54,
-
54, 54, 54, 54, 54, 54, 1, 60,
-
1, 1, 1, 61, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 60, 62,
-
63, 62, 62, 62, 62, 62, 64, 1,
-
62, 62, 1, 62, 65, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
1, 1, 1, 62, 1, 62, 1, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 66, 1, 1, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 1, 67, 1,
-
60, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 60,
-
1, 68, 1, 1, 1, 69, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
68, 62, 63, 62, 62, 62, 62, 62,
-
70, 1, 62, 62, 1, 62, 71, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 1, 1, 1, 62, 72, 62,
-
1, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 1, 1, 1, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 1,
-
68, 1, 1, 1, 69, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 68,
-
1, 1, 1, 1, 1, 1, 1, 70,
-
1, 1, 1, 1, 1, 73, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 72, 1, 74,
-
1, 68, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
68, 1, 75, 1, 1, 1, 76, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 75, 1, 1, 1, 1, 1, 1,
-
1, 77, 1, 1, 1, 1, 1, 78,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 79,
-
1, 73, 1, 1, 1, 80, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
73, 81, 1, 81, 81, 81, 81, 81,
-
82, 1, 81, 81, 1, 81, 1, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 1, 1, 1, 81, 1, 81,
-
1, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 1, 1, 1, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 1,
-
83, 1, 73, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 73, 1, 68, 1, 1, 1, 69,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 68, 81, 1, 81, 81, 81,
-
81, 81, 70, 1, 81, 81, 1, 81,
-
73, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 1, 1, 1, 81,
-
72, 81, 1, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 1, 1, 1,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 81, 81, 81, 81, 81, 81, 81,
-
81, 1, 84, 1, 85, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 85, 1, 78, 1, 1,
-
1, 86, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 78, 87, 1, 87,
-
87, 87, 87, 87, 88, 1, 87, 87,
-
1, 87, 1, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 1, 1,
-
1, 87, 1, 87, 1, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 1,
-
1, 1, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 1, 89, 89, 89, 89,
-
89, 89, 89, 89, 63, 1, 89, 89,
-
90, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 63, 89, 1, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 91,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 1, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 1, 89, 89,
-
92, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 93, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 91,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 89, 89, 89, 89, 89,
-
89, 89, 89, 1, 94, 1, 89, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 89, 1, 95,
-
1, 1, 1, 96, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 95, 93,
-
63, 93, 93, 93, 93, 93, 97, 1,
-
93, 93, 1, 93, 65, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
1, 1, 1, 93, 72, 93, 1, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 1, 1, 1, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 1, 95, 1,
-
1, 1, 96, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 95, 1, 1,
-
1, 1, 1, 1, 1, 97, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 72, 1, 98, 1, 95,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 95, 1,
-
99, 1, 1, 1, 100, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 99,
-
1, 1, 1, 1, 1, 1, 1, 101,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 79, 1, 93,
-
63, 93, 93, 93, 93, 93, 1, 1,
-
93, 93, 1, 93, 65, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
1, 1, 1, 93, 1, 93, 1, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 1, 1, 1, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 93, 93, 93,
-
93, 93, 93, 93, 93, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 89, 102,
-
1, 63, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
63, 1, 73, 1, 1, 1, 80, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 73, 62, 63, 62, 62, 62, 62,
-
62, 82, 1, 62, 62, 1, 62, 65,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 1, 1, 1, 62, 1,
-
62, 1, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 1, 1, 1, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
62, 62, 62, 62, 62, 62, 62, 62,
-
1, 103, 1, 1, 1, 104, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
103, 105, 106, 105, 105, 105, 105, 105,
-
107, 1, 105, 105, 1, 105, 108, 105,
-
105, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 1, 1, 1, 105, 1, 105,
-
1, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 105, 109, 1, 1, 105, 105,
-
105, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 105, 105, 105, 105, 105, 105,
-
105, 105, 105, 105, 105, 105, 105, 1,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 1, 66, 66, 110, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 1, 111, 95, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 1,
-
112, 1, 66, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 66, 1, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 66, 66, 66, 66, 66,
-
66, 66, 66, 1, 68, 1, 1, 1,
-
69, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 68, 113, 63, 113, 113,
-
113, 113, 113, 70, 1, 113, 113, 1,
-
113, 114, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 1, 1, 1,
-
113, 72, 113, 58, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 1, 1,
-
1, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 1, 73, 1, 1, 1, 80,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 73, 113, 63, 113, 113, 113,
-
113, 113, 82, 1, 113, 113, 1, 113,
-
65, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 1, 1, 1, 113,
-
115, 113, 58, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 1, 1, 1,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 1, 58, 1, 58, 58, 58, 58,
-
58, 1, 1, 58, 58, 1, 58, 116,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 1, 1, 1, 58, 115,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 1, 1, 1, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
1, 58, 1, 58, 58, 58, 58, 58,
-
1, 1, 58, 58, 1, 58, 1, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 1, 1, 1, 58, 115, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 1, 1, 1, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 58,
-
58, 58, 58, 58, 58, 58, 58, 1,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 1, 117, 117, 118, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 119, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 120, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 117,
-
117, 117, 117, 117, 117, 117, 117, 1,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 1, 121, 121, 122, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 123, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 124, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 121,
-
121, 121, 121, 121, 121, 121, 121, 1,
-
125, 1, 121, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 121, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 121, 36, 1, 1, 1,
-
126, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 36, 127, 128, 127, 127,
-
127, 127, 127, 129, 1, 127, 127, 1,
-
127, 1, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 1, 1, 1,
-
127, 1, 127, 1, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 1, 1,
-
1, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 1, 130, 130, 130, 130, 130,
-
130, 130, 130, 23, 1, 130, 130, 131,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 23, 130, 1, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 132, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 1, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 1, 130, 130, 133,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 134, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 132, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 130, 130, 130, 130, 130, 130,
-
130, 130, 1, 135, 1, 130, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 130, 1, 136, 1,
-
1, 1, 137, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 136, 134, 23,
-
134, 134, 134, 134, 134, 138, 1, 134,
-
134, 1, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 1,
-
1, 1, 134, 1, 134, 26, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
1, 1, 1, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 1, 139, 1, 1,
-
1, 140, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 139, 1, 1, 1,
-
1, 1, 1, 1, 141, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 31, 1, 142, 1,
-
139, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 139,
-
1, 143, 1, 1, 1, 144, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
143, 1, 1, 1, 1, 1, 1, 1,
-
145, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
37, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 130, 146, 1, 23, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 23, 1, 147, 1,
-
1, 1, 148, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 147, 22, 149,
-
22, 22, 22, 22, 22, 150, 1, 22,
-
22, 1, 22, 134, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 1,
-
1, 1, 22, 1, 22, 26, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
1, 1, 1, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 22, 22, 22, 22,
-
22, 22, 22, 22, 1, 151, 1, 1,
-
1, 152, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 151, 39, 40, 39,
-
39, 39, 39, 39, 153, 1, 39, 39,
-
1, 39, 1, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 1, 1,
-
1, 39, 1, 39, 31, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 1,
-
1, 1, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 39, 39, 39, 39, 39,
-
39, 39, 39, 1, 154, 1, 151, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 151, 1, 155,
-
1, 1, 1, 156, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 155, 127,
-
128, 127, 127, 127, 127, 127, 157, 1,
-
127, 127, 1, 127, 1, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
1, 1, 1, 127, 1, 127, 37, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 1, 1, 1, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 127, 127, 1, 158, 158,
-
158, 158, 158, 158, 158, 158, 159, 1,
-
158, 158, 160, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 159, 158, 119,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 161, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 158, 158, 158,
-
158, 158, 158, 158, 158, 1, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 1,
-
162, 162, 163, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 164,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 165, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 1, 166, 1,
-
162, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 162,
-
1, 20, 1, 1, 1, 21, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
20, 134, 23, 134, 134, 134, 134, 134,
-
24, 1, 134, 134, 1, 134, 25, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 1, 1, 1, 134, 1, 134,
-
26, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 1, 1, 1, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 167, 1, 162, 162, 168, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
167, 162, 123, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 165, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
162, 162, 162, 162, 162, 162, 162, 162,
-
1, 169, 1, 167, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 167, 1, 170, 170, 170, 170,
-
170, 170, 170, 170, 171, 1, 170, 170,
-
172, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 171, 170, 173, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 174,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 170, 170, 170, 170, 170,
-
170, 170, 170, 1, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 1, 175, 175,
-
176, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 177, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 178,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 1, 179, 1, 175, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 175, 1, 180,
-
1, 1, 1, 181, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 180, 134,
-
23, 134, 134, 134, 134, 134, 182, 1,
-
134, 134, 1, 134, 25, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
1, 1, 1, 134, 1, 134, 183, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 1, 1, 1, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 1, 184, 1,
-
1, 1, 185, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 184, 1, 1,
-
1, 1, 1, 1, 1, 186, 1, 1,
-
1, 1, 1, 30, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 187, 1, 188,
-
1, 184, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
184, 1, 189, 1, 1, 1, 190, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 189, 1, 1, 1, 1, 1, 1,
-
1, 191, 1, 1, 1, 1, 1, 36,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 192, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 193, 1, 175, 175,
-
194, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 193, 175, 195, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 178,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 175, 175, 175, 175, 175,
-
175, 175, 175, 1, 196, 1, 193, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 193, 1, 197,
-
1, 1, 1, 198, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 197, 1,
-
1, 1, 1, 1, 1, 1, 199, 1,
-
1, 1, 1, 1, 30, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 200, 1,
-
201, 1, 197, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 197, 1, 202, 1, 1, 1, 203,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 202, 1, 1, 1, 1, 1,
-
1, 1, 204, 1, 1, 1, 1, 1,
-
36, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 205, 1, 206, 1, 1, 1,
-
207, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 206, 208, 209, 208, 208,
-
208, 208, 208, 210, 1, 208, 208, 1,
-
208, 211, 208, 208, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 1, 1, 1,
-
208, 1, 208, 1, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 208, 1, 1,
-
1, 208, 208, 208, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 208, 208, 208,
-
208, 208, 208, 208, 208, 208, 208, 208,
-
208, 208, 1, 134, 23, 134, 134, 134,
-
134, 134, 1, 1, 134, 134, 1, 134,
-
212, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 1, 1, 1, 134,
-
1, 134, 1, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 1, 1, 1,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 134, 134, 134, 134, 134, 134, 134,
-
134, 1, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 1, 213, 213, 214, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 215, 216, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 217, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 213, 213, 213, 213, 213, 213, 213,
-
213, 1, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 1, 218, 218, 219, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 220, 221, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 222, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 218, 218, 218, 218, 218, 218, 218,
-
218, 1, 223, 1, 218, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 218, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 218, 224, 1,
-
1, 1, 225, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 224, 1, 1,
-
1, 1, 1, 1, 1, 226, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 227, 1, 85, 1, 1, 1, 228,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 85, 1, 1, 1, 1, 1,
-
1, 1, 229, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 4, 1,
-
230, 1, 1, 1, 231, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 230,
-
1, 1, 1, 1, 1, 1, 1, 232,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 9, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_message_ids_trans_targs
-
1
private :_message_ids_trans_targs, :_message_ids_trans_targs=
-
end
-
1
self._message_ids_trans_targs = [
-
1, 0, 2, 4, 5, 3, 1, 2,
-
4, 5, 6, 7, 9, 93, 110, 111,
-
6, 7, 110, 8, 10, 11, 9, 67,
-
13, 79, 22, 10, 11, 13, 14, 22,
-
12, 10, 11, 13, 14, 22, 15, 17,
-
61, 66, 16, 18, 19, 21, 22, 20,
-
18, 19, 21, 22, 23, 24, 57, 38,
-
52, 47, 59, 53, 23, 24, 26, 38,
-
52, 47, 53, 25, 27, 28, 30, 51,
-
117, 31, 29, 27, 28, 30, 31, 117,
-
32, 34, 37, 33, 36, 118, 32, 34,
-
37, 39, 49, 48, 40, 42, 41, 43,
-
44, 46, 45, 43, 44, 46, 50, 23,
-
24, 26, 38, 52, 47, 53, 54, 56,
-
55, 57, 58, 117, 60, 62, 63, 18,
-
65, 62, 63, 18, 65, 64, 15, 17,
-
61, 66, 68, 77, 76, 69, 71, 70,
-
72, 73, 75, 72, 73, 75, 74, 72,
-
73, 75, 78, 80, 81, 84, 83, 80,
-
81, 83, 82, 80, 81, 83, 85, 90,
-
91, 89, 85, 86, 88, 89, 87, 90,
-
91, 92, 94, 103, 104, 106, 102, 94,
-
95, 97, 102, 96, 98, 99, 101, 22,
-
98, 99, 101, 22, 100, 98, 99, 101,
-
22, 103, 104, 106, 105, 106, 107, 109,
-
22, 108, 106, 107, 109, 22, 6, 7,
-
9, 93, 110, 111, 111, 113, 114, 113,
-
120, 116, 113, 114, 113, 120, 116, 115,
-
118, 35, 119, 5, 35, 119, 118, 35,
-
119
-
]
-
-
1
class << self
-
1
attr_accessor :_message_ids_trans_actions
-
1
private :_message_ids_trans_actions, :_message_ids_trans_actions=
-
end
-
1
self._message_ids_trans_actions = [
-
0, 0, 0, 1, 2, 0, 3, 3,
-
4, 5, 6, 6, 6, 6, 7, 6,
-
0, 0, 1, 0, 8, 8, 0, 0,
-
9, 0, 10, 0, 0, 1, 0, 11,
-
0, 3, 3, 4, 3, 12, 0, 0,
-
0, 1, 0, 0, 0, 1, 0, 0,
-
3, 3, 4, 3, 13, 13, 13, 13,
-
14, 13, 0, 13, 0, 0, 0, 0,
-
1, 0, 0, 0, 0, 0, 1, 0,
-
15, 0, 0, 3, 3, 4, 3, 16,
-
0, 0, 1, 0, 0, 0, 3, 3,
-
4, 0, 0, 0, 0, 0, 0, 0,
-
0, 1, 0, 3, 3, 4, 0, 3,
-
3, 3, 3, 4, 3, 3, 0, 0,
-
0, 0, 0, 0, 0, 17, 17, 18,
-
17, 0, 0, 19, 0, 0, 3, 3,
-
3, 4, 0, 0, 0, 0, 0, 0,
-
8, 8, 9, 0, 0, 1, 0, 3,
-
3, 4, 0, 8, 8, 0, 9, 0,
-
0, 1, 0, 3, 3, 4, 17, 17,
-
17, 17, 0, 0, 19, 0, 0, 0,
-
0, 0, 17, 17, 17, 18, 17, 0,
-
0, 19, 0, 0, 8, 8, 9, 20,
-
0, 0, 1, 21, 0, 3, 3, 4,
-
22, 0, 0, 19, 0, 0, 0, 1,
-
23, 0, 3, 3, 4, 24, 3, 3,
-
25, 25, 4, 25, 0, 26, 26, 27,
-
28, 26, 0, 0, 1, 29, 0, 0,
-
30, 30, 31, 32, 0, 1, 3, 3,
-
4
-
]
-
-
1
class << self
-
1
attr_accessor :_message_ids_eof_actions
-
1
private :_message_ids_eof_actions, :_message_ids_eof_actions=
-
end
-
1
self._message_ids_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 30, 0, 3,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :message_ids_start
-
end
-
1
self.message_ids_start = 1;
-
1
class << self
-
1
attr_accessor :message_ids_first_final
-
end
-
1
self.message_ids_first_final = 117;
-
1
class << self
-
1
attr_accessor :message_ids_error
-
end
-
1
self.message_ids_error = 0;
-
-
1
class << self
-
1
attr_accessor :message_ids_en_comment_tail
-
end
-
1
self.message_ids_en_comment_tail = 112;
-
1
class << self
-
1
attr_accessor :message_ids_en_main
-
end
-
1
self.message_ids_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl"
-
-
1
def self.parse(data)
-
1
p = 0
-
1
eof = data.length
-
1
stack = []
-
-
1
actions = []
-
1
data_unpacked = data.bytes.to_a
-
-
# line 1224 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb"
-
begin
-
1
p ||= 0
-
1
pe ||= data.length
-
1
cs = message_ids_start
-
1
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl"
-
-
# line 1234 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb"
-
begin
-
1
testEof = false
-
1
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
1
_goto_level = 0
-
1
_resume = 10
-
1
_eof_trans = 15
-
1
_again = 20
-
1
_test_eof = 30
-
1
_out = 40
-
1
while true
-
39
if _goto_level <= 0
-
1
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
1
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
39
if _goto_level <= _resume
-
39
_keys = cs << 1
-
39
_inds = _message_ids_index_offsets[cs]
-
39
_slen = _message_ids_key_spans[cs]
-
39
_trans = if ( _slen > 0 &&
-
39
_message_ids_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
39
( data_unpacked[p]) <= _message_ids_trans_keys[_keys + 1]
-
) then
-
39
_message_ids_indicies[ _inds + ( data_unpacked[p]) - _message_ids_trans_keys[_keys] ]
-
else
-
_message_ids_indicies[ _inds + _slen ]
-
end
-
39
cs = _message_ids_trans_targs[_trans]
-
39
if _message_ids_trans_actions[_trans] != 0
-
5
case _message_ids_trans_actions[_trans]
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 26 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 15 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(12, p) end
-
when 13 then
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(13, p) end
-
when 11 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 8 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
when 6 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(20, p) end
-
when 23 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 30 then
-
# line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(28, p) end
-
when 2 then
-
# line 32 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(29, p) end
-
when 19 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 17 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 1 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 29 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 16 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 12 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 25 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 24 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 5 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 32 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(29, p) end
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 27 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 28 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 14 then
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 21 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 10 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(18, p) end
-
when 9 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 7 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 32 then
-
# line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(28, p) end
-
# line 32 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(29, p) end
-
when 31 then
-
# line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(28, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 112
-
_goto_level = _again
-
next
-
end
-
end
-
when 18 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 22 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 20 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 1519 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb"
-
end
-
end
-
end
-
39
if _goto_level <= _again
-
39
if cs == 0
-
_goto_level = _out
-
next
-
end
-
39
p += 1
-
39
if p != pe
-
38
_goto_level = _resume
-
38
next
-
end
-
end
-
1
if _goto_level <= _test_eof
-
1
if p == eof
-
1
case _message_ids_eof_actions[cs]
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 30 then
-
# line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(28, p) end
-
# line 1545 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb"
-
end
-
end
-
-
end
-
1
if _goto_level <= _out
-
1
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 1559 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb"
-
1
117
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl"
-
-
1
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module MimeVersionMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb"
-
1
class << self
-
1
attr_accessor :_mime_version_trans_keys
-
1
private :_mime_version_trans_keys, :_mime_version_trans_keys=
-
end
-
1
self._mime_version_trans_keys = [
-
0, 0, 9, 57, 10, 10,
-
9, 32, 9, 57, 40,
-
57, 46, 46, 40, 57,
-
48, 57, 10, 10, 9, 32,
-
1, 127, 1, 127, 10,
-
10, 9, 32, 0, 127,
-
9, 57, 9, 40, 9, 40,
-
0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_mime_version_key_spans
-
1
private :_mime_version_key_spans, :_mime_version_key_spans=
-
end
-
1
self._mime_version_key_spans = [
-
0, 49, 1, 24, 49, 18, 1, 18,
-
10, 1, 24, 127, 127, 1, 24, 128,
-
49, 32, 32, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_mime_version_index_offsets
-
1
private :_mime_version_index_offsets, :_mime_version_index_offsets=
-
end
-
1
self._mime_version_index_offsets = [
-
0, 0, 50, 52, 77, 127, 146, 148,
-
167, 178, 180, 205, 333, 461, 463, 488,
-
617, 667, 700, 733
-
]
-
-
1
class << self
-
1
attr_accessor :_mime_version_indicies
-
1
private :_mime_version_indicies, :_mime_version_indicies=
-
end
-
1
self._mime_version_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
1, 1, 1, 1, 1, 1, 1, 3,
-
1, 1, 1, 1, 1, 1, 1, 4,
-
4, 4, 4, 4, 4, 4, 4, 4,
-
4, 1, 5, 1, 0, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 0, 1, 6, 1, 1,
-
1, 7, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 6, 1, 1, 1,
-
1, 1, 1, 1, 8, 1, 1, 1,
-
1, 1, 1, 1, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 1, 10,
-
1, 1, 1, 1, 1, 11, 1, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 1, 13, 1, 14, 1, 1, 1,
-
1, 1, 1, 1, 15, 15, 15, 15,
-
15, 15, 15, 15, 15, 15, 1, 16,
-
16, 16, 16, 16, 16, 16, 16, 16,
-
16, 1, 17, 1, 18, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 18, 1, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 1, 19,
-
19, 20, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 21, 22, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
23, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 19, 19, 19, 19,
-
19, 19, 19, 19, 1, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 1, 24,
-
24, 25, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 26, 27, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
28, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 1, 29, 1, 24,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 24, 1,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
24, 24, 24, 24, 24, 24, 24, 24,
-
1, 30, 1, 1, 1, 31, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
30, 1, 1, 1, 1, 1, 1, 1,
-
32, 1, 1, 1, 1, 1, 1, 1,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 1, 18, 1, 1, 1, 34,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 18, 1, 1, 1, 1, 1,
-
1, 1, 35, 1, 36, 1, 1, 1,
-
37, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 36, 1, 1, 1, 1,
-
1, 1, 1, 38, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_mime_version_trans_targs
-
1
private :_mime_version_trans_targs, :_mime_version_trans_targs=
-
end
-
1
self._mime_version_trans_targs = [
-
1, 0, 2, 4, 5, 3, 1, 2,
-
4, 5, 6, 7, 5, 7, 8, 16,
-
16, 10, 17, 12, 13, 12, 19, 15,
-
12, 13, 12, 19, 15, 14, 17, 9,
-
18, 16, 9, 18, 17, 9, 18
-
]
-
-
1
class << self
-
1
attr_accessor :_mime_version_trans_actions
-
1
private :_mime_version_trans_actions, :_mime_version_trans_actions=
-
end
-
1
self._mime_version_trans_actions = [
-
0, 0, 0, 1, 2, 0, 3, 3,
-
4, 5, 6, 7, 0, 3, 1, 8,
-
9, 0, 0, 10, 10, 11, 12, 10,
-
0, 0, 1, 13, 0, 0, 14, 14,
-
15, 0, 0, 1, 3, 3, 4
-
]
-
-
1
class << self
-
1
attr_accessor :_mime_version_eof_actions
-
1
private :_mime_version_eof_actions, :_mime_version_eof_actions=
-
end
-
1
self._mime_version_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
14, 0, 3, 0
-
]
-
-
1
class << self
-
1
attr_accessor :mime_version_start
-
end
-
1
self.mime_version_start = 1;
-
1
class << self
-
1
attr_accessor :mime_version_first_final
-
end
-
1
self.mime_version_first_final = 16;
-
1
class << self
-
1
attr_accessor :mime_version_error
-
end
-
1
self.mime_version_error = 0;
-
-
1
class << self
-
1
attr_accessor :mime_version_en_comment_tail
-
end
-
1
self.mime_version_en_comment_tail = 11;
-
1
class << self
-
1
attr_accessor :mime_version_en_main
-
end
-
1
self.mime_version_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl"
-
-
1
def self.parse(data)
-
1
p = 0
-
1
eof = data.length
-
1
stack = []
-
-
1
actions = []
-
1
data_unpacked = data.bytes.to_a
-
-
# line 215 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb"
-
begin
-
1
p ||= 0
-
1
pe ||= data.length
-
1
cs = mime_version_start
-
1
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl"
-
-
# line 225 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb"
-
begin
-
1
testEof = false
-
1
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
1
_goto_level = 0
-
1
_resume = 10
-
1
_eof_trans = 15
-
1
_again = 20
-
1
_test_eof = 30
-
1
_out = 40
-
1
while true
-
3
if _goto_level <= 0
-
1
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
1
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
3
if _goto_level <= _resume
-
3
_keys = cs << 1
-
3
_inds = _mime_version_index_offsets[cs]
-
3
_slen = _mime_version_key_spans[cs]
-
3
_trans = if ( _slen > 0 &&
-
3
_mime_version_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
3
( data_unpacked[p]) <= _mime_version_trans_keys[_keys + 1]
-
) then
-
3
_mime_version_indicies[ _inds + ( data_unpacked[p]) - _mime_version_trans_keys[_keys] ]
-
else
-
_mime_version_indicies[ _inds + _slen ]
-
end
-
3
cs = _mime_version_trans_targs[_trans]
-
3
if _mime_version_trans_actions[_trans] != 0
-
3
case _mime_version_trans_actions[_trans]
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 10 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 7 then
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(24, p) end
-
when 2 then
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(25, p) end
-
when 14 then
-
# line 29 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(26, p) end
-
when 8 then
-
# line 30 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(27, p) end
-
when 1 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 11
-
_goto_level = _again
-
next
-
end
-
end
-
when 13 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 5 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(25, p) end
-
when 9 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 30 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(27, p) end
-
when 4 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 11
-
_goto_level = _again
-
next
-
end
-
end
-
when 11 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 11
-
_goto_level = _again
-
next
-
end
-
end
-
when 12 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 6 then
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(24, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 11
-
_goto_level = _again
-
next
-
end
-
end
-
when 15 then
-
# line 29 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(26, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 11
-
_goto_level = _again
-
next
-
end
-
end
-
# line 389 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb"
-
end
-
end
-
end
-
3
if _goto_level <= _again
-
3
if cs == 0
-
_goto_level = _out
-
next
-
end
-
3
p += 1
-
3
if p != pe
-
2
_goto_level = _resume
-
2
next
-
end
-
end
-
1
if _goto_level <= _test_eof
-
1
if p == eof
-
1
case _mime_version_eof_actions[cs]
-
when 3 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 14 then
-
# line 29 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
1
actions.push(26, p) end
-
# line 415 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb"
-
end
-
end
-
-
end
-
1
if _goto_level <= _out
-
1
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 429 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb"
-
1
16
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl"
-
-
1
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module PhraseListsMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
-
1
class << self
-
1
attr_accessor :_phrase_lists_trans_keys
-
1
private :_phrase_lists_trans_keys, :_phrase_lists_trans_keys=
-
end
-
1
self._phrase_lists_trans_keys = [
-
0, 0, 9, 126, 9, 126,
-
10, 10, 9, 32, 10,
-
10, 9, 32, 1, 127,
-
1, 127, 10, 10, 9, 32,
-
-128, -1, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, -128, -1, 9,
-
126, 9, 126, 9, 126,
-
0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_phrase_lists_key_spans
-
1
private :_phrase_lists_key_spans, :_phrase_lists_key_spans=
-
end
-
1
self._phrase_lists_key_spans = [
-
0, 118, 118, 1, 24, 1, 24, 127,
-
127, 1, 24, 128, 118, 1, 24, 118,
-
127, 127, 1, 24, 128, 118, 118, 118,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :_phrase_lists_index_offsets
-
1
private :_phrase_lists_index_offsets, :_phrase_lists_index_offsets=
-
end
-
1
self._phrase_lists_index_offsets = [
-
0, 0, 119, 238, 240, 265, 267, 292,
-
420, 548, 550, 575, 704, 823, 825, 850,
-
969, 1097, 1225, 1227, 1252, 1381, 1500, 1619,
-
1738
-
]
-
-
1
class << self
-
1
attr_accessor :_phrase_lists_indicies
-
1
private :_phrase_lists_indicies, :_phrase_lists_indicies=
-
end
-
1
self._phrase_lists_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
3, 4, 3, 3, 3, 3, 3, 5,
-
1, 3, 3, 1, 3, 6, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 1, 1, 3, 1, 3, 6,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 7,
-
1, 1, 1, 8, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 7, 9,
-
10, 9, 9, 9, 9, 9, 11, 1,
-
9, 9, 1, 9, 1, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
1, 1, 1, 9, 1, 9, 1, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 1, 1, 1, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 1, 12, 1,
-
7, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 7,
-
1, 13, 1, 9, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 9, 1, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 1, 14, 14,
-
15, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 16, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 17,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 14, 14, 14, 14, 14,
-
14, 14, 14, 1, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 1, 18, 18,
-
19, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 20, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 21,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 18, 18, 18, 18, 18,
-
18, 18, 18, 1, 22, 1, 18, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 18, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 18,
-
23, 1, 1, 1, 24, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 23,
-
3, 4, 3, 3, 3, 3, 3, 5,
-
1, 3, 3, 1, 3, 6, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 1, 1, 3, 1, 3, 6,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 1, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 25,
-
1, 26, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
26, 1, 27, 1, 1, 1, 28, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 27, 29, 30, 29, 29, 29, 29,
-
29, 31, 1, 29, 29, 1, 29, 1,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 1, 1, 1, 29, 1,
-
29, 1, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 1, 1, 1, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
1, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 1, 32, 32, 33, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
34, 35, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 36, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
32, 32, 32, 32, 32, 32, 32, 32,
-
1, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 1, 37, 37, 38, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
39, 40, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 41, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
37, 37, 37, 37, 37, 37, 37, 37,
-
1, 42, 1, 37, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 37, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 37, 9, 1, 1,
-
1, 43, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 9, 9, 10, 9,
-
9, 9, 9, 9, 44, 1, 9, 9,
-
45, 9, 46, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 1, 1,
-
1, 9, 1, 9, 46, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 1,
-
1, 1, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 1, 29, 1, 1, 1,
-
47, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 29, 29, 30, 29, 29,
-
29, 29, 29, 48, 1, 29, 29, 49,
-
29, 50, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 1, 1, 1,
-
29, 1, 29, 50, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 1, 1,
-
1, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 29, 29, 29, 29, 29, 29,
-
29, 29, 1, 7, 1, 1, 1, 8,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 7, 9, 10, 9, 9, 9,
-
9, 9, 11, 1, 9, 9, 45, 9,
-
46, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 1, 1, 1, 9,
-
1, 9, 46, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 1, 1, 1,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 9, 9, 9, 9, 9, 9, 9,
-
9, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_phrase_lists_trans_targs
-
1
private :_phrase_lists_trans_targs, :_phrase_lists_trans_targs=
-
end
-
1
self._phrase_lists_trans_targs = [
-
2, 0, 3, 21, 7, 15, 23, 2,
-
3, 21, 7, 15, 4, 6, 8, 9,
-
21, 11, 8, 9, 21, 11, 10, 12,
-
13, 14, 12, 2, 3, 21, 7, 15,
-
17, 18, 17, 24, 20, 17, 18, 17,
-
24, 20, 19, 5, 22, 12, 23, 5,
-
22, 12, 23
-
]
-
-
1
class << self
-
1
attr_accessor :_phrase_lists_trans_actions
-
1
private :_phrase_lists_trans_actions, :_phrase_lists_trans_actions=
-
end
-
1
self._phrase_lists_trans_actions = [
-
1, 0, 1, 1, 1, 2, 1, 0,
-
0, 0, 0, 3, 0, 0, 4, 4,
-
5, 4, 0, 0, 6, 0, 0, 1,
-
1, 0, 0, 7, 7, 7, 7, 8,
-
9, 9, 10, 11, 9, 0, 0, 3,
-
12, 0, 0, 0, 3, 13, 0, 7,
-
8, 14, 7
-
]
-
-
1
class << self
-
1
attr_accessor :_phrase_lists_eof_actions
-
1
private :_phrase_lists_eof_actions, :_phrase_lists_eof_actions=
-
end
-
1
self._phrase_lists_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 13, 14, 13,
-
0
-
]
-
-
1
class << self
-
1
attr_accessor :phrase_lists_start
-
end
-
1
self.phrase_lists_start = 1;
-
1
class << self
-
1
attr_accessor :phrase_lists_first_final
-
end
-
1
self.phrase_lists_first_final = 21;
-
1
class << self
-
1
attr_accessor :phrase_lists_error
-
end
-
1
self.phrase_lists_error = 0;
-
-
1
class << self
-
1
attr_accessor :phrase_lists_en_comment_tail
-
end
-
1
self.phrase_lists_en_comment_tail = 16;
-
1
class << self
-
1
attr_accessor :phrase_lists_en_main
-
end
-
1
self.phrase_lists_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
-
-
1
def self.parse(data)
-
p = 0
-
eof = data.length
-
stack = []
-
-
actions = []
-
data_unpacked = data.bytes.to_a
-
-
# line 350 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
-
begin
-
p ||= 0
-
pe ||= data.length
-
cs = phrase_lists_start
-
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
-
-
# line 360 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
-
begin
-
testEof = false
-
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
_goto_level = 0
-
_resume = 10
-
_eof_trans = 15
-
_again = 20
-
_test_eof = 30
-
_out = 40
-
while true
-
if _goto_level <= 0
-
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
if _goto_level <= _resume
-
_keys = cs << 1
-
_inds = _phrase_lists_index_offsets[cs]
-
_slen = _phrase_lists_key_spans[cs]
-
_trans = if ( _slen > 0 &&
-
_phrase_lists_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
( data_unpacked[p]) <= _phrase_lists_trans_keys[_keys + 1]
-
) then
-
_phrase_lists_indicies[ _inds + ( data_unpacked[p]) - _phrase_lists_trans_keys[_keys] ]
-
else
-
_phrase_lists_indicies[ _inds + _slen ]
-
end
-
cs = _phrase_lists_trans_targs[_trans]
-
if _phrase_lists_trans_actions[_trans] != 0
-
case _phrase_lists_trans_actions[_trans]
-
when 7 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 9 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 13 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 1 then
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
when 6 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 4 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 3 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 16
-
_goto_level = _again
-
next
-
end
-
end
-
when 12 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 14 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 8 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 16
-
_goto_level = _again
-
next
-
end
-
end
-
when 10 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 16
-
_goto_level = _again
-
next
-
end
-
end
-
when 11 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 2 then
-
# line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(37, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 16
-
_goto_level = _again
-
next
-
end
-
end
-
when 5 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
# line 510 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
-
end
-
end
-
end
-
if _goto_level <= _again
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
p += 1
-
if p != pe
-
_goto_level = _resume
-
next
-
end
-
end
-
if _goto_level <= _test_eof
-
if p == eof
-
case _phrase_lists_eof_actions[cs]
-
when 13 then
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
when 14 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(36, p) end
-
# line 539 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
-
end
-
end
-
-
end
-
if _goto_level <= _out
-
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 553 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
-
21
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
-
-
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
-
# line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl"
-
-
# line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl"
-
-
-
1
module Mail
-
1
module Parsers
-
1
module Ragel
-
1
module ReceivedMachine
-
-
# line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb"
-
1
class << self
-
1
attr_accessor :_received_trans_keys
-
1
private :_received_trans_keys, :_received_trans_keys=
-
end
-
1
self._received_trans_keys = [
-
0, 0, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 1, 127, 1, 127,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 87,
-
9, 87, 10, 10, 9,
-
32, 9, 87, 9, 83,
-
9, 83, 10, 10, 9, 32,
-
9, 83, 112, 117, 114,
-
114, 9, 57, 10, 10,
-
9, 32, 9, 57, 48, 57,
-
9, 57, 9, 57, 10,
-
10, 9, 32, 9, 57,
-
48, 57, 9, 58, 10, 10,
-
9, 32, 9, 58, 9,
-
57, 10, 10, 9, 32,
-
9, 57, 48, 57, 9, 58,
-
9, 122, 10, 10, 9,
-
32, 9, 58, 9, 57,
-
10, 10, 9, 32, 9, 57,
-
48, 57, 9, 40, 9,
-
122, 10, 10, 9, 32,
-
9, 40, 48, 57, 48, 57,
-
48, 57, 48, 57, 10,
-
10, 9, 32, 84, 84,
-
103, 103, 101, 101, 99, 99,
-
101, 101, 98, 98, 97,
-
117, 110, 110, 108, 110,
-
97, 97, 114, 121, 111, 111,
-
118, 118, 99, 99, 116,
-
116, 101, 101, 112, 112,
-
114, 114, 105, 105, 9, 44,
-
10, 10, 9, 32, 9,
-
44, 9, 57, 9, 57,
-
10, 10, 9, 32, 9, 57,
-
111, 111, 110, 110, 97,
-
117, 116, 116, 104, 117,
-
117, 117, 101, 101, 101, 101,
-
100, 100, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 62,
-
10, 10, 9, 32, 9,
-
62, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
1, 127, 1, 127, 10,
-
10, 9, 32, 9, 126,
-
9, 62, 10, 10, 9, 32,
-
9, 62, 33, 126, -128,
-
-1, 10, 10, 9, 32,
-
9, 126, 9, 126, 1, 127,
-
10, 10, 9, 32, -128,
-
-1, 1, 127, 1, 127,
-
10, 10, 9, 32, 0, 127,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
9, 126, 9, 64, 10, 10,
-
9, 32, 9, 64, 0,
-
127, 10, 10, 9, 32,
-
9, 126, 9, 126, 10, 10,
-
9, 32, 9, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 9, 126, 0, 127,
-
1, 127, 10, 10, 9,
-
32, 1, 127, 1, 127,
-
10, 10, 9, 32, 9, 126,
-
9, 64, 10, 10, 9,
-
32, 9, 64, 0, 127,
-
1, 127, 10, 10, 9, 32,
-
9, 64, 10, 10, 9,
-
32, 9, 64, 9, 126,
-
9, 64, 10, 10, 9, 32,
-
9, 64, 9, 126, 9,
-
126, 10, 10, 9, 32,
-
9, 126, 9, 58, 10, 10,
-
9, 32, 9, 58, 9,
-
64, 10, 10, 9, 32,
-
9, 64, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 33, 126, 9, 126,
-
10, 10, 9, 32, 9, 126,
-
9, 126, 1, 127, 1,
-
127, 10, 10, 9, 32,
-
9, 126, 9, 58, 10, 10,
-
9, 32, 9, 58, 33,
-
126, 0, 127, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
1, 127, 10, 10, 9,
-
32, 0, 127, 9, 126,
-
9, 126, 10, 10, 9, 32,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 1, 127, 10, 10,
-
9, 32, 0, 127, 9, 126,
-
9, 126, 10, 10, 9,
-
32, 9, 126, 33, 126,
-
9, 126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 1, 127,
-
1, 127, 10, 10, 9,
-
32, 0, 127, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
1, 127, 1, 127, 10,
-
10, 9, 32, 9, 126,
-
9, 126, 33, 126, 1, 127,
-
1, 127, 10, 10, 9,
-
32, 0, 127, 10, 10,
-
9, 32, -128, -1, 1, 127,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
1, 127, 1, 127, 10,
-
10, 9, 32, 9, 126,
-
0, 127, 10, 10, 9, 32,
-
9, 126, 33, 126, 1,
-
127, 1, 127, 10, 10,
-
9, 32, 0, 127, 9, 126,
-
9, 126, 9, 126, 10,
-
10, 9, 32, 9, 126,
-
1, 127, 1, 127, 10, 10,
-
9, 32, -128, -1, 1,
-
127, 10, 10, 9, 32,
-
0, 127, 1, 127, 10, 10,
-
9, 32, 9, 126, 9,
-
126, 9, 126, 10, 10,
-
9, 32, 9, 126, 9, 126,
-
10, 10, 9, 32, 9,
-
126, 9, 126, 9, 126,
-
9, 126, 1, 127, 1, 127,
-
10, 10, 9, 32, 0,
-
127, 9, 40, 9, 40,
-
9, 40, 9, 83, 9, 77,
-
9, 84, 0, 0, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_received_key_spans
-
1
private :_received_key_spans, :_received_key_spans=
-
end
-
1
self._received_key_spans = [
-
0, 118, 118, 1, 24, 118, 118, 1,
-
24, 127, 127, 1, 24, 118, 118, 1,
-
24, 118, 118, 118, 1, 24, 118, 1,
-
24, 118, 79, 79, 1, 24, 79, 75,
-
75, 1, 24, 75, 6, 1, 49, 1,
-
24, 49, 10, 49, 49, 1, 24, 49,
-
10, 50, 1, 24, 50, 49, 1, 24,
-
49, 10, 50, 114, 1, 24, 50, 49,
-
1, 24, 49, 10, 32, 114, 1, 24,
-
32, 10, 10, 10, 10, 1, 24, 1,
-
1, 1, 1, 1, 1, 21, 1, 3,
-
1, 8, 1, 1, 1, 1, 1, 1,
-
1, 1, 36, 1, 24, 36, 49, 49,
-
1, 24, 49, 1, 1, 21, 1, 14,
-
1, 1, 1, 1, 118, 118, 1, 24,
-
118, 56, 1, 24, 56, 118, 1, 24,
-
118, 56, 1, 24, 56, 118, 118, 1,
-
24, 118, 54, 1, 24, 54, 118, 1,
-
24, 118, 118, 127, 127, 1, 24, 118,
-
54, 1, 24, 54, 94, 128, 1, 24,
-
118, 118, 127, 1, 24, 128, 127, 127,
-
1, 24, 128, 118, 127, 127, 1, 24,
-
118, 56, 1, 24, 56, 128, 1, 24,
-
118, 118, 1, 24, 118, 127, 127, 1,
-
24, 118, 128, 127, 1, 24, 127, 127,
-
1, 24, 118, 56, 1, 24, 56, 128,
-
127, 1, 24, 56, 1, 24, 56, 118,
-
56, 1, 24, 56, 118, 118, 1, 24,
-
118, 50, 1, 24, 50, 56, 1, 24,
-
56, 118, 118, 1, 24, 118, 94, 118,
-
1, 24, 118, 118, 127, 127, 1, 24,
-
118, 50, 1, 24, 50, 94, 128, 1,
-
24, 118, 118, 127, 1, 24, 128, 118,
-
118, 1, 24, 118, 118, 1, 24, 118,
-
118, 118, 1, 24, 118, 118, 127, 1,
-
24, 128, 118, 118, 1, 24, 118, 94,
-
118, 118, 1, 24, 118, 118, 118, 1,
-
24, 118, 127, 127, 1, 24, 128, 1,
-
24, 118, 118, 127, 127, 1, 24, 118,
-
118, 94, 127, 127, 1, 24, 128, 1,
-
24, 128, 127, 1, 24, 118, 118, 1,
-
24, 118, 118, 127, 127, 1, 24, 118,
-
128, 1, 24, 118, 94, 127, 127, 1,
-
24, 128, 118, 118, 118, 1, 24, 118,
-
127, 127, 1, 24, 128, 127, 1, 24,
-
128, 127, 1, 24, 118, 118, 118, 1,
-
24, 118, 118, 1, 24, 118, 118, 118,
-
118, 127, 127, 1, 24, 128, 32, 32,
-
32, 75, 69, 76, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_received_index_offsets
-
1
private :_received_index_offsets, :_received_index_offsets=
-
end
-
1
self._received_index_offsets = [
-
0, 0, 119, 238, 240, 265, 384, 503,
-
505, 530, 658, 786, 788, 813, 932, 1051,
-
1053, 1078, 1197, 1316, 1435, 1437, 1462, 1581,
-
1583, 1608, 1727, 1807, 1887, 1889, 1914, 1994,
-
2070, 2146, 2148, 2173, 2249, 2256, 2258, 2308,
-
2310, 2335, 2385, 2396, 2446, 2496, 2498, 2523,
-
2573, 2584, 2635, 2637, 2662, 2713, 2763, 2765,
-
2790, 2840, 2851, 2902, 3017, 3019, 3044, 3095,
-
3145, 3147, 3172, 3222, 3233, 3266, 3381, 3383,
-
3408, 3441, 3452, 3463, 3474, 3485, 3487, 3512,
-
3514, 3516, 3518, 3520, 3522, 3524, 3546, 3548,
-
3552, 3554, 3563, 3565, 3567, 3569, 3571, 3573,
-
3575, 3577, 3579, 3616, 3618, 3643, 3680, 3730,
-
3780, 3782, 3807, 3857, 3859, 3861, 3883, 3885,
-
3900, 3902, 3904, 3906, 3908, 4027, 4146, 4148,
-
4173, 4292, 4349, 4351, 4376, 4433, 4552, 4554,
-
4579, 4698, 4755, 4757, 4782, 4839, 4958, 5077,
-
5079, 5104, 5223, 5278, 5280, 5305, 5360, 5479,
-
5481, 5506, 5625, 5744, 5872, 6000, 6002, 6027,
-
6146, 6201, 6203, 6228, 6283, 6378, 6507, 6509,
-
6534, 6653, 6772, 6900, 6902, 6927, 7056, 7184,
-
7312, 7314, 7339, 7468, 7587, 7715, 7843, 7845,
-
7870, 7989, 8046, 8048, 8073, 8130, 8259, 8261,
-
8286, 8405, 8524, 8526, 8551, 8670, 8798, 8926,
-
8928, 8953, 9072, 9201, 9329, 9331, 9356, 9484,
-
9612, 9614, 9639, 9758, 9815, 9817, 9842, 9899,
-
10028, 10156, 10158, 10183, 10240, 10242, 10267, 10324,
-
10443, 10500, 10502, 10527, 10584, 10703, 10822, 10824,
-
10849, 10968, 11019, 11021, 11046, 11097, 11154, 11156,
-
11181, 11238, 11357, 11476, 11478, 11503, 11622, 11717,
-
11836, 11838, 11863, 11982, 12101, 12229, 12357, 12359,
-
12384, 12503, 12554, 12556, 12581, 12632, 12727, 12856,
-
12858, 12883, 13002, 13121, 13249, 13251, 13276, 13405,
-
13524, 13643, 13645, 13670, 13789, 13908, 13910, 13935,
-
14054, 14173, 14292, 14294, 14319, 14438, 14557, 14685,
-
14687, 14712, 14841, 14960, 15079, 15081, 15106, 15225,
-
15320, 15439, 15558, 15560, 15585, 15704, 15823, 15942,
-
15944, 15969, 16088, 16216, 16344, 16346, 16371, 16500,
-
16502, 16527, 16646, 16765, 16893, 17021, 17023, 17048,
-
17167, 17286, 17381, 17509, 17637, 17639, 17664, 17793,
-
17795, 17820, 17949, 18077, 18079, 18104, 18223, 18342,
-
18344, 18369, 18488, 18607, 18735, 18863, 18865, 18890,
-
19009, 19138, 19140, 19165, 19284, 19379, 19507, 19635,
-
19637, 19662, 19791, 19910, 20029, 20148, 20150, 20175,
-
20294, 20422, 20550, 20552, 20577, 20706, 20834, 20836,
-
20861, 20990, 21118, 21120, 21145, 21264, 21383, 21502,
-
21504, 21529, 21648, 21767, 21769, 21794, 21913, 22032,
-
22151, 22270, 22398, 22526, 22528, 22553, 22682, 22715,
-
22748, 22781, 22857, 22927, 23004
-
]
-
-
1
class << self
-
1
attr_accessor :_received_indicies
-
1
private :_received_indicies, :_received_indicies=
-
end
-
1
self._received_indicies = [
-
0, 1, 1, 1, 2, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 0,
-
3, 4, 3, 3, 3, 3, 3, 5,
-
1, 3, 3, 1, 3, 6, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 1, 7, 8, 3, 1, 3, 1,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 9, 1, 1, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 3, 3,
-
3, 3, 3, 3, 3, 3, 1, 10,
-
1, 1, 1, 11, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 10, 12,
-
13, 12, 12, 12, 12, 12, 14, 1,
-
12, 12, 1, 12, 15, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
1, 16, 17, 12, 1, 12, 1, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 18, 1, 1, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 1, 19, 1,
-
20, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 20,
-
1, 21, 1, 1, 1, 22, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
21, 23, 24, 23, 23, 23, 23, 23,
-
25, 1, 23, 23, 1, 23, 26, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 1, 27, 28, 23, 1, 23,
-
29, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 30, 1, 1, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 1,
-
31, 1, 1, 1, 32, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 31,
-
33, 34, 33, 33, 33, 33, 33, 35,
-
1, 33, 33, 1, 33, 36, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 1, 37, 38, 33, 1, 33, 39,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 40, 1, 1, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 1, 41,
-
1, 42, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
42, 1, 43, 43, 43, 43, 43, 43,
-
43, 43, 44, 1, 43, 43, 45, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 44, 43, 46, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 47, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 43, 43, 43, 43, 43, 43, 43,
-
43, 1, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 1, 48, 48, 49, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 50, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 51, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 1, 52, 1, 48, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 48, 1, 53, 1, 1,
-
1, 54, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 53, 55, 56, 55,
-
55, 55, 55, 55, 57, 1, 55, 55,
-
1, 55, 58, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 1, 59,
-
60, 55, 1, 55, 61, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 62,
-
1, 1, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 55, 55, 55, 55, 55,
-
55, 55, 55, 1, 63, 1, 1, 1,
-
64, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 63, 65, 66, 65, 65,
-
65, 65, 65, 67, 1, 65, 65, 1,
-
65, 68, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 1, 69, 70,
-
65, 1, 65, 71, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 72, 1,
-
1, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 65, 65, 65, 65, 65, 65,
-
65, 65, 1, 73, 1, 74, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 74, 1, 75, 1,
-
1, 1, 76, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 75, 77, 78,
-
77, 77, 77, 77, 77, 79, 1, 77,
-
77, 1, 77, 80, 77, 77, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 1,
-
81, 82, 77, 1, 77, 83, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 77,
-
84, 1, 1, 77, 77, 77, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 77,
-
77, 77, 77, 77, 77, 77, 77, 77,
-
77, 77, 77, 77, 1, 85, 1, 1,
-
1, 86, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 85, 87, 88, 87,
-
87, 87, 87, 87, 89, 1, 87, 87,
-
1, 87, 90, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 1, 1,
-
1, 87, 1, 87, 1, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 1,
-
1, 1, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 87, 87, 87, 87, 87,
-
87, 87, 87, 1, 85, 1, 1, 1,
-
86, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 85, 91, 92, 91, 91,
-
91, 91, 91, 89, 1, 91, 91, 1,
-
91, 1, 91, 91, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 1, 1, 1,
-
91, 1, 91, 1, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 91, 1, 1,
-
1, 91, 91, 91, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 91, 91, 91,
-
91, 91, 91, 91, 91, 91, 91, 91,
-
91, 91, 1, 93, 1, 85, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 85, 1, 94, 1,
-
1, 1, 95, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 94, 12, 13,
-
12, 12, 12, 12, 12, 96, 1, 12,
-
12, 1, 12, 97, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 1,
-
16, 17, 12, 1, 12, 98, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
18, 1, 1, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 12, 12, 12, 12,
-
12, 12, 12, 12, 1, 99, 1, 91,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 91, 1,
-
100, 1, 1, 1, 101, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 100,
-
102, 103, 102, 102, 102, 102, 102, 104,
-
1, 102, 102, 1, 102, 105, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 1, 106, 107, 102, 1, 102, 108,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 109, 1, 1, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 1, 110,
-
1, 1, 1, 111, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 110, 1,
-
1, 1, 1, 1, 1, 1, 112, 1,
-
1, 1, 1, 1, 1, 1, 113, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 114, 1, 1, 1,
-
1, 1, 1, 115, 1, 1, 1, 1,
-
1, 116, 117, 1, 1, 118, 1, 119,
-
1, 1, 1, 120, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 119, 1,
-
1, 1, 1, 1, 1, 1, 121, 1,
-
1, 1, 1, 1, 1, 1, 122, 122,
-
122, 122, 122, 122, 122, 122, 122, 122,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 114, 1, 1, 1,
-
1, 1, 1, 115, 1, 1, 1, 1,
-
1, 116, 117, 1, 1, 118, 1, 123,
-
1, 119, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
119, 1, 124, 1, 1, 1, 125, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 124, 1, 1, 1, 1, 1, 1,
-
1, 126, 1, 1, 1, 1, 1, 1,
-
1, 127, 127, 127, 127, 127, 127, 127,
-
127, 127, 127, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 128,
-
1, 1, 1, 1, 1, 1, 129, 1,
-
1, 1, 1, 1, 130, 131, 1, 1,
-
132, 1, 133, 1, 1, 1, 134, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 133, 1, 1, 1, 1, 1, 1,
-
1, 135, 1, 1, 1, 1, 1, 1,
-
1, 133, 133, 133, 133, 133, 133, 133,
-
133, 133, 133, 1, 1, 1, 1, 1,
-
1, 1, 136, 1, 1, 137, 1, 138,
-
1, 1, 1, 139, 1, 1, 140, 141,
-
142, 1, 1, 1, 143, 1, 133, 1,
-
1, 1, 134, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 133, 1, 1,
-
1, 1, 1, 1, 1, 135, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 136, 1,
-
1, 137, 1, 138, 1, 1, 1, 139,
-
1, 1, 140, 141, 142, 1, 1, 1,
-
143, 1, 144, 1, 133, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 133, 1, 145, 1, 1,
-
1, 146, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 145, 1, 1, 1,
-
1, 1, 1, 1, 147, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 148, 1, 1,
-
149, 1, 150, 1, 1, 1, 151, 1,
-
1, 152, 153, 154, 1, 1, 1, 155,
-
1, 156, 1, 1, 1, 1, 157, 1,
-
158, 1, 158, 1, 1, 1, 159, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 158, 1, 1, 1, 1, 1, 1,
-
1, 160, 1, 1, 1, 1, 1, 1,
-
1, 161, 161, 161, 161, 161, 161, 161,
-
161, 161, 161, 1, 162, 1, 158, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 158, 1, 163,
-
1, 1, 1, 164, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 163, 1,
-
1, 1, 1, 1, 1, 1, 165, 1,
-
1, 1, 1, 1, 1, 1, 166, 166,
-
166, 166, 166, 166, 166, 166, 166, 166,
-
1, 167, 167, 167, 167, 167, 167, 167,
-
167, 167, 167, 1, 168, 1, 1, 1,
-
169, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 168, 1, 1, 1, 1,
-
1, 1, 1, 170, 1, 1, 1, 1,
-
1, 1, 1, 167, 167, 167, 167, 167,
-
167, 167, 167, 167, 167, 1, 168, 1,
-
1, 1, 169, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 168, 1, 1,
-
1, 1, 1, 1, 1, 170, 1, 1,
-
1, 1, 1, 1, 1, 171, 171, 171,
-
171, 171, 171, 171, 171, 171, 171, 1,
-
172, 1, 168, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 168, 1, 173, 1, 1, 1, 174,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 173, 1, 1, 1, 1, 1,
-
1, 1, 175, 1, 1, 1, 1, 1,
-
1, 1, 176, 176, 176, 176, 176, 176,
-
176, 176, 176, 176, 1, 177, 177, 177,
-
177, 177, 177, 177, 177, 177, 177, 1,
-
177, 1, 1, 1, 178, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 177,
-
1, 1, 1, 1, 1, 1, 1, 179,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 180, 1, 181, 1, 177, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 177, 1, 182, 1,
-
1, 1, 183, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 182, 1, 1,
-
1, 1, 1, 1, 1, 184, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 185,
-
1, 180, 1, 1, 1, 186, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
180, 1, 1, 1, 1, 1, 1, 1,
-
187, 1, 1, 1, 1, 1, 1, 1,
-
188, 188, 188, 188, 188, 188, 188, 188,
-
188, 188, 1, 189, 1, 180, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 180, 1, 185, 1,
-
1, 1, 190, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 185, 1, 1,
-
1, 1, 1, 1, 1, 191, 1, 1,
-
1, 1, 1, 1, 1, 192, 192, 192,
-
192, 192, 192, 192, 192, 192, 192, 1,
-
193, 193, 193, 193, 193, 193, 193, 193,
-
193, 193, 1, 194, 1, 1, 1, 195,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 194, 1, 1, 1, 1, 1,
-
1, 1, 196, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 197, 1, 194, 1,
-
1, 1, 195, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 194, 1, 1,
-
1, 1, 1, 1, 1, 196, 1, 1,
-
198, 1, 198, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 197,
-
1, 1, 1, 1, 1, 1, 199, 199,
-
200, 199, 200, 199, 201, 199, 199, 1,
-
199, 199, 200, 199, 199, 200, 199, 199,
-
199, 199, 202, 199, 199, 199, 199, 199,
-
1, 1, 1, 1, 1, 1, 199, 199,
-
199, 199, 199, 199, 199, 199, 199, 1,
-
199, 199, 199, 199, 199, 199, 199, 199,
-
199, 199, 199, 199, 199, 199, 199, 199,
-
1, 203, 1, 194, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 194, 1, 204, 1, 1, 1,
-
205, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 204, 1, 1, 1, 1,
-
1, 1, 1, 206, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 207, 1, 197,
-
1, 1, 1, 208, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 197, 1,
-
1, 1, 1, 1, 1, 1, 209, 1,
-
1, 1, 1, 1, 1, 1, 210, 210,
-
210, 210, 210, 210, 210, 210, 210, 210,
-
1, 211, 1, 197, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 197, 1, 207, 1, 1, 1,
-
212, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 207, 1, 1, 1, 1,
-
1, 1, 1, 213, 1, 1, 1, 1,
-
1, 1, 1, 214, 214, 214, 214, 214,
-
214, 214, 214, 214, 214, 1, 215, 215,
-
215, 215, 215, 215, 215, 215, 215, 215,
-
1, 216, 1, 1, 1, 217, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
216, 1, 1, 1, 1, 1, 1, 1,
-
218, 1, 216, 1, 1, 1, 217, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 216, 1, 1, 1, 1, 1, 1,
-
1, 218, 1, 1, 198, 1, 198, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 199, 199, 200, 199, 200, 199,
-
201, 199, 199, 1, 199, 199, 200, 199,
-
199, 200, 199, 199, 199, 199, 202, 199,
-
199, 199, 199, 199, 1, 1, 1, 1,
-
1, 1, 199, 199, 199, 199, 199, 199,
-
199, 199, 199, 1, 199, 199, 199, 199,
-
199, 199, 199, 199, 199, 199, 199, 199,
-
199, 199, 199, 199, 1, 219, 1, 216,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 216, 1,
-
220, 1, 1, 1, 221, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 220,
-
1, 1, 1, 1, 1, 1, 1, 222,
-
1, 223, 223, 223, 223, 223, 223, 223,
-
223, 223, 223, 1, 224, 224, 224, 224,
-
224, 224, 224, 224, 224, 224, 1, 225,
-
225, 225, 225, 225, 225, 225, 225, 225,
-
225, 1, 199, 199, 199, 199, 199, 199,
-
199, 199, 199, 199, 1, 226, 1, 227,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 227, 1,
-
199, 1, 158, 1, 228, 1, 158, 1,
-
229, 1, 158, 1, 230, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
231, 1, 158, 1, 158, 1, 158, 1,
-
232, 1, 158, 1, 1, 1, 1, 1,
-
1, 158, 1, 233, 1, 158, 1, 234,
-
1, 158, 1, 235, 1, 158, 1, 236,
-
1, 237, 1, 237, 1, 1, 1, 238,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 237, 1, 1, 1, 1, 1,
-
1, 1, 239, 1, 1, 1, 240, 1,
-
241, 1, 237, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 237, 1, 242, 1, 1, 1, 243,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 242, 1, 1, 1, 1, 1,
-
1, 1, 244, 1, 1, 1, 245, 1,
-
246, 1, 1, 1, 247, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 246,
-
1, 1, 1, 1, 1, 1, 1, 248,
-
1, 1, 1, 1, 1, 1, 1, 113,
-
113, 113, 113, 113, 113, 113, 113, 113,
-
113, 1, 249, 1, 1, 1, 250, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 249, 1, 1, 1, 1, 1, 1,
-
1, 251, 1, 1, 1, 1, 1, 1,
-
1, 122, 122, 122, 122, 122, 122, 122,
-
122, 122, 122, 1, 252, 1, 249, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 249, 1, 253,
-
1, 1, 1, 254, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 253, 1,
-
1, 1, 1, 1, 1, 1, 255, 1,
-
1, 1, 1, 1, 1, 1, 127, 127,
-
127, 127, 127, 127, 127, 127, 127, 127,
-
1, 256, 1, 237, 1, 257, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 256, 1, 237, 1, 258, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 259, 1, 237, 1, 237, 1,
-
260, 1, 237, 1, 261, 1, 1, 1,
-
262, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 261, 263, 264, 263, 263,
-
263, 263, 263, 265, 1, 263, 263, 266,
-
263, 267, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 1, 1, 1,
-
263, 1, 263, 268, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 1, 1,
-
1, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 1, 269, 1, 1, 1, 270,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 269, 263, 264, 263, 263, 263,
-
263, 263, 271, 1, 263, 263, 272, 263,
-
267, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 1, 1, 1, 263,
-
1, 263, 273, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 1, 1, 1,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 1, 274, 1, 269, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 269, 1, 275, 1, 1,
-
1, 276, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 275, 277, 278, 277,
-
277, 277, 277, 277, 279, 1, 277, 277,
-
1, 277, 280, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 1, 1,
-
1, 277, 281, 277, 282, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 1,
-
1, 1, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 1, 283, 1, 1, 1,
-
284, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 283, 1, 1, 1, 1,
-
1, 1, 1, 285, 1, 1, 1, 1,
-
1, 286, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 20, 1, 287, 1, 288, 1, 283,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 283, 1,
-
289, 1, 1, 1, 290, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 289,
-
1, 1, 1, 1, 1, 1, 1, 291,
-
1, 1, 1, 1, 1, 292, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 293, 1, 294,
-
1, 286, 1, 1, 1, 295, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
286, 296, 297, 296, 296, 296, 296, 296,
-
298, 1, 296, 296, 1, 296, 1, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 1, 1, 1, 296, 1, 296,
-
1, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 1, 1, 1, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 1,
-
299, 1, 286, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 286, 1, 300, 1, 1, 1, 301,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 300, 296, 1, 296, 296, 296,
-
296, 296, 302, 1, 296, 296, 1, 296,
-
286, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 1, 1, 1, 296,
-
20, 296, 303, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 1, 1, 1,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 1, 300, 1, 1, 1, 301, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 300, 1, 1, 1, 1, 1, 1,
-
1, 302, 1, 1, 1, 1, 1, 286,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 20,
-
1, 303, 1, 304, 1, 300, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 300, 1, 305, 1,
-
1, 1, 306, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 305, 1, 1,
-
1, 1, 1, 1, 1, 307, 1, 1,
-
1, 1, 1, 292, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 293, 1, 308, 1, 309,
-
1, 1, 1, 310, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 309, 311,
-
312, 311, 311, 311, 311, 311, 313, 1,
-
311, 311, 1, 311, 314, 311, 311, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
1, 1, 1, 311, 1, 311, 1, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
311, 315, 1, 1, 311, 311, 311, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
311, 311, 311, 311, 311, 311, 311, 311,
-
311, 311, 311, 311, 311, 1, 316, 1,
-
1, 1, 317, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 316, 318, 319,
-
318, 318, 318, 318, 318, 320, 1, 318,
-
318, 1, 318, 321, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 1,
-
1, 1, 318, 1, 318, 1, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
322, 1, 1, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 1, 323, 1, 316,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 316, 1,
-
324, 1, 1, 1, 325, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 324,
-
318, 319, 318, 318, 318, 318, 318, 326,
-
1, 318, 318, 1, 318, 327, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 1, 1, 1, 318, 328, 318, 1,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 1, 1, 1, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 1, 324,
-
1, 1, 1, 325, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 324, 1,
-
1, 1, 1, 1, 1, 1, 326, 1,
-
1, 1, 1, 1, 329, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 328, 1, 330, 1,
-
324, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 324,
-
1, 331, 1, 1, 1, 332, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
331, 1, 1, 1, 1, 1, 1, 1,
-
333, 1, 1, 1, 1, 1, 334, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 335, 1,
-
329, 1, 1, 1, 336, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 329,
-
337, 1, 337, 337, 337, 337, 337, 338,
-
1, 337, 337, 1, 337, 1, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 1, 1, 1, 337, 1, 337, 1,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 1, 1, 1, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 1, 339,
-
1, 329, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
329, 1, 324, 1, 1, 1, 325, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 324, 337, 1, 337, 337, 337, 337,
-
337, 326, 1, 337, 337, 1, 337, 329,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 1, 1, 1, 337, 328,
-
337, 1, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 1, 1, 1, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
337, 337, 337, 337, 337, 337, 337, 337,
-
1, 334, 1, 1, 1, 340, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
334, 341, 1, 341, 341, 341, 341, 341,
-
342, 1, 341, 341, 1, 341, 1, 341,
-
341, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 1, 1, 1, 341, 1, 341,
-
1, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 341, 1, 1, 1, 341, 341,
-
341, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 341, 341, 341, 341, 341, 341,
-
341, 341, 341, 341, 341, 341, 341, 1,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
319, 1, 343, 343, 344, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 319,
-
343, 1, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 345, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 1,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 1, 343, 343, 346, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 347, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 345, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 343,
-
343, 343, 343, 343, 343, 343, 343, 1,
-
348, 1, 343, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 343, 1, 349, 1, 1, 1, 350,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 349, 347, 319, 347, 347, 347,
-
347, 347, 351, 1, 347, 347, 1, 347,
-
321, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 1, 1, 1, 347,
-
328, 347, 1, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 1, 1, 1,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 1, 349, 1, 1, 1, 350, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 349, 1, 1, 1, 1, 1, 1,
-
1, 351, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 328,
-
1, 352, 1, 349, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 349, 1, 353, 1, 1, 1,
-
354, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 353, 1, 1, 1, 1,
-
1, 1, 1, 355, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 335, 1, 347, 319, 347, 347, 347,
-
347, 347, 1, 1, 347, 347, 1, 347,
-
321, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 1, 1, 1, 347,
-
1, 347, 1, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 1, 1, 1,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 347, 347, 347, 347, 347, 347, 347,
-
347, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 343, 356, 1, 319, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 319, 1, 329, 1,
-
1, 1, 336, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 329, 318, 319,
-
318, 318, 318, 318, 318, 338, 1, 318,
-
318, 1, 318, 321, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 1,
-
1, 1, 318, 1, 318, 1, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
1, 1, 1, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 318, 318, 318, 318,
-
318, 318, 318, 318, 1, 357, 1, 1,
-
1, 358, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 357, 359, 360, 359,
-
359, 359, 359, 359, 361, 1, 359, 359,
-
1, 359, 362, 359, 359, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 1, 1,
-
1, 359, 1, 359, 1, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 359, 363,
-
1, 1, 359, 359, 359, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 359, 359,
-
359, 359, 359, 359, 359, 359, 359, 359,
-
359, 359, 359, 1, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 1, 322, 322,
-
364, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 1, 365,
-
349, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 322, 322, 322, 322, 322,
-
322, 322, 322, 1, 366, 1, 322, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 322, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 322,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 1, 367, 367, 368, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 369, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 370, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 367,
-
367, 367, 367, 367, 367, 367, 367, 1,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 1, 371, 371, 372, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 373, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 374, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 1,
-
375, 1, 371, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 371, 1, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 371, 371, 371, 371, 371,
-
371, 371, 371, 1, 292, 1, 1, 1,
-
376, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 292, 377, 378, 377, 377,
-
377, 377, 377, 379, 1, 377, 377, 1,
-
377, 1, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 1, 1, 1,
-
377, 1, 377, 1, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 1, 1,
-
1, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 1, 380, 380, 380, 380, 380,
-
380, 380, 380, 278, 1, 380, 380, 381,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 278, 380, 1, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 382, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 1, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 1, 380, 380, 383,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 384, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 382, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 1, 385, 1, 380, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 380, 1, 386, 1,
-
1, 1, 387, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 386, 384, 278,
-
384, 384, 384, 384, 384, 388, 1, 384,
-
384, 1, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 1,
-
1, 1, 384, 281, 384, 282, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
1, 1, 1, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 1, 389, 1, 1,
-
1, 390, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 389, 1, 1, 1,
-
1, 1, 1, 1, 391, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 20, 1, 287, 1, 392, 1,
-
389, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 389,
-
1, 393, 1, 1, 1, 394, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
393, 1, 1, 1, 1, 1, 1, 1,
-
395, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 293, 1,
-
294, 1, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 380, 380, 380, 380, 380, 380,
-
380, 380, 1, 396, 1, 278, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 278, 1, 397, 1,
-
1, 1, 398, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 397, 277, 399,
-
277, 277, 277, 277, 277, 400, 1, 277,
-
277, 1, 277, 384, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 1,
-
1, 1, 277, 281, 277, 282, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
1, 1, 1, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 277, 277, 277, 277,
-
277, 277, 277, 277, 1, 401, 1, 1,
-
1, 402, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 401, 296, 297, 296,
-
296, 296, 296, 296, 403, 1, 296, 296,
-
1, 296, 1, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 1, 1,
-
1, 296, 20, 296, 287, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 1,
-
1, 1, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 296, 296, 296, 296, 296,
-
296, 296, 296, 1, 404, 1, 401, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 401, 1, 405,
-
1, 1, 1, 406, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 405, 377,
-
378, 377, 377, 377, 377, 377, 407, 1,
-
377, 377, 1, 377, 1, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
1, 1, 1, 377, 293, 377, 294, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 1, 1, 1, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 377, 377, 377,
-
377, 377, 377, 377, 377, 1, 408, 408,
-
408, 408, 408, 408, 408, 408, 409, 1,
-
408, 408, 410, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 409, 408, 369,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 411, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 408, 408, 408,
-
408, 408, 408, 408, 408, 1, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 1,
-
412, 412, 413, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 414,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 415, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 1, 416, 1,
-
412, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 412,
-
1, 275, 1, 1, 1, 276, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
275, 384, 278, 384, 384, 384, 384, 384,
-
279, 1, 384, 384, 1, 384, 280, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 1, 1, 1, 384, 281, 384,
-
282, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 1, 1, 1, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 1,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
1, 412, 412, 412, 412, 412, 412, 412,
-
412, 417, 1, 412, 412, 418, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
417, 412, 373, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 415, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
412, 412, 412, 412, 412, 412, 412, 412,
-
1, 419, 1, 417, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 417, 1, 420, 420, 420, 420,
-
420, 420, 420, 420, 421, 1, 420, 420,
-
422, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 421, 420, 423, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 424,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 420, 420, 420, 420, 420,
-
420, 420, 420, 1, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 1, 425, 425,
-
426, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 427, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 428,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 1, 429, 1, 425, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 425, 1, 430,
-
1, 1, 1, 431, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 430, 384,
-
278, 384, 384, 384, 384, 384, 432, 1,
-
384, 384, 1, 384, 280, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
1, 1, 1, 384, 281, 384, 433, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 1, 1, 1, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 1, 434, 1,
-
1, 1, 435, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 434, 1, 1,
-
1, 1, 1, 1, 1, 436, 1, 1,
-
1, 1, 1, 286, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 20, 1, 437, 1, 438,
-
1, 434, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
434, 1, 439, 1, 1, 1, 440, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 439, 1, 1, 1, 1, 1, 1,
-
1, 441, 1, 1, 1, 1, 1, 292,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 293,
-
1, 442, 1, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 1, 425, 425, 425, 425,
-
425, 425, 425, 425, 443, 1, 425, 425,
-
444, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 443, 425, 445, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 428,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 425, 425, 425, 425, 425,
-
425, 425, 425, 1, 446, 1, 443, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 443, 1, 447,
-
1, 1, 1, 448, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 447, 1,
-
1, 1, 1, 1, 1, 1, 449, 1,
-
1, 1, 1, 1, 286, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 20, 1, 450, 1,
-
451, 1, 447, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 447, 1, 452, 1, 1, 1, 453,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 452, 1, 1, 1, 1, 1,
-
1, 1, 454, 1, 1, 1, 1, 1,
-
292, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
293, 1, 455, 1, 456, 1, 1, 1,
-
457, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 456, 458, 459, 458, 458,
-
458, 458, 458, 460, 1, 458, 458, 461,
-
458, 462, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 1, 1, 1,
-
458, 1, 458, 463, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 1, 1,
-
1, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 1, 272, 1, 1, 1, 464,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 272, 1, 1, 1, 1, 1,
-
1, 1, 465, 1, 1, 1, 272, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 273, 1, 466, 1, 272, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 272, 1, 461,
-
1, 1, 1, 467, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 461, 1,
-
1, 1, 1, 1, 1, 1, 468, 1,
-
1, 1, 461, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 463, 1,
-
469, 1, 1, 1, 470, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 469,
-
471, 472, 471, 471, 471, 471, 471, 473,
-
1, 471, 471, 1, 471, 474, 471, 471,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 1, 1, 1, 471, 1, 471, 1,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 471, 475, 1, 1, 471, 471, 471,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 471, 471, 471, 471, 471, 471, 471,
-
471, 471, 471, 471, 471, 471, 1, 476,
-
1, 1, 1, 477, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 476, 478,
-
479, 478, 478, 478, 478, 478, 480, 1,
-
478, 478, 1, 478, 481, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
1, 1, 1, 478, 1, 478, 1, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 482, 1, 1, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 1, 483, 1,
-
476, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 476,
-
1, 484, 1, 1, 1, 485, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
484, 478, 479, 478, 478, 478, 478, 478,
-
486, 1, 478, 478, 487, 478, 488, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 489, 1, 1, 478, 1, 478,
-
1, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 1, 1, 1, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 1,
-
484, 1, 1, 1, 485, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 484,
-
1, 1, 1, 1, 1, 1, 1, 486,
-
1, 1, 1, 487, 1, 490, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 489, 1, 491, 1, 484, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 484, 1, 492, 1,
-
1, 1, 493, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 492, 1, 1,
-
1, 1, 1, 1, 1, 494, 1, 1,
-
1, 495, 1, 496, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 497,
-
1, 498, 1, 1, 1, 499, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
498, 1, 1, 1, 1, 1, 1, 1,
-
500, 1, 1, 1, 498, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 501, 1, 1, 1, 1, 1,
-
273, 1, 502, 1, 498, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 498, 1, 503, 1, 1,
-
1, 504, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 503, 1, 1, 1,
-
1, 1, 1, 1, 505, 1, 1, 1,
-
503, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 506, 1,
-
1, 1, 1, 1, 463, 1, 507, 1,
-
1, 1, 508, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 507, 509, 510,
-
509, 509, 509, 509, 509, 511, 1, 509,
-
509, 1, 509, 512, 509, 509, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 1,
-
1, 1, 509, 1, 509, 1, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 509,
-
1, 1, 1, 509, 509, 509, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 509,
-
509, 509, 509, 509, 509, 509, 509, 509,
-
509, 509, 509, 509, 1, 513, 1, 1,
-
1, 514, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 513, 263, 264, 263,
-
263, 263, 263, 263, 515, 1, 263, 263,
-
1, 263, 267, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 1, 1,
-
1, 263, 1, 263, 1, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 1,
-
1, 1, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 263, 263, 263, 263, 263,
-
263, 263, 263, 1, 516, 1, 513, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 513, 1, 517,
-
1, 1, 1, 518, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 517, 458,
-
459, 458, 458, 458, 458, 458, 519, 1,
-
458, 458, 1, 458, 462, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
1, 1, 1, 458, 1, 458, 1, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 1, 1, 1, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 458, 458, 458,
-
458, 458, 458, 458, 458, 1, 384, 278,
-
384, 384, 384, 384, 384, 1, 1, 384,
-
384, 1, 384, 520, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 1,
-
1, 1, 384, 1, 384, 1, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
1, 1, 1, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 384, 384, 384, 384,
-
384, 384, 384, 384, 1, 490, 1, 1,
-
1, 521, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 490, 522, 1, 522,
-
522, 522, 522, 522, 523, 1, 522, 522,
-
1, 522, 1, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 1, 1,
-
1, 522, 1, 522, 1, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 1,
-
1, 1, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 1, 524, 1, 490, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 490, 1, 484,
-
1, 1, 1, 485, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 484, 522,
-
1, 522, 522, 522, 522, 522, 486, 1,
-
522, 522, 487, 522, 490, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
489, 1, 1, 522, 1, 522, 1, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 1, 1, 1, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 522, 522, 522,
-
522, 522, 522, 522, 522, 1, 496, 1,
-
1, 1, 525, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 496, 526, 1,
-
526, 526, 526, 526, 526, 527, 1, 526,
-
526, 1, 526, 1, 526, 526, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 1,
-
1, 1, 526, 1, 526, 1, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 526,
-
1, 1, 1, 526, 526, 526, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 526,
-
526, 526, 526, 526, 526, 526, 526, 526,
-
526, 526, 526, 526, 1, 528, 528, 528,
-
528, 528, 528, 528, 528, 479, 1, 528,
-
528, 529, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 479, 528, 1, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
530, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 1, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 1, 528,
-
528, 531, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 532, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
530, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 1, 533, 1, 528,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 528, 1,
-
534, 1, 1, 1, 535, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 534,
-
532, 479, 532, 532, 532, 532, 532, 536,
-
1, 532, 532, 487, 532, 481, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 489, 1, 1, 532, 1, 532, 1,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 1, 1, 1, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 1, 534,
-
1, 1, 1, 535, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 534, 1,
-
1, 1, 1, 1, 1, 1, 536, 1,
-
1, 1, 487, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
489, 1, 537, 1, 534, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 534, 1, 538, 1, 1,
-
1, 539, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 538, 1, 1, 1,
-
1, 1, 1, 1, 540, 1, 1, 1,
-
495, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 497, 1,
-
532, 479, 532, 532, 532, 532, 532, 1,
-
1, 532, 532, 1, 532, 481, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 1, 1, 1, 532, 1, 532, 1,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 1, 1, 1, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 532, 532,
-
532, 532, 532, 532, 532, 532, 1, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 528,
-
528, 528, 528, 528, 528, 528, 528, 1,
-
541, 1, 479, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 479, 1, 490, 1, 1, 1, 521,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 490, 478, 479, 478, 478, 478,
-
478, 478, 523, 1, 478, 478, 1, 478,
-
481, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 1, 1, 1, 478,
-
1, 478, 1, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 1, 1, 1,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 478, 478, 478, 478, 478, 478, 478,
-
478, 1, 542, 1, 1, 1, 543, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 542, 544, 545, 544, 544, 544, 544,
-
544, 546, 1, 544, 544, 1, 544, 547,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 1, 1, 1, 544, 1,
-
544, 1, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 544, 548, 1, 1, 544,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
544, 544, 544, 544, 544, 544, 544, 544,
-
1, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 1, 482, 482, 549, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 1, 550, 534, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
1, 551, 1, 482, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 482, 1, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 482, 482, 482, 482,
-
482, 482, 482, 482, 1, 552, 1, 1,
-
1, 553, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 552, 554, 555, 554,
-
554, 554, 554, 554, 556, 1, 554, 554,
-
1, 554, 557, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 1, 1,
-
1, 554, 1, 554, 1, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 18,
-
1, 1, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 554, 554, 554, 554, 554,
-
554, 554, 554, 1, 558, 1, 1, 1,
-
559, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 558, 560, 561, 560, 560,
-
560, 560, 560, 562, 1, 560, 560, 1,
-
560, 563, 560, 560, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 1, 1, 1,
-
560, 1, 560, 1, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 560, 564, 1,
-
1, 560, 560, 560, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 560, 560, 560,
-
560, 560, 560, 560, 560, 560, 560, 560,
-
560, 560, 1, 565, 1, 558, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 558, 1, 566, 1,
-
1, 1, 567, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 566, 568, 569,
-
568, 568, 568, 568, 568, 570, 1, 568,
-
568, 1, 568, 571, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 1,
-
572, 573, 568, 1, 568, 1, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
574, 1, 1, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 1, 566, 1, 1,
-
1, 567, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 566, 575, 576, 575,
-
575, 575, 575, 575, 570, 1, 575, 575,
-
1, 575, 577, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 1, 572,
-
578, 575, 1, 575, 1, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 574,
-
1, 1, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 1, 579, 1, 580, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 580, 1, 581,
-
1, 1, 1, 582, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 581, 583,
-
584, 583, 583, 583, 583, 583, 585, 1,
-
583, 583, 1, 583, 586, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
1, 587, 588, 583, 1, 583, 1, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 589, 1, 1, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 1, 590, 1,
-
1, 1, 591, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 590, 592, 593,
-
592, 592, 592, 592, 592, 594, 1, 592,
-
592, 1, 592, 90, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 1,
-
1, 1, 592, 1, 592, 1, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
1, 1, 1, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 592, 592, 592, 592,
-
592, 592, 592, 592, 1, 590, 1, 1,
-
1, 591, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 590, 595, 1, 595,
-
595, 595, 595, 595, 594, 1, 595, 595,
-
1, 595, 1, 595, 595, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 1, 1,
-
1, 595, 1, 595, 1, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 595, 1,
-
1, 1, 595, 595, 595, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 595, 595,
-
595, 595, 595, 595, 595, 595, 595, 595,
-
595, 595, 595, 1, 596, 1, 590, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 590, 1, 566,
-
1, 1, 1, 567, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 566, 597,
-
598, 597, 597, 597, 597, 597, 570, 1,
-
597, 597, 1, 597, 599, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
1, 572, 573, 597, 1, 597, 1, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 574, 1, 1, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 1, 566, 1,
-
1, 1, 567, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 566, 597, 598,
-
597, 597, 597, 597, 597, 570, 1, 597,
-
597, 1, 597, 599, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 1,
-
600, 573, 597, 1, 597, 29, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
574, 1, 1, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 597, 597, 597, 597,
-
597, 597, 597, 597, 1, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 1, 564,
-
564, 601, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 1,
-
602, 603, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 1, 604, 1, 564,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 564, 1,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
564, 564, 564, 564, 564, 564, 564, 564,
-
1, 605, 1, 1, 1, 606, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
605, 607, 598, 607, 607, 607, 607, 607,
-
608, 1, 607, 607, 1, 607, 609, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 1, 572, 573, 607, 1, 607,
-
1, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 574, 1, 1, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 1,
-
605, 1, 1, 1, 606, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 605,
-
575, 576, 575, 575, 575, 575, 575, 608,
-
1, 575, 575, 1, 575, 610, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 1, 572, 578, 575, 1, 575, 1,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 574, 1, 1, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 1, 611,
-
1, 612, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
612, 1, 613, 1, 1, 1, 614, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 613, 583, 584, 583, 583, 583, 583,
-
583, 615, 1, 583, 583, 1, 583, 616,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 1, 587, 588, 583, 1,
-
583, 1, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 589, 1, 1, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
1, 617, 593, 617, 617, 617, 617, 617,
-
1, 1, 617, 617, 1, 617, 90, 617,
-
617, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 1, 1, 1, 617, 1, 617,
-
1, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 617, 1, 1, 1, 617, 617,
-
617, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 617, 617, 617, 617, 617, 617,
-
617, 617, 617, 617, 617, 617, 617, 1,
-
618, 1, 1, 1, 619, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 618,
-
23, 24, 23, 23, 23, 23, 23, 620,
-
1, 23, 23, 1, 23, 26, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 1, 27, 28, 23, 1, 23, 29,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 30, 1, 1, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 1, 621,
-
1, 1, 1, 622, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 621, 33,
-
34, 33, 33, 33, 33, 33, 623, 1,
-
33, 33, 1, 33, 624, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
1, 37, 38, 33, 1, 33, 39, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 40, 1, 1, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 1, 625, 1,
-
626, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 626,
-
1, 627, 1, 1, 1, 628, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
627, 629, 630, 629, 629, 629, 629, 629,
-
631, 1, 629, 629, 1, 629, 632, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 1, 633, 634, 629, 1, 629,
-
635, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 636, 1, 1, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 1,
-
637, 1, 1, 1, 638, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 637,
-
639, 640, 639, 639, 639, 639, 639, 641,
-
1, 639, 639, 1, 639, 642, 639, 639,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 1, 643, 644, 639, 1, 639, 29,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 639, 645, 1, 1, 639, 639, 639,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 639, 639, 639, 639, 639, 639, 639,
-
639, 639, 639, 639, 639, 639, 1, 646,
-
1, 1, 1, 647, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 646, 648,
-
649, 648, 648, 648, 648, 648, 650, 1,
-
648, 648, 1, 648, 651, 648, 648, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
1, 652, 653, 648, 1, 648, 39, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
648, 654, 1, 1, 648, 648, 648, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
648, 648, 648, 648, 648, 648, 648, 648,
-
648, 648, 648, 648, 648, 1, 655, 1,
-
656, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 656,
-
1, 657, 1, 1, 1, 658, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
657, 659, 660, 659, 659, 659, 659, 659,
-
661, 1, 659, 659, 1, 659, 662, 659,
-
659, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 1, 663, 664, 659, 1, 659,
-
635, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 659, 665, 1, 1, 659, 659,
-
659, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 659, 659, 659, 659, 659, 659,
-
659, 659, 659, 659, 659, 659, 659, 1,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
593, 1, 666, 666, 667, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 593,
-
666, 1, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 668, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 1,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 1, 666, 666, 669, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 617, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 668, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 1,
-
670, 1, 666, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 666, 1, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 666, 666, 666, 666, 666,
-
666, 666, 666, 1, 671, 1, 593, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 593, 1, 672,
-
1, 1, 1, 673, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 672, 674,
-
1, 674, 674, 674, 674, 674, 675, 1,
-
674, 674, 1, 674, 1, 674, 674, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
1, 1, 1, 674, 1, 674, 1, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
674, 1, 1, 1, 674, 674, 674, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
674, 674, 674, 674, 674, 674, 674, 674,
-
674, 674, 674, 674, 674, 1, 566, 1,
-
1, 1, 567, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 566, 568, 569,
-
568, 568, 568, 568, 568, 570, 1, 568,
-
568, 1, 568, 571, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 1,
-
600, 573, 568, 1, 568, 29, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
574, 1, 1, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 568, 568, 568, 568,
-
568, 568, 568, 568, 1, 676, 676, 676,
-
676, 676, 676, 676, 676, 677, 1, 676,
-
676, 678, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 677, 676, 46, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
679, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 676, 676, 676, 676,
-
676, 676, 676, 676, 1, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 1, 680,
-
680, 681, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 682, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
683, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 1, 684, 1, 680,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 680, 1,
-
605, 1, 1, 1, 606, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 605,
-
685, 569, 685, 685, 685, 685, 685, 608,
-
1, 685, 685, 1, 685, 686, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 1, 687, 573, 685, 1, 685, 61,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 574, 1, 1, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 1, 605,
-
1, 1, 1, 606, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 605, 685,
-
569, 685, 685, 685, 685, 685, 608, 1,
-
685, 685, 1, 685, 686, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
1, 600, 573, 685, 1, 685, 29, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 574, 1, 1, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 1, 688, 689,
-
688, 688, 688, 688, 688, 1, 1, 688,
-
688, 1, 688, 690, 688, 688, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 1,
-
1, 1, 688, 1, 688, 1, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 688,
-
1, 1, 1, 688, 688, 688, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 688,
-
688, 688, 688, 688, 688, 688, 688, 688,
-
688, 688, 688, 688, 1, 691, 691, 691,
-
691, 691, 691, 691, 691, 689, 1, 691,
-
691, 692, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 689, 691, 1, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
693, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 1, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 1, 691,
-
691, 694, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 688, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
693, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 1, 695, 1, 691,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 691, 1,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
691, 691, 691, 691, 691, 691, 691, 691,
-
1, 696, 1, 689, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 689, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 697, 1, 680,
-
680, 698, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 697, 680, 699, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
683, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 680, 680, 680, 680,
-
680, 680, 680, 680, 1, 700, 1, 697,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 697, 1,
-
701, 1, 1, 1, 702, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 701,
-
703, 704, 703, 703, 703, 703, 703, 705,
-
1, 703, 703, 1, 703, 706, 703, 703,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 1, 707, 708, 703, 1, 703, 709,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 703, 710, 1, 1, 703, 703, 703,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 703, 703, 703, 703, 703, 703, 703,
-
703, 703, 703, 703, 703, 703, 1, 701,
-
1, 1, 1, 702, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 701, 711,
-
712, 711, 711, 711, 711, 711, 705, 1,
-
711, 711, 1, 711, 713, 711, 711, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
1, 707, 714, 711, 1, 711, 709, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
711, 710, 1, 1, 711, 711, 711, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
711, 711, 711, 711, 711, 711, 711, 711,
-
711, 711, 711, 711, 711, 1, 715, 1,
-
716, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 716,
-
1, 717, 1, 1, 1, 718, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
717, 719, 720, 719, 719, 719, 719, 719,
-
721, 1, 719, 719, 1, 719, 722, 719,
-
719, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 1, 723, 724, 719, 1, 719,
-
725, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 719, 726, 1, 1, 719, 719,
-
719, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 719, 719, 719, 719, 719, 719,
-
719, 719, 719, 719, 719, 719, 719, 1,
-
590, 1, 1, 1, 591, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 590,
-
727, 689, 727, 727, 727, 727, 727, 594,
-
1, 727, 727, 1, 727, 690, 727, 727,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 1, 1, 1, 727, 1, 727, 1,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 727, 1, 1, 1, 727, 727, 727,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 727, 727, 727, 727, 727, 727, 727,
-
727, 727, 727, 727, 727, 727, 1, 728,
-
728, 728, 728, 728, 728, 728, 728, 561,
-
1, 728, 728, 729, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 561, 728,
-
1, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 730, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 1, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
1, 728, 728, 731, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
732, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 730, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 1, 733,
-
1, 728, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
728, 1, 605, 1, 1, 1, 606, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 605, 685, 569, 685, 685, 685, 685,
-
685, 608, 1, 685, 685, 1, 685, 686,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 1, 572, 573, 685, 1,
-
685, 1, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 574, 1, 1, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
685, 685, 685, 685, 685, 685, 685, 685,
-
1, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 728, 728, 728, 728, 728, 728, 728,
-
728, 1, 734, 1, 561, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 561, 1, 735, 1, 1,
-
1, 736, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 735, 737, 738, 737,
-
737, 737, 737, 737, 739, 1, 737, 737,
-
1, 737, 740, 737, 737, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 1, 1,
-
1, 737, 1, 737, 1, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 737, 741,
-
1, 1, 737, 737, 737, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 737, 737,
-
737, 737, 737, 737, 737, 737, 737, 737,
-
737, 737, 737, 1, 732, 561, 732, 732,
-
732, 732, 732, 1, 1, 732, 732, 1,
-
732, 563, 732, 732, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 1, 1, 1,
-
732, 1, 732, 1, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 732, 1, 1,
-
1, 732, 732, 732, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 732, 732, 732,
-
732, 732, 732, 732, 732, 732, 732, 732,
-
732, 732, 1, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 1, 742, 742, 743,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 744, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 745, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 742, 742, 742, 742, 742, 742,
-
742, 742, 1, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 1, 746, 746, 747,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 748, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 749, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 1, 750, 1, 746, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 746, 1, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 746, 746,
-
746, 746, 746, 746, 746, 746, 1, 751,
-
1, 1, 1, 752, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 751, 753,
-
754, 753, 753, 753, 753, 753, 755, 1,
-
753, 753, 1, 753, 1, 753, 753, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
1, 1, 1, 753, 1, 753, 1, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
753, 1, 1, 1, 753, 753, 753, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
753, 753, 753, 753, 753, 753, 753, 753,
-
753, 753, 753, 753, 753, 1, 756, 1,
-
1, 1, 757, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 756, 23, 24,
-
23, 23, 23, 23, 23, 758, 1, 23,
-
23, 1, 23, 26, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 1,
-
27, 28, 23, 1, 23, 29, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
30, 1, 1, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 1, 759, 1, 1,
-
1, 760, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 759, 33, 34, 33,
-
33, 33, 33, 33, 761, 1, 33, 33,
-
1, 33, 762, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 1, 37,
-
38, 33, 1, 33, 39, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 40,
-
1, 1, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 33, 33, 33, 33, 33,
-
33, 33, 33, 1, 763, 1, 764, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 764, 1, 765,
-
1, 1, 1, 766, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 765, 629,
-
630, 629, 629, 629, 629, 629, 767, 1,
-
629, 629, 1, 629, 768, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
1, 633, 634, 629, 1, 629, 635, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 636, 1, 1, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 1, 769, 769,
-
769, 769, 769, 769, 769, 769, 770, 1,
-
769, 769, 771, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 770, 769, 744,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 772, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 769, 769, 769,
-
769, 769, 769, 769, 769, 1, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 1,
-
773, 773, 774, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 775,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 776, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 1, 777, 1,
-
773, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 773,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 778, 1, 773, 773, 779, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 778, 773, 748, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 776, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 773, 773, 773, 773, 773, 773, 773,
-
773, 1, 780, 1, 778, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 778, 1, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 1, 48, 48,
-
48, 48, 48, 48, 48, 48, 781, 1,
-
48, 48, 782, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 781, 48, 699,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 51, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 48, 48, 48,
-
48, 48, 48, 48, 48, 1, 783, 1,
-
781, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 781,
-
1, 784, 1, 1, 1, 785, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
784, 629, 630, 629, 629, 629, 629, 629,
-
786, 1, 629, 629, 1, 629, 787, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 1, 633, 634, 629, 1, 629,
-
635, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 636, 1, 1, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 629,
-
629, 629, 629, 629, 629, 629, 629, 1,
-
788, 1, 1, 1, 789, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 788,
-
790, 88, 790, 790, 790, 790, 790, 791,
-
1, 790, 790, 1, 790, 90, 790, 790,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 1, 1, 1, 790, 1, 790, 1,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 790, 1, 1, 1, 790, 790, 790,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 790, 790, 790, 790, 790, 790, 790,
-
790, 790, 790, 790, 790, 790, 1, 788,
-
1, 1, 1, 789, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 788, 792,
-
92, 792, 792, 792, 792, 792, 791, 1,
-
792, 792, 1, 792, 1, 792, 792, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
1, 1, 1, 792, 1, 792, 1, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
792, 1, 1, 1, 792, 792, 792, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
792, 792, 792, 792, 792, 792, 792, 792,
-
792, 792, 792, 792, 792, 1, 793, 1,
-
788, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 788,
-
1, 794, 1, 1, 1, 795, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
794, 607, 598, 607, 607, 607, 607, 607,
-
796, 1, 607, 607, 1, 607, 797, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 1, 572, 573, 607, 1, 607,
-
98, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 574, 1, 1, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 607,
-
607, 607, 607, 607, 607, 607, 607, 1,
-
794, 1, 1, 1, 795, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 794,
-
575, 576, 575, 575, 575, 575, 575, 796,
-
1, 575, 575, 1, 575, 798, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 1, 572, 578, 575, 1, 575, 98,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 574, 1, 1, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 575, 575,
-
575, 575, 575, 575, 575, 575, 1, 799,
-
1, 800, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
800, 1, 801, 1, 1, 1, 802, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 801, 583, 584, 583, 583, 583, 583,
-
583, 803, 1, 583, 583, 1, 583, 804,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 1, 587, 588, 583, 1,
-
583, 108, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 589, 1, 1, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
583, 583, 583, 583, 583, 583, 583, 583,
-
1, 805, 1, 1, 1, 806, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
805, 807, 754, 807, 807, 807, 807, 807,
-
808, 1, 807, 807, 1, 807, 1, 807,
-
807, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 1, 1, 1, 807, 1, 807,
-
1, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 807, 1, 1, 1, 807, 807,
-
807, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 807, 807, 807, 807, 807, 807,
-
807, 807, 807, 807, 807, 807, 807, 1,
-
21, 1, 1, 1, 22, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 21,
-
23, 24, 23, 23, 23, 23, 23, 809,
-
1, 23, 23, 1, 23, 26, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 1, 27, 28, 23, 1, 23, 29,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 30, 1, 1, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 23, 23,
-
23, 23, 23, 23, 23, 23, 1, 810,
-
1, 1, 1, 811, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 810, 102,
-
103, 102, 102, 102, 102, 102, 812, 1,
-
102, 102, 1, 102, 813, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
1, 106, 107, 102, 1, 102, 1, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 109, 1, 1, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 102, 102, 102,
-
102, 102, 102, 102, 102, 1, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 1,
-
814, 814, 815, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 816, 817, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 818, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 814, 814, 814,
-
814, 814, 814, 814, 814, 1, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 1,
-
819, 819, 820, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 821, 822, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 823, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 1, 824, 1,
-
819, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 819,
-
1, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 819, 819, 819, 819, 819, 819, 819,
-
819, 1, 825, 1, 1, 1, 826, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 825, 1, 1, 1, 1, 1, 1,
-
1, 827, 1, 227, 1, 1, 1, 828,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 227, 1, 1, 1, 1, 1,
-
1, 1, 829, 1, 830, 1, 1, 1,
-
831, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 830, 1, 1, 1, 1,
-
1, 1, 1, 832, 1, 825, 1, 1,
-
1, 826, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 825, 1, 1, 1,
-
1, 1, 1, 1, 827, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
833, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 833,
-
1, 825, 1, 1, 1, 826, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
825, 1, 1, 1, 1, 1, 1, 1,
-
827, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 833, 1, 825,
-
1, 1, 1, 826, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 825, 1,
-
1, 1, 1, 1, 1, 1, 827, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 1, 1, 1, 1, 1, 1,
-
1, 1, 199, 1, 1, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_received_trans_targs
-
1
private :_received_trans_targs, :_received_trans_targs=
-
end
-
1
self._received_trans_targs = [
-
2, 0, 3, 5, 9, 376, 287, 26,
-
116, 278, 2, 3, 5, 9, 376, 287,
-
26, 116, 278, 4, 2, 6, 7, 5,
-
9, 364, 293, 26, 116, 263, 278, 6,
-
7, 5, 9, 364, 365, 26, 116, 263,
-
278, 8, 6, 10, 361, 362, 325, 360,
-
10, 11, 13, 360, 12, 14, 15, 5,
-
9, 17, 293, 26, 116, 263, 278, 14,
-
15, 5, 9, 17, 18, 26, 116, 263,
-
278, 16, 14, 14, 15, 5, 9, 17,
-
18, 26, 116, 263, 278, 19, 20, 347,
-
352, 346, 287, 22, 341, 21, 22, 23,
-
25, 18, 263, 24, 22, 23, 5, 9,
-
25, 18, 26, 116, 263, 278, 27, 28,
-
30, 31, 96, 107, 109, 111, 114, 27,
-
28, 30, 31, 29, 27, 28, 30, 31,
-
96, 107, 109, 111, 114, 32, 33, 35,
-
36, 81, 83, 85, 88, 90, 92, 94,
-
34, 32, 33, 35, 36, 81, 83, 85,
-
88, 90, 92, 94, 37, 80, 38, 39,
-
41, 42, 40, 38, 39, 41, 42, 43,
-
44, 45, 47, 48, 46, 44, 45, 47,
-
48, 49, 50, 52, 53, 51, 49, 50,
-
52, 53, 54, 56, 57, 55, 54, 56,
-
57, 58, 59, 60, 62, 63, 73, 382,
-
385, 386, 387, 61, 59, 60, 62, 63,
-
64, 66, 67, 65, 64, 66, 67, 68,
-
69, 70, 72, 71, 69, 70, 72, 74,
-
75, 76, 78, 383, 82, 84, 86, 87,
-
89, 91, 93, 95, 97, 98, 99, 101,
-
102, 100, 98, 99, 101, 102, 103, 104,
-
106, 103, 104, 106, 105, 103, 104, 106,
-
108, 110, 112, 113, 115, 117, 118, 120,
-
198, 215, 216, 238, 220, 117, 118, 215,
-
216, 220, 119, 121, 122, 120, 172, 124,
-
184, 2, 133, 121, 122, 124, 125, 133,
-
123, 121, 122, 124, 125, 2, 133, 126,
-
128, 166, 171, 127, 129, 130, 132, 133,
-
131, 129, 130, 132, 133, 134, 135, 137,
-
147, 161, 156, 162, 134, 135, 137, 147,
-
161, 156, 162, 136, 138, 139, 141, 160,
-
2, 142, 140, 138, 139, 141, 142, 2,
-
143, 145, 146, 144, 143, 145, 146, 148,
-
158, 157, 149, 151, 150, 152, 153, 155,
-
154, 152, 153, 155, 159, 134, 135, 137,
-
147, 161, 156, 162, 163, 165, 164, 167,
-
168, 129, 170, 167, 168, 129, 170, 169,
-
126, 128, 166, 171, 173, 182, 181, 174,
-
176, 175, 177, 178, 180, 177, 178, 180,
-
179, 177, 178, 180, 183, 185, 186, 189,
-
188, 185, 186, 188, 187, 185, 186, 188,
-
190, 195, 196, 194, 190, 191, 193, 194,
-
192, 195, 196, 197, 199, 208, 209, 211,
-
207, 199, 200, 202, 207, 201, 203, 204,
-
206, 133, 203, 204, 206, 133, 205, 203,
-
204, 206, 133, 208, 209, 211, 210, 211,
-
212, 214, 133, 213, 211, 212, 214, 133,
-
117, 118, 120, 198, 215, 216, 238, 220,
-
217, 219, 218, 217, 219, 221, 222, 224,
-
244, 258, 253, 259, 221, 222, 224, 244,
-
258, 253, 259, 223, 225, 226, 228, 229,
-
257, 233, 239, 227, 225, 226, 228, 229,
-
239, 233, 229, 230, 232, 233, 231, 229,
-
230, 232, 233, 234, 235, 120, 198, 237,
-
238, 234, 235, 237, 236, 234, 235, 237,
-
238, 240, 242, 243, 241, 240, 242, 243,
-
245, 255, 254, 246, 248, 247, 249, 250,
-
252, 251, 249, 250, 252, 256, 221, 222,
-
224, 244, 258, 253, 259, 260, 262, 261,
-
264, 265, 267, 331, 339, 340, 264, 265,
-
267, 331, 339, 340, 278, 266, 268, 269,
-
306, 307, 271, 330, 26, 116, 278, 5,
-
9, 272, 116, 270, 268, 268, 269, 5,
-
9, 271, 272, 26, 116, 278, 273, 274,
-
277, 298, 305, 276, 275, 277, 9, 272,
-
26, 279, 281, 282, 280, 283, 284, 5,
-
286, 287, 287, 285, 283, 283, 284, 286,
-
287, 288, 289, 290, 292, 289, 290, 292,
-
287, 291, 289, 289, 290, 5, 9, 292,
-
287, 26, 116, 263, 278, 294, 295, 5,
-
9, 297, 293, 26, 116, 278, 294, 295,
-
5, 9, 297, 287, 26, 116, 278, 296,
-
294, 294, 295, 5, 9, 297, 287, 26,
-
116, 278, 299, 303, 302, 300, 301, 304,
-
273, 274, 276, 305, 308, 322, 323, 321,
-
308, 309, 311, 321, 310, 312, 313, 26,
-
312, 314, 313, 315, 319, 318, 316, 317,
-
320, 322, 323, 325, 324, 326, 327, 5,
-
9, 329, 18, 26, 116, 263, 278, 5,
-
9, 18, 116, 328, 326, 326, 327, 5,
-
9, 329, 18, 26, 116, 263, 278, 306,
-
332, 337, 336, 333, 335, 334, 338, 264,
-
265, 267, 331, 339, 340, 278, 342, 343,
-
22, 345, 342, 343, 22, 345, 344, 19,
-
20, 22, 341, 346, 348, 349, 351, 348,
-
349, 351, 18, 350, 348, 348, 349, 351,
-
18, 353, 357, 358, 356, 353, 354, 347,
-
356, 355, 357, 358, 359, 361, 362, 363,
-
6, 7, 364, 365, 366, 367, 375, 374,
-
369, 368, 370, 371, 373, 365, 365, 372,
-
370, 370, 371, 373, 365, 366, 367, 369,
-
374, 364, 2, 3, 376, 287, 378, 379,
-
378, 388, 381, 378, 379, 378, 388, 381,
-
380, 383, 77, 384, 77, 384, 383, 77,
-
384, 79
-
]
-
-
1
class << self
-
1
attr_accessor :_received_trans_actions
-
1
private :_received_trans_actions, :_received_trans_actions=
-
end
-
1
self._received_trans_actions = [
-
1, 0, 1, 1, 1, 2, 1, 3,
-
4, 5, 6, 6, 6, 6, 7, 6,
-
8, 9, 10, 0, 0, 11, 11, 11,
-
11, 12, 11, 13, 14, 15, 16, 17,
-
17, 18, 18, 19, 18, 20, 21, 22,
-
23, 0, 0, 24, 24, 24, 25, 24,
-
0, 0, 26, 0, 0, 27, 27, 27,
-
27, 28, 27, 29, 30, 31, 32, 33,
-
33, 34, 34, 35, 34, 36, 37, 38,
-
39, 0, 0, 40, 40, 41, 41, 42,
-
41, 43, 44, 45, 46, 0, 0, 0,
-
0, 47, 0, 0, 0, 0, 6, 6,
-
7, 6, 0, 0, 48, 48, 48, 48,
-
49, 48, 50, 51, 52, 53, 54, 54,
-
55, 54, 0, 0, 0, 0, 0, 0,
-
0, 47, 0, 0, 52, 52, 56, 52,
-
52, 52, 52, 52, 52, 0, 0, 47,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 52, 52, 56, 52, 52, 52, 52,
-
52, 52, 52, 52, 0, 0, 0, 0,
-
47, 0, 0, 52, 52, 56, 52, 0,
-
0, 0, 47, 57, 0, 52, 52, 56,
-
58, 0, 0, 47, 0, 0, 52, 52,
-
56, 52, 0, 47, 0, 0, 52, 56,
-
52, 0, 0, 0, 47, 0, 0, 0,
-
0, 0, 0, 0, 52, 52, 56, 52,
-
0, 47, 0, 0, 52, 56, 52, 0,
-
0, 0, 47, 0, 52, 52, 56, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 47,
-
0, 0, 52, 52, 56, 52, 54, 54,
-
59, 0, 0, 47, 0, 52, 52, 56,
-
0, 0, 0, 0, 0, 60, 60, 61,
-
61, 62, 63, 61, 63, 0, 0, 47,
-
0, 0, 0, 64, 64, 0, 0, 65,
-
0, 64, 15, 0, 0, 47, 0, 22,
-
0, 52, 52, 56, 52, 52, 66, 0,
-
0, 0, 47, 0, 0, 0, 47, 0,
-
0, 52, 52, 56, 52, 10, 10, 10,
-
10, 67, 10, 10, 0, 0, 0, 0,
-
47, 0, 0, 0, 0, 0, 47, 0,
-
68, 0, 0, 52, 52, 56, 52, 69,
-
0, 0, 47, 0, 52, 52, 56, 0,
-
0, 0, 0, 0, 0, 0, 0, 47,
-
0, 52, 52, 56, 0, 52, 52, 52,
-
52, 56, 52, 52, 0, 0, 0, 24,
-
24, 25, 24, 0, 0, 26, 0, 0,
-
52, 52, 52, 56, 0, 0, 0, 0,
-
0, 0, 64, 64, 65, 0, 0, 47,
-
0, 52, 52, 56, 0, 64, 64, 0,
-
65, 0, 0, 47, 0, 52, 52, 56,
-
24, 24, 24, 24, 0, 0, 26, 0,
-
0, 0, 0, 0, 24, 24, 24, 25,
-
24, 0, 0, 26, 0, 0, 64, 64,
-
65, 31, 0, 0, 47, 38, 0, 52,
-
52, 56, 45, 0, 0, 26, 0, 0,
-
0, 47, 70, 0, 52, 52, 56, 71,
-
52, 52, 72, 72, 56, 52, 72, 52,
-
0, 47, 0, 52, 56, 10, 10, 10,
-
10, 67, 10, 10, 0, 0, 0, 0,
-
47, 0, 0, 0, 0, 0, 47, 68,
-
0, 68, 0, 0, 52, 52, 56, 69,
-
52, 69, 0, 0, 47, 0, 0, 52,
-
52, 56, 52, 73, 73, 73, 73, 74,
-
73, 0, 0, 47, 0, 52, 52, 56,
-
0, 0, 0, 47, 0, 52, 52, 56,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
47, 0, 52, 52, 56, 0, 52, 52,
-
52, 52, 56, 52, 52, 0, 0, 0,
-
10, 10, 10, 10, 67, 10, 0, 0,
-
0, 0, 47, 0, 0, 0, 75, 75,
-
75, 75, 76, 75, 77, 78, 79, 80,
-
80, 80, 81, 0, 0, 82, 82, 83,
-
83, 84, 83, 85, 86, 87, 0, 0,
-
0, 0, 47, 0, 0, 75, 75, 75,
-
88, 0, 0, 0, 0, 75, 75, 75,
-
76, 75, 80, 0, 0, 82, 82, 84,
-
83, 0, 11, 11, 89, 17, 17, 19,
-
18, 0, 0, 90, 90, 91, 91, 92,
-
91, 93, 94, 66, 95, 96, 96, 96,
-
96, 97, 96, 98, 99, 100, 101, 101,
-
102, 102, 103, 102, 104, 105, 106, 0,
-
0, 107, 107, 108, 108, 109, 108, 110,
-
111, 112, 0, 0, 0, 0, 0, 0,
-
52, 52, 52, 56, 24, 24, 24, 24,
-
0, 0, 26, 0, 0, 75, 75, 113,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 26, 0, 114, 114, 114,
-
114, 115, 114, 116, 117, 70, 118, 119,
-
119, 119, 120, 0, 0, 121, 121, 122,
-
122, 123, 122, 124, 125, 71, 126, 0,
-
0, 0, 0, 0, 0, 0, 0, 52,
-
52, 52, 52, 56, 52, 52, 24, 24,
-
25, 24, 0, 0, 26, 0, 0, 52,
-
52, 52, 52, 56, 11, 11, 89, 17,
-
17, 19, 18, 0, 0, 90, 90, 92,
-
91, 24, 24, 24, 24, 0, 0, 26,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
90, 90, 92, 91, 0, 0, 0, 47,
-
0, 0, 75, 75, 76, 75, 80, 0,
-
0, 82, 82, 84, 83, 52, 52, 52,
-
56, 89, 48, 48, 49, 48, 127, 127,
-
128, 129, 127, 0, 0, 47, 130, 0,
-
0, 131, 131, 132, 0, 47, 52, 52,
-
56, 0
-
]
-
-
1
class << self
-
1
attr_accessor :_received_eof_actions
-
1
private :_received_eof_actions, :_received_eof_actions=
-
end
-
1
self._received_eof_actions = [
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 0, 0,
-
0, 0, 0, 0, 0, 0, 131, 0,
-
52, 131, 131, 131, 0
-
]
-
-
1
class << self
-
1
attr_accessor :received_start
-
end
-
1
self.received_start = 1;
-
1
class << self
-
1
attr_accessor :received_first_final
-
end
-
1
self.received_first_final = 382;
-
1
class << self
-
1
attr_accessor :received_error
-
end
-
1
self.received_error = 0;
-
-
1
class << self
-
1
attr_accessor :received_en_comment_tail
-
end
-
1
self.received_en_comment_tail = 377;
-
1
class << self
-
1
attr_accessor :received_en_main
-
end
-
1
self.received_en_main = 1;
-
-
-
# line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl"
-
-
1
def self.parse(data)
-
p = 0
-
eof = data.length
-
stack = []
-
-
actions = []
-
data_unpacked = data.bytes.to_a
-
-
# line 3475 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb"
-
begin
-
p ||= 0
-
pe ||= data.length
-
cs = received_start
-
top = 0
-
end
-
-
# line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl"
-
-
# line 3485 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb"
-
begin
-
testEof = false
-
_slen, _trans, _keys, _inds, _acts, _nacts = nil
-
_goto_level = 0
-
_resume = 10
-
_eof_trans = 15
-
_again = 20
-
_test_eof = 30
-
_out = 40
-
while true
-
if _goto_level <= 0
-
if p == pe
-
_goto_level = _test_eof
-
next
-
end
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
end
-
if _goto_level <= _resume
-
_keys = cs << 1
-
_inds = _received_index_offsets[cs]
-
_slen = _received_key_spans[cs]
-
_trans = if ( _slen > 0 &&
-
_received_trans_keys[_keys] <= ( data_unpacked[p]) &&
-
( data_unpacked[p]) <= _received_trans_keys[_keys + 1]
-
) then
-
_received_indicies[ _inds + ( data_unpacked[p]) - _received_trans_keys[_keys] ]
-
else
-
_received_indicies[ _inds + _slen ]
-
end
-
cs = _received_trans_targs[_trans]
-
if _received_trans_actions[_trans] != 0
-
case _received_trans_actions[_trans]
-
when 9 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 52 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 127 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
when 54 then
-
# line 12 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(9, p) end
-
when 68 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 10 then
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 22 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 64 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
when 61 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 70 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 63 then
-
# line 34 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(31, p) end
-
when 26 then
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 24 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
when 8 then
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 131 then
-
# line 47 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(44, p) end
-
when 47 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 130 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 81 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 105 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 120 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 51 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 69 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 53 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 66 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 72 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 71 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 50 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 56 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 128 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 129 then
-
# line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(5, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
top -= 1
-
cs = stack[top]
-
_goto_level = _again
-
next
-
end
-
end
-
when 57 then
-
# line 11 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(8, p) end
-
# line 48 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(45, p) end
-
when 59 then
-
# line 12 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(9, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 78 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 79 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 77 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 67 then
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 106 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 38 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 104 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 15 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 65 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 6 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 60 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 34 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(31, p) end
-
when 117 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 118 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 116 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 73 then
-
# line 33 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(30, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
when 25 then
-
# line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(39, p) end
-
# line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(38, p) end
-
when 4 then
-
# line 44 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(41, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 5 then
-
# line 44 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(41, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 3 then
-
# line 44 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(41, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 132 then
-
# line 47 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(44, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 55 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 12 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(9, p) end
-
when 21 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 86 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 111 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
when 125 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 58 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 11 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(8, p) end
-
# line 48 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(45, p) end
-
when 87 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 85 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 112 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 45 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 110 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 48 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 126 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 124 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 75 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 23 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 20 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 101 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 99 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 100 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 31 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
when 98 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 80 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 102 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 119 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 62 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 34 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(31, p) end
-
when 114 then
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 74 then
-
# line 33 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(30, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
when 1 then
-
# line 44 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(41, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 7 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 37 then
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 94 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 82 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 95 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 93 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 107 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 83 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 108 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 122 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 121 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 49 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 88 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 17 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 39 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 36 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 14 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 16 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 13 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 96 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 18 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 2 then
-
# line 44 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(41, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 76 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 103 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 115 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 44 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
when 90 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 46 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 43 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 91 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 84 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 109 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 123 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 113 then
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 33 then
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 11 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 30 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(3, p) end
-
when 32 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 29 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 43 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(40, p) end
-
when 97 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 34 then
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 19 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 40 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 41 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 92 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 27 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 89 then
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 35 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 12 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 42 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
when 28 then
-
# line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
-
begin
-
begin
-
stack[top] = cs
-
top+= 1
-
cs = 377
-
_goto_level = _again
-
next
-
end
-
end
-
# line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(19, p) end
-
# line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(18, p) end
-
# line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(21, p) end
-
# line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(12, p) end
-
# line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(20, p) end
-
# line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(13, p) end
-
# line 5093 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb"
-
end
-
end
-
end
-
if _goto_level <= _again
-
if cs == 0
-
_goto_level = _out
-
next
-
end
-
p += 1
-
if p != pe
-
_goto_level = _resume
-
next
-
end
-
end
-
if _goto_level <= _test_eof
-
if p == eof
-
case _received_eof_actions[cs]
-
when 52 then
-
# line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(4, p) end
-
when 131 then
-
# line 47 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
-
begin
-
actions.push(44, p) end
-
# line 5119 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb"
-
end
-
end
-
-
end
-
if _goto_level <= _out
-
break
-
end
-
end
-
end
-
-
# line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl"
-
-
if p == eof && cs >=
-
# line 5133 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb"
-
382
-
# line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl"
-
-
return actions, nil
-
else
-
return [], "Only able to parse up to #{data[0..p]}"
-
end
-
end
-
end
-
end
-
end
-
end
-
# frozen_string_literal: true
-
1
module Mail::Parsers
-
1
class ReceivedParser
-
-
1
def parse(s)
-
raise Mail::Field::ParseError.new(Mail::ReceivedElement, s, 'nil is invalid') if s.nil?
-
actions, error = Ragel.parse(:received, s)
-
if error
-
raise Mail::Field::ParseError.new(Mail::ReceivedElement, s, error)
-
end
-
-
received = ReceivedStruct.new
-
-
received_tokens_s = date_s = time_s = nil
-
actions.each_slice(2) do |action_id, p|
-
action = Mail::Parsers::Ragel::ACTIONS[action_id]
-
case action
-
-
# Received Tokens:
-
when :received_tokens_s then received_tokens_s = p
-
when :received_tokens_e
-
received.info = s[received_tokens_s..(p-1)]
-
-
# Date
-
when :date_s then date_s = p
-
when :date_e
-
received.date = s[date_s..(p-1)].strip
-
-
# Time
-
when :time_s then time_s = p
-
when :time_e
-
received.time = s[time_s..(p-1)]
-
-
when :angle_addr_s, :comment_e, :comment_s,
-
:domain_e, :domain_s, :local_dot_atom_e,
-
:local_dot_atom_pre_comment_e,
-
:local_dot_atom_pre_comment_s,
-
:local_dot_atom_s, :qstr_e, :qstr_s,
-
:local_quoted_string_s, :local_quoted_string_e
-
# ignored actions
-
-
else
-
raise Mail::Field::ParseError.new(Mail::ReceivedElement, s, "Failed to process unknown action: #{action}")
-
end
-
end
-
received
-
end
-
end
-
end
-
1
begin
-
1
require "rubygems"
-
1
gem "minitest"
-
rescue Gem::LoadError
-
# do nothing
-
end
-
-
1
require "minitest"
-
1
require "minitest/spec"
-
1
require "minitest/mock"
-
-
1
Minitest.autorun
-
##
-
# It's where you hide your "assertions".
-
#
-
# Please note, because of the way that expectations are implemented,
-
# all expectations (eg must_equal) are dependent upon a thread local
-
# variable +:current_spec+. If your specs rely on mixing threads into
-
# the specs themselves, you're better off using assertions or the new
-
# _(value) wrapper. For example:
-
#
-
# it "should still work in threads" do
-
# my_threaded_thingy do
-
# (1+1).must_equal 2 # bad
-
# assert_equal 2, 1+1 # good
-
# _(1 + 1).must_equal 2 # good
-
# value(1 + 1).must_equal 2 # good, also #expect
-
# end
-
# end
-
-
1
module Minitest::Expectations
-
-
##
-
# See Minitest::Assertions#assert_empty.
-
#
-
# collection.must_be_empty
-
#
-
# :method: must_be_empty
-
-
1
infect_an_assertion :assert_empty, :must_be_empty, :unary
-
-
##
-
# See Minitest::Assertions#assert_equal
-
#
-
# a.must_equal b
-
#
-
# :method: must_equal
-
-
1
infect_an_assertion :assert_equal, :must_equal
-
-
##
-
# See Minitest::Assertions#assert_in_delta
-
#
-
# n.must_be_close_to m [, delta]
-
#
-
# :method: must_be_close_to
-
-
1
infect_an_assertion :assert_in_delta, :must_be_close_to
-
-
1
alias :must_be_within_delta :must_be_close_to # :nodoc:
-
-
##
-
# See Minitest::Assertions#assert_in_epsilon
-
#
-
# n.must_be_within_epsilon m [, epsilon]
-
#
-
# :method: must_be_within_epsilon
-
-
1
infect_an_assertion :assert_in_epsilon, :must_be_within_epsilon
-
-
##
-
# See Minitest::Assertions#assert_includes
-
#
-
# collection.must_include obj
-
#
-
# :method: must_include
-
-
1
infect_an_assertion :assert_includes, :must_include, :reverse
-
-
##
-
# See Minitest::Assertions#assert_instance_of
-
#
-
# obj.must_be_instance_of klass
-
#
-
# :method: must_be_instance_of
-
-
1
infect_an_assertion :assert_instance_of, :must_be_instance_of
-
-
##
-
# See Minitest::Assertions#assert_kind_of
-
#
-
# obj.must_be_kind_of mod
-
#
-
# :method: must_be_kind_of
-
-
1
infect_an_assertion :assert_kind_of, :must_be_kind_of
-
-
##
-
# See Minitest::Assertions#assert_match
-
#
-
# a.must_match b
-
#
-
# :method: must_match
-
-
1
infect_an_assertion :assert_match, :must_match
-
-
##
-
# See Minitest::Assertions#assert_nil
-
#
-
# obj.must_be_nil
-
#
-
# :method: must_be_nil
-
-
1
infect_an_assertion :assert_nil, :must_be_nil, :unary
-
-
##
-
# See Minitest::Assertions#assert_operator
-
#
-
# n.must_be :<=, 42
-
#
-
# This can also do predicates:
-
#
-
# str.must_be :empty?
-
#
-
# :method: must_be
-
-
1
infect_an_assertion :assert_operator, :must_be, :reverse
-
-
##
-
# See Minitest::Assertions#assert_output
-
#
-
# proc { ... }.must_output out_or_nil [, err]
-
#
-
# :method: must_output
-
-
1
infect_an_assertion :assert_output, :must_output, :block
-
-
##
-
# See Minitest::Assertions#assert_raises
-
#
-
# proc { ... }.must_raise exception
-
#
-
# :method: must_raise
-
-
1
infect_an_assertion :assert_raises, :must_raise, :block
-
-
##
-
# See Minitest::Assertions#assert_respond_to
-
#
-
# obj.must_respond_to msg
-
#
-
# :method: must_respond_to
-
-
1
infect_an_assertion :assert_respond_to, :must_respond_to, :reverse
-
-
##
-
# See Minitest::Assertions#assert_same
-
#
-
# a.must_be_same_as b
-
#
-
# :method: must_be_same_as
-
-
1
infect_an_assertion :assert_same, :must_be_same_as
-
-
##
-
# See Minitest::Assertions#assert_silent
-
#
-
# proc { ... }.must_be_silent
-
#
-
# :method: must_be_silent
-
-
1
infect_an_assertion :assert_silent, :must_be_silent, :block
-
-
##
-
# See Minitest::Assertions#assert_throws
-
#
-
# proc { ... }.must_throw sym
-
#
-
# :method: must_throw
-
-
1
infect_an_assertion :assert_throws, :must_throw, :block
-
-
##
-
# See Minitest::Assertions#refute_empty
-
#
-
# collection.wont_be_empty
-
#
-
# :method: wont_be_empty
-
-
1
infect_an_assertion :refute_empty, :wont_be_empty, :unary
-
-
##
-
# See Minitest::Assertions#refute_equal
-
#
-
# a.wont_equal b
-
#
-
# :method: wont_equal
-
-
1
infect_an_assertion :refute_equal, :wont_equal
-
-
##
-
# See Minitest::Assertions#refute_in_delta
-
#
-
# n.wont_be_close_to m [, delta]
-
#
-
# :method: wont_be_close_to
-
-
1
infect_an_assertion :refute_in_delta, :wont_be_close_to
-
-
1
alias :wont_be_within_delta :wont_be_close_to # :nodoc:
-
-
##
-
# See Minitest::Assertions#refute_in_epsilon
-
#
-
# n.wont_be_within_epsilon m [, epsilon]
-
#
-
# :method: wont_be_within_epsilon
-
-
1
infect_an_assertion :refute_in_epsilon, :wont_be_within_epsilon
-
-
##
-
# See Minitest::Assertions#refute_includes
-
#
-
# collection.wont_include obj
-
#
-
# :method: wont_include
-
-
1
infect_an_assertion :refute_includes, :wont_include, :reverse
-
-
##
-
# See Minitest::Assertions#refute_instance_of
-
#
-
# obj.wont_be_instance_of klass
-
#
-
# :method: wont_be_instance_of
-
-
1
infect_an_assertion :refute_instance_of, :wont_be_instance_of
-
-
##
-
# See Minitest::Assertions#refute_kind_of
-
#
-
# obj.wont_be_kind_of mod
-
#
-
# :method: wont_be_kind_of
-
-
1
infect_an_assertion :refute_kind_of, :wont_be_kind_of
-
-
##
-
# See Minitest::Assertions#refute_match
-
#
-
# a.wont_match b
-
#
-
# :method: wont_match
-
-
1
infect_an_assertion :refute_match, :wont_match
-
-
##
-
# See Minitest::Assertions#refute_nil
-
#
-
# obj.wont_be_nil
-
#
-
# :method: wont_be_nil
-
-
1
infect_an_assertion :refute_nil, :wont_be_nil, :unary
-
-
##
-
# See Minitest::Assertions#refute_operator
-
#
-
# n.wont_be :<=, 42
-
#
-
# This can also do predicates:
-
#
-
# str.wont_be :empty?
-
#
-
# :method: wont_be
-
-
1
infect_an_assertion :refute_operator, :wont_be, :reverse
-
-
##
-
# See Minitest::Assertions#refute_respond_to
-
#
-
# obj.wont_respond_to msg
-
#
-
# :method: wont_respond_to
-
-
1
infect_an_assertion :refute_respond_to, :wont_respond_to, :reverse
-
-
##
-
# See Minitest::Assertions#refute_same
-
#
-
# a.wont_be_same_as b
-
#
-
# :method: wont_be_same_as
-
-
1
infect_an_assertion :refute_same, :wont_be_same_as
-
end
-
1
require "minitest/parallel"
-
-
1
class Minitest::Test
-
1
class << self
-
1
alias :old_test_order :test_order # :nodoc:
-
-
1
def test_order # :nodoc:
-
15
:parallel
-
end
-
end
-
end
-
1
class MockExpectationError < StandardError; end # :nodoc:
-
-
1
module Minitest # :nodoc:
-
-
##
-
# A simple and clean mock object framework.
-
#
-
# All mock objects are an instance of Mock
-
-
1
class Mock
-
1
alias :__respond_to? :respond_to?
-
-
1
overridden_methods = %w[
-
===
-
class
-
inspect
-
instance_eval
-
instance_variables
-
object_id
-
public_send
-
respond_to_missing?
-
send
-
to_s
-
]
-
-
1
instance_methods.each do |m|
-
137
undef_method m unless overridden_methods.include?(m.to_s) || m =~ /^__/
-
end
-
-
1
overridden_methods.map(&:to_sym).each do |method_id|
-
10
define_method method_id do |*args, &b|
-
if @expected_calls.key? method_id then
-
method_missing(method_id, *args, &b)
-
else
-
super(*args, &b)
-
end
-
end
-
end
-
-
1
def initialize(delegator = nil) # :nodoc:
-
@delegator = delegator
-
@expected_calls = Hash.new { |calls, name| calls[name] = [] }
-
@actual_calls = Hash.new { |calls, name| calls[name] = [] }
-
end
-
-
##
-
# Expect that method +name+ is called, optionally with +args+ or a
-
# +blk+, and returns +retval+.
-
#
-
# @mock.expect(:meaning_of_life, 42)
-
# @mock.meaning_of_life # => 42
-
#
-
# @mock.expect(:do_something_with, true, [some_obj, true])
-
# @mock.do_something_with(some_obj, true) # => true
-
#
-
# @mock.expect(:do_something_else, true) do |a1, a2|
-
# a1 == "buggs" && a2 == :bunny
-
# end
-
#
-
# +args+ is compared to the expected args using case equality (ie, the
-
# '===' operator), allowing for less specific expectations.
-
#
-
# @mock.expect(:uses_any_string, true, [String])
-
# @mock.uses_any_string("foo") # => true
-
# @mock.verify # => true
-
#
-
# @mock.expect(:uses_one_string, true, ["foo"])
-
# @mock.uses_one_string("bar") # => raises MockExpectationError
-
-
1
def expect(name, retval, args = [], &blk)
-
name = name.to_sym
-
-
if block_given?
-
raise ArgumentError, "args ignored when block given" unless args.empty?
-
@expected_calls[name] << { :retval => retval, :block => blk }
-
else
-
raise ArgumentError, "args must be an array" unless Array === args
-
@expected_calls[name] << { :retval => retval, :args => args }
-
end
-
self
-
end
-
-
1
def __call name, data # :nodoc:
-
case data
-
when Hash then
-
"#{name}(#{data[:args].inspect[1..-2]}) => #{data[:retval].inspect}"
-
else
-
data.map { |d| __call name, d }.join ", "
-
end
-
end
-
-
##
-
# Verify that all methods were called as expected. Raises
-
# +MockExpectationError+ if the mock object was not called as
-
# expected.
-
-
1
def verify
-
@expected_calls.each do |name, expected|
-
actual = @actual_calls.fetch(name, nil)
-
raise MockExpectationError, "expected #{__call name, expected[0]}" unless actual
-
raise MockExpectationError, "expected #{__call name, expected[actual.size]}, got [#{__call name, actual}]" if
-
actual.size < expected.size
-
end
-
true
-
end
-
-
1
def method_missing(sym, *args, &block) # :nodoc:
-
unless @expected_calls.key?(sym) then
-
if @delegator && @delegator.respond_to?(sym)
-
return @delegator.public_send(sym, *args, &block)
-
else
-
raise NoMethodError, "unmocked method %p, expected one of %p" %
-
[sym, @expected_calls.keys.sort_by(&:to_s)]
-
end
-
end
-
-
index = @actual_calls[sym].length
-
expected_call = @expected_calls[sym][index]
-
-
unless expected_call then
-
raise MockExpectationError, "No more expects available for %p: %p" %
-
[sym, args]
-
end
-
-
expected_args, retval, val_block =
-
expected_call.values_at(:args, :retval, :block)
-
-
if val_block then
-
# keep "verify" happy
-
@actual_calls[sym] << expected_call
-
-
raise MockExpectationError, "mocked method %p failed block w/ %p" %
-
[sym, args] unless val_block.call(*args, &block)
-
-
return retval
-
end
-
-
if expected_args.size != args.size then
-
raise ArgumentError, "mocked method %p expects %d arguments, got %d" %
-
[sym, expected_args.size, args.size]
-
end
-
-
zipped_args = expected_args.zip(args)
-
fully_matched = zipped_args.all? { |mod, a|
-
mod === a or mod == a
-
}
-
-
unless fully_matched then
-
raise MockExpectationError, "mocked method %p called with unexpected arguments %p" %
-
[sym, args]
-
end
-
-
@actual_calls[sym] << {
-
:retval => retval,
-
:args => zipped_args.map! { |mod, a| mod === a ? mod : a },
-
}
-
-
retval
-
end
-
-
1
def respond_to?(sym, include_private = false) # :nodoc:
-
return true if @expected_calls.key? sym.to_sym
-
return true if @delegator && @delegator.respond_to?(sym, include_private)
-
__respond_to?(sym, include_private)
-
end
-
end
-
end
-
-
##
-
# Object extensions for Minitest::Mock.
-
-
1
class Object
-
-
##
-
# Add a temporary stubbed method replacing +name+ for the duration
-
# of the +block+. If +val_or_callable+ responds to #call, then it
-
# returns the result of calling it, otherwise returns the value
-
# as-is. If stubbed method yields a block, +block_args+ will be
-
# passed along. Cleans up the stub at the end of the +block+. The
-
# method +name+ must exist before stubbing.
-
#
-
# def test_stale_eh
-
# obj_under_test = Something.new
-
# refute obj_under_test.stale?
-
#
-
# Time.stub :now, Time.at(0) do
-
# assert obj_under_test.stale?
-
# end
-
# end
-
#
-
-
1
def stub name, val_or_callable, *block_args
-
18
new_name = "__minitest_stub__#{name}"
-
-
36
metaclass = class << self; self; end
-
-
18
if respond_to? name and not methods.map(&:to_s).include? name.to_s then
-
metaclass.send :define_method, name do |*args|
-
super(*args)
-
end
-
end
-
-
18
metaclass.send :alias_method, new_name, name
-
-
18
metaclass.send :define_method, name do |*args, &blk|
-
162
ret = if val_or_callable.respond_to? :call then
-
val_or_callable.call(*args)
-
else
-
162
val_or_callable
-
end
-
-
162
blk.call(*block_args) if blk
-
-
162
ret
-
end
-
-
18
yield self
-
ensure
-
18
metaclass.send :undef_method, name
-
18
metaclass.send :alias_method, name, new_name
-
18
metaclass.send :undef_method, new_name
-
end
-
end
-
1
require "minitest"
-
-
1
module Minitest
-
1
def self.plugin_pride_options opts, _options # :nodoc:
-
1
opts.on "-p", "--pride", "Pride. Show your testing pride!" do
-
PrideIO.pride!
-
end
-
end
-
-
1
def self.plugin_pride_init options # :nodoc:
-
1
if PrideIO.pride? then
-
klass = ENV["TERM"] =~ /^xterm|-256color$/ ? PrideLOL : PrideIO
-
io = klass.new options[:io]
-
-
self.reporter.reporters.grep(Minitest::Reporter).each do |rep|
-
rep.io = io if rep.io.tty?
-
end
-
end
-
end
-
-
##
-
# Show your testing pride!
-
-
1
class PrideIO
-
##
-
# Activate the pride plugin. Called from both -p option and minitest/pride
-
-
1
def self.pride!
-
@pride = true
-
end
-
-
##
-
# Are we showing our testing pride?
-
-
1
def self.pride?
-
1
@pride ||= false
-
end
-
-
# Start an escape sequence
-
1
ESC = "\e["
-
-
# End the escape sequence
-
1
NND = "#{ESC}0m"
-
-
# The IO we're going to pipe through.
-
1
attr_reader :io
-
-
1
def initialize io # :nodoc:
-
@io = io
-
# stolen from /System/Library/Perl/5.10.0/Term/ANSIColor.pm
-
# also reference http://en.wikipedia.org/wiki/ANSI_escape_code
-
@colors ||= (31..36).to_a
-
@size = @colors.size
-
@index = 0
-
end
-
-
##
-
# Wrap print to colorize the output.
-
-
1
def print o
-
case o
-
when "." then
-
io.print pride o
-
when "E", "F" then
-
io.print "#{ESC}41m#{ESC}37m#{o}#{NND}"
-
when "S" then
-
io.print pride o
-
else
-
io.print o
-
end
-
end
-
-
1
def puts(*o) # :nodoc:
-
o.map! { |s|
-
s.to_s.sub(/Finished/) {
-
@index = 0
-
"Fabulous run".split(//).map { |c|
-
pride(c)
-
}.join
-
}
-
}
-
-
io.puts(*o)
-
end
-
-
##
-
# Color a string.
-
-
1
def pride string
-
string = "*" if string == "."
-
c = @colors[@index % @size]
-
@index += 1
-
"#{ESC}#{c}m#{string}#{NND}"
-
end
-
-
1
def method_missing msg, *args # :nodoc:
-
io.send(msg, *args)
-
end
-
end
-
-
##
-
# If you thought the PrideIO was colorful...
-
#
-
# (Inspired by lolcat, but with clean math)
-
-
1
class PrideLOL < PrideIO
-
1
PI_3 = Math::PI / 3 # :nodoc:
-
-
1
def initialize io # :nodoc:
-
# walk red, green, and blue around a circle separated by equal thirds.
-
#
-
# To visualize, type this into wolfram-alpha:
-
#
-
# plot (3*sin(x)+3), (3*sin(x+2*pi/3)+3), (3*sin(x+4*pi/3)+3)
-
-
# 6 has wide pretty gradients. 3 == lolcat, about half the width
-
@colors = (0...(6 * 7)).map { |n|
-
n *= 1.0 / 6
-
r = (3 * Math.sin(n ) + 3).to_i
-
g = (3 * Math.sin(n + 2 * PI_3) + 3).to_i
-
b = (3 * Math.sin(n + 4 * PI_3) + 3).to_i
-
-
# Then we take rgb and encode them in a single number using base 6.
-
# For some mysterious reason, we add 16... to clear the bottom 4 bits?
-
# Yes... they're ugly.
-
-
36 * r + 6 * g + b + 16
-
}
-
-
super
-
end
-
-
##
-
# Make the string even more colorful. Damnit.
-
-
1
def pride string
-
c = @colors[@index % @size]
-
@index += 1
-
"#{ESC}38;5;#{c}m#{string}#{NND}"
-
end
-
end
-
end
-
1
require "minitest/test"
-
-
1
class Module # :nodoc:
-
1
def infect_an_assertion meth, new_name, dont_flip = false # :nodoc:
-
59
block = dont_flip == :block
-
59
dont_flip = false if block
-
-
# warn "%-22p -> %p %p" % [meth, new_name, dont_flip]
-
59
self.class_eval <<-EOM, __FILE__, __LINE__ + 1
-
def #{new_name} *args
-
Minitest::Expectation.new(self, Minitest::Spec.current).#{new_name}(*args)
-
end
-
EOM
-
-
59
Minitest::Expectation.class_eval <<-EOM, __FILE__, __LINE__ + 1
-
def #{new_name} *args
-
case
-
when #{!!dont_flip} then
-
ctx.#{meth}(target, *args)
-
when #{block} && Proc === target then
-
ctx.#{meth}(*args, &target)
-
else
-
ctx.#{meth}(args.first, target, *args[1..-1])
-
end
-
end
-
EOM
-
end
-
end
-
-
1
Minitest::Expectation = Struct.new :target, :ctx # :nodoc:
-
-
##
-
# Kernel extensions for minitest
-
-
1
module Kernel
-
##
-
# Describe a series of expectations for a given target +desc+.
-
#
-
# Defines a test class subclassing from either Minitest::Spec or
-
# from the surrounding describe's class. The surrounding class may
-
# subclass Minitest::Spec manually in order to easily share code:
-
#
-
# class MySpec < Minitest::Spec
-
# # ... shared code ...
-
# end
-
#
-
# class TestStuff < MySpec
-
# it "does stuff" do
-
# # shared code available here
-
# end
-
# describe "inner stuff" do
-
# it "still does stuff" do
-
# # ...and here
-
# end
-
# end
-
# end
-
#
-
# For more information on getting started with writing specs, see:
-
#
-
# http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html
-
#
-
# For some suggestions on how to improve your specs, try:
-
#
-
# http://betterspecs.org
-
#
-
# but do note that several items there are debatable or specific to
-
# rspec.
-
#
-
# For more information about expectations, see Minitest::Expectations.
-
-
1
def describe desc, *additional_desc, &block # :doc:
-
stack = Minitest::Spec.describe_stack
-
name = [stack.last, desc, *additional_desc].compact.join("::")
-
sclas = stack.last || if Class === self && kind_of?(Minitest::Spec::DSL) then
-
self
-
else
-
Minitest::Spec.spec_type desc, *additional_desc
-
end
-
-
cls = sclas.create name, desc
-
-
stack.push cls
-
cls.class_eval(&block)
-
stack.pop
-
cls
-
end
-
1
private :describe
-
end
-
-
##
-
# Minitest::Spec -- The faster, better, less-magical spec framework!
-
#
-
# For a list of expectations, see Minitest::Expectations.
-
-
1
class Minitest::Spec < Minitest::Test
-
-
1
def self.current # :nodoc:
-
Thread.current[:current_spec]
-
end
-
-
1
def initialize name # :nodoc:
-
super
-
Thread.current[:current_spec] = self
-
end
-
-
##
-
# Oh look! A Minitest::Spec::DSL module! Eat your heart out DHH.
-
-
1
module DSL
-
##
-
# Contains pairs of matchers and Spec classes to be used to
-
# calculate the superclass of a top-level describe. This allows for
-
# automatically customizable spec types.
-
#
-
# See: register_spec_type and spec_type
-
-
1
TYPES = [[//, Minitest::Spec]]
-
-
##
-
# Register a new type of spec that matches the spec's description.
-
# This method can take either a Regexp and a spec class or a spec
-
# class and a block that takes the description and returns true if
-
# it matches.
-
#
-
# Eg:
-
#
-
# register_spec_type(/Controller$/, Minitest::Spec::Rails)
-
#
-
# or:
-
#
-
# register_spec_type(Minitest::Spec::RailsModel) do |desc|
-
# desc.superclass == ActiveRecord::Base
-
# end
-
-
1
def register_spec_type(*args, &block)
-
20
if block then
-
13
matcher, klass = block, args.first
-
else
-
7
matcher, klass = *args
-
end
-
20
TYPES.unshift [matcher, klass]
-
end
-
-
##
-
# Figure out the spec class to use based on a spec's description. Eg:
-
#
-
# spec_type("BlahController") # => Minitest::Spec::Rails
-
-
1
def spec_type desc, *additional
-
TYPES.find { |matcher, _klass|
-
if matcher.respond_to? :call then
-
matcher.call desc, *additional
-
else
-
matcher === desc.to_s
-
end
-
}.last
-
end
-
-
1
def describe_stack # :nodoc:
-
Thread.current[:describe_stack] ||= []
-
end
-
-
1
def children # :nodoc:
-
@children ||= []
-
end
-
-
1
def nuke_test_methods! # :nodoc:
-
self.public_instance_methods.grep(/^test_/).each do |name|
-
self.send :undef_method, name
-
end
-
end
-
-
##
-
# Define a 'before' action. Inherits the way normal methods should.
-
#
-
# NOTE: +type+ is ignored and is only there to make porting easier.
-
#
-
# Equivalent to Minitest::Test#setup.
-
-
1
def before _type = nil, &block
-
1
define_method :setup do
-
6
super()
-
6
self.instance_eval(&block)
-
end
-
end
-
-
##
-
# Define an 'after' action. Inherits the way normal methods should.
-
#
-
# NOTE: +type+ is ignored and is only there to make porting easier.
-
#
-
# Equivalent to Minitest::Test#teardown.
-
-
1
def after _type = nil, &block
-
1
define_method :teardown do
-
18
self.instance_eval(&block)
-
18
super()
-
end
-
end
-
-
##
-
# Define an expectation with name +desc+. Name gets morphed to a
-
# proper test method name. For some freakish reason, people who
-
# write specs don't like class inheritance, so this goes way out of
-
# its way to make sure that expectations aren't inherited.
-
#
-
# This is also aliased to #specify and doesn't require a +desc+ arg.
-
#
-
# Hint: If you _do_ want inheritance, use minitest/test. You can mix
-
# and match between assertions and expectations as much as you want.
-
-
1
def it desc = "anonymous", &block
-
block ||= proc { skip "(no tests defined)" }
-
-
@specs ||= 0
-
@specs += 1
-
-
name = "test_%04d_%s" % [ @specs, desc ]
-
-
undef_klasses = self.children.reject { |c| c.public_method_defined? name }
-
-
define_method name, &block
-
-
undef_klasses.each do |undef_klass|
-
undef_klass.send :undef_method, name
-
end
-
-
name
-
end
-
-
##
-
# Essentially, define an accessor for +name+ with +block+.
-
#
-
# Why use let instead of def? I honestly don't know.
-
-
1
def let name, &block
-
name = name.to_s
-
pre, post = "let '#{name}' cannot ", ". Please use another name."
-
methods = Minitest::Spec.instance_methods.map(&:to_s) - %w[subject]
-
raise ArgumentError, "#{pre}begin with 'test'#{post}" if
-
name =~ /\Atest/
-
raise ArgumentError, "#{pre}override a method in Minitest::Spec#{post}" if
-
methods.include? name
-
-
define_method name do
-
@_memoized ||= {}
-
@_memoized.fetch(name) { |k| @_memoized[k] = instance_eval(&block) }
-
end
-
end
-
-
##
-
# Another lazy man's accessor generator. Made even more lazy by
-
# setting the name for you to +subject+.
-
-
1
def subject &block
-
let :subject, &block
-
end
-
-
1
def create name, desc # :nodoc:
-
cls = Class.new(self) do
-
@name = name
-
@desc = desc
-
-
nuke_test_methods!
-
end
-
-
children << cls
-
-
cls
-
end
-
-
1
def name # :nodoc:
-
622
defined?(@name) ? @name : super
-
end
-
-
1
def to_s # :nodoc:
-
562
name # Can't alias due to 1.8.7, not sure why
-
end
-
-
1
attr_reader :desc # :nodoc:
-
1
alias :specify :it
-
-
##
-
# Rdoc... why are you so dumb?
-
-
1
module InstanceMethods
-
##
-
# Returns a value monad that has all of Expectations methods
-
# available to it.
-
#
-
# Also aliased to #value and #expect for your aesthetic pleasure:
-
#
-
# _(1 + 1).must_equal 2
-
# value(1 + 1).must_equal 2
-
# expect(1 + 1).must_equal 2
-
#
-
# This method of expectation-based testing is preferable to
-
# straight-expectation methods (on Object) because it stores its
-
# test context, bypassing our hacky use of thread-local variables.
-
#
-
# At some point, the methods on Object will be deprecated and then
-
# removed.
-
-
1
def _ value = nil, &block
-
Minitest::Expectation.new block || value, self
-
end
-
-
1
alias value _
-
1
alias expect _
-
-
1
def before_setup # :nodoc:
-
490
super
-
490
Thread.current[:current_spec] = self
-
end
-
end
-
-
1
def self.extended obj # :nodoc:
-
2
obj.send :include, InstanceMethods
-
end
-
end
-
-
1
extend DSL
-
-
1
TYPES = DSL::TYPES # :nodoc:
-
end
-
-
1
require "minitest/expectations"
-
-
1
class Object # :nodoc:
-
1
include Minitest::Expectations unless ENV["MT_NO_EXPECTATIONS"]
-
end
-
1
module Capybara
-
1
module Assertions
-
1
def self.included(base)
-
2
raise "Make sure to include Capybara::Assertions after Capybara::DSL" unless base < Capybara::DSL
-
end
-
-
1
def assert_text(*args)
-
3
node, *args = prepare_args(args)
-
3
assert node.has_text?(*args), message { "Expected to find text #{args.first.inspect} in #{node.text.inspect}" }
-
end
-
1
alias_method :assert_content, :assert_text
-
-
1
def refute_text(*args)
-
node, *args = prepare_args(args)
-
assert node.has_no_text?(*args), message { "Expected not to find text #{args.first.inspect} in #{node.text.inspect}" }
-
end
-
1
alias_method :assert_no_text, :refute_text
-
1
alias_method :refute_content, :refute_text
-
1
alias_method :assert_no_content, :refute_text
-
-
1
def assert_selector(*args)
-
node, *args = prepare_args(args)
-
assert node.assert_selector(*args)
-
rescue Capybara::ExpectationNotMet => e
-
assert false, e.message
-
end
-
-
1
def refute_selector(*args)
-
node, *args = prepare_args(args)
-
assert node.assert_no_selector(*args)
-
rescue Capybara::ExpectationNotMet => e
-
assert false, e.message
-
end
-
1
alias_method :assert_no_selector, :refute_selector
-
-
1
ruby = ""
-
1
(Minitest::Capybara.assertions - %w[text content selector]).each do |assertion|
-
ruby << <<-RUBY
-
def assert_#{assertion}(*args)
-
node, *args = prepare_args(args)
-
assert node.has_#{assertion}?(*args), message { Capybara::Helpers.failure_message(*args) }
-
end
-
9
RUBY
-
end
-
1
(Minitest::Capybara.refutations - %w[text content selector]).each do |refutation|
-
ruby << <<-RUBY
-
def refute_#{refutation}(*args)
-
node, *args = prepare_args(args)
-
assert node.has_no_#{refutation}?(*args), message { Capybara::Helpers.failure_message(*args) }
-
end
-
alias_method :assert_no_#{refutation}, :refute_#{refutation}
-
9
RUBY
-
end
-
1
class_eval(ruby)
-
-
##
-
# Assertion that there is button
-
#
-
# see Capybara::Assertions#refute_button
-
# see Capybara::Assertions#assert_no_button
-
# see Capybara::expectations#must_have_button
-
# see Capybara::expectations#wont_have_button
-
# :method: assert_button
-
-
##
-
# Assertion that there is no button
-
#
-
# see Capybara::Assertions#assert_button
-
# see Capybara::expectations#must_have_button
-
# see Capybara::expectations#wont_have_button
-
# :method: refute_button
-
# :alias: assert_no_button
-
-
-
##
-
# Assertion that there is checked_field
-
#
-
# see Capybara::Assertions#refute_checked_field
-
# see Capybara::Assertions#assert_no_checked_field
-
# see Capybara::expectations#must_have_checked_field
-
# see Capybara::expectations#wont_have_checked_field
-
# :method: assert_checked_field
-
-
##
-
# Assertion that there is no checked_field
-
#
-
# see Capybara::Assertions#assert_checked_field
-
# see Capybara::expectations#must_have_checked_field
-
# see Capybara::expectations#wont_have_checked_field
-
# :method: refute_checked_field
-
# :alias: assert_no_checked_field
-
-
-
##
-
# Assertion that there is content
-
#
-
# see Capybara::Assertions#refute_content
-
# see Capybara::Assertions#assert_no_content
-
# see Capybara::expectations#must_have_content
-
# see Capybara::expectations#wont_have_content
-
# :method: assert_content
-
-
##
-
# Assertion that there is no content
-
#
-
# see Capybara::Assertions#assert_content
-
# see Capybara::expectations#must_have_content
-
# see Capybara::expectations#wont_have_content
-
# :method: refute_content
-
# :alias: assert_no_content
-
-
-
##
-
# Assertion that there is css
-
#
-
# see Capybara::Assertions#refute_css
-
# see Capybara::Assertions#assert_no_css
-
# see Capybara::expectations#must_have_css
-
# see Capybara::expectations#wont_have_css
-
# :method: assert_css
-
-
##
-
# Assertion that there is no css
-
#
-
# see Capybara::Assertions#assert_css
-
# see Capybara::expectations#must_have_css
-
# see Capybara::expectations#wont_have_css
-
# :method: refute_css
-
# :alias: assert_no_css
-
-
-
##
-
# Assertion that there is field
-
#
-
# see Capybara::Assertions#refute_field
-
# see Capybara::Assertions#assert_no_field
-
# see Capybara::expectations#must_have_field
-
# see Capybara::expectations#wont_have_field
-
# :method: assert_field
-
-
##
-
# Assertion that there is no field
-
#
-
# see Capybara::Assertions#assert_field
-
# see Capybara::expectations#must_have_field
-
# see Capybara::expectations#wont_have_field
-
# :method: refute_field
-
# :alias: assert_no_field
-
-
-
##
-
# Assertion that there is link
-
#
-
# see Capybara::Assertions#refute_link
-
# see Capybara::Assertions#assert_no_link
-
# see Capybara::expectations#must_have_link
-
# see Capybara::expectations#wont_have_link
-
# :method: assert_link
-
-
##
-
# Assertion that there is no link
-
#
-
# see Capybara::Assertions#assert_link
-
# see Capybara::expectations#must_have_link
-
# see Capybara::expectations#wont_have_link
-
# :method: refute_link
-
# :alias: assert_no_link
-
-
-
##
-
# Assertion that there is select
-
#
-
# see Capybara::Assertions#refute_select
-
# see Capybara::Assertions#assert_no_select
-
# see Capybara::expectations#must_have_select
-
# see Capybara::expectations#wont_have_select
-
# :method: assert_select
-
-
##
-
# Assertion that there is no select
-
#
-
# see Capybara::Assertions#assert_select
-
# see Capybara::expectations#must_have_select
-
# see Capybara::expectations#wont_have_select
-
# :method: refute_select
-
# :alias: assert_no_select
-
-
-
##
-
# Assertion that there is selector
-
#
-
# see Capybara::Assertions#refute_selector
-
# see Capybara::Assertions#assert_no_selector
-
# see Capybara::expectations#must_have_selector
-
# see Capybara::expectations#wont_have_selector
-
# :method: assert_selector
-
-
##
-
# Assertion that there is no selector
-
#
-
# see Capybara::Assertions#assert_selector
-
# see Capybara::expectations#must_have_selector
-
# see Capybara::expectations#wont_have_selector
-
# :method: refute_selector
-
# :alias: assert_no_selector
-
-
-
##
-
# Assertion that there is table
-
#
-
# see Capybara::Assertions#refute_table
-
# see Capybara::Assertions#assert_no_table
-
# see Capybara::expectations#must_have_table
-
# see Capybara::expectations#wont_have_table
-
# :method: assert_table
-
-
##
-
# Assertion that there is no table
-
#
-
# see Capybara::Assertions#assert_table
-
# see Capybara::expectations#must_have_table
-
# see Capybara::expectations#wont_have_table
-
# :method: refute_table
-
# :alias: assert_no_table
-
-
-
##
-
# Assertion that there is text
-
#
-
# see Capybara::Assertions#refute_text
-
# see Capybara::Assertions#assert_no_text
-
# see Capybara::expectations#must_have_text
-
# see Capybara::expectations#wont_have_text
-
# :method: assert_text
-
-
##
-
# Assertion that there is no text
-
#
-
# see Capybara::Assertions#assert_text
-
# see Capybara::expectations#must_have_text
-
# see Capybara::expectations#wont_have_text
-
# :method: refute_text
-
# :alias: assert_no_text
-
-
-
##
-
# Assertion that there is unchecked_field
-
#
-
# see Capybara::Assertions#refute_unchecked_field
-
# see Capybara::Assertions#assert_no_unchecked_field
-
# see Capybara::expectations#must_have_unchecked_field
-
# see Capybara::expectations#wont_have_unchecked_field
-
# :method: assert_unchecked_field
-
-
##
-
# Assertion that there is no unchecked_field
-
#
-
# see Capybara::Assertions#assert_unchecked_field
-
# see Capybara::expectations#must_have_unchecked_field
-
# see Capybara::expectations#wont_have_unchecked_field
-
# :method: refute_unchecked_field
-
# :alias: assert_no_unchecked_field
-
-
-
##
-
# Assertion that there is xpath
-
#
-
# see Capybara::Assertions#refute_xpath
-
# see Capybara::Assertions#assert_no_xpath
-
# see Capybara::expectations#must_have_xpath
-
# see Capybara::expectations#wont_have_xpath
-
# :method: assert_xpath
-
-
##
-
# Assertion that there is no xpath
-
#
-
# see Capybara::Assertions#assert_xpath
-
# see Capybara::expectations#must_have_xpath
-
# see Capybara::expectations#wont_have_xpath
-
# :method: refute_xpath
-
# :alias: assert_no_xpath
-
-
1
private
-
-
1
def prepare_args(args)
-
3
if args.first.is_a?(Capybara::Session) || args.first.kind_of?(Capybara::Node::Base) ||
-
args.first.is_a?(Capybara::Node::Simple)
-
3
args
-
else
-
[page, *args]
-
end
-
end
-
end
-
end
-
1
require "minitest/spec"
-
-
1
module Capybara
-
1
module Expectations
-
1
Minitest::Capybara.assertions.each do |assertion|
-
12
infect_an_assertion "assert_#{assertion}", "must_have_#{assertion}", :reverse
-
end
-
-
1
Minitest::Capybara.refutations.each do |refutation|
-
12
infect_an_assertion "refute_#{refutation}", "wont_have_#{refutation}", :reverse
-
end
-
-
##
-
# Expectation that there is button
-
#
-
# see Capybara::Expectations#wont_have_button
-
# see Capybara::Assertions#assert_button
-
# see Capybara::Assertions#refute_button
-
# see Capybara::Assertions#assert_no_button
-
# :method: must_have_button
-
-
##
-
# Expectation that there is no button
-
#
-
# see Capybara::Expectations#must_have_button
-
# see Capybara::Assertions#assert_button
-
# see Capybara::Assertions#refute_button
-
# see Capybara::Assertions#assert_no_button
-
# :method: wont_have_button
-
-
-
##
-
# Expectation that there is checked_field
-
#
-
# see Capybara::Expectations#wont_have_checked_field
-
# see Capybara::Assertions#assert_checked_field
-
# see Capybara::Assertions#refute_checked_field
-
# see Capybara::Assertions#assert_no_checked_field
-
# :method: must_have_checked_field
-
-
##
-
# Expectation that there is no checked_field
-
#
-
# see Capybara::Expectations#must_have_checked_field
-
# see Capybara::Assertions#assert_checked_field
-
# see Capybara::Assertions#refute_checked_field
-
# see Capybara::Assertions#assert_no_checked_field
-
# :method: wont_have_checked_field
-
-
-
##
-
# Expectation that there is content
-
#
-
# see Capybara::Expectations#wont_have_content
-
# see Capybara::Assertions#assert_content
-
# see Capybara::Assertions#refute_content
-
# see Capybara::Assertions#assert_no_content
-
# :method: must_have_content
-
-
##
-
# Expectation that there is no content
-
#
-
# see Capybara::Expectations#must_have_content
-
# see Capybara::Assertions#assert_content
-
# see Capybara::Assertions#refute_content
-
# see Capybara::Assertions#assert_no_content
-
# :method: wont_have_content
-
-
-
##
-
# Expectation that there is css
-
#
-
# see Capybara::Expectations#wont_have_css
-
# see Capybara::Assertions#assert_css
-
# see Capybara::Assertions#refute_css
-
# see Capybara::Assertions#assert_no_css
-
# :method: must_have_css
-
-
##
-
# Expectation that there is no css
-
#
-
# see Capybara::Expectations#must_have_css
-
# see Capybara::Assertions#assert_css
-
# see Capybara::Assertions#refute_css
-
# see Capybara::Assertions#assert_no_css
-
# :method: wont_have_css
-
-
-
##
-
# Expectation that there is field
-
#
-
# see Capybara::Expectations#wont_have_field
-
# see Capybara::Assertions#assert_field
-
# see Capybara::Assertions#refute_field
-
# see Capybara::Assertions#assert_no_field
-
# :method: must_have_field
-
-
##
-
# Expectation that there is no field
-
#
-
# see Capybara::Expectations#must_have_field
-
# see Capybara::Assertions#assert_field
-
# see Capybara::Assertions#refute_field
-
# see Capybara::Assertions#assert_no_field
-
# :method: wont_have_field
-
-
-
##
-
# Expectation that there is link
-
#
-
# see Capybara::Expectations#wont_have_link
-
# see Capybara::Assertions#assert_link
-
# see Capybara::Assertions#refute_link
-
# see Capybara::Assertions#assert_no_link
-
# :method: must_have_link
-
-
##
-
# Expectation that there is no link
-
#
-
# see Capybara::Expectations#must_have_link
-
# see Capybara::Assertions#assert_link
-
# see Capybara::Assertions#refute_link
-
# see Capybara::Assertions#assert_no_link
-
# :method: wont_have_link
-
-
-
##
-
# Expectation that there is select
-
#
-
# see Capybara::Expectations#wont_have_select
-
# see Capybara::Assertions#assert_select
-
# see Capybara::Assertions#refute_select
-
# see Capybara::Assertions#assert_no_select
-
# :method: must_have_select
-
-
##
-
# Expectation that there is no select
-
#
-
# see Capybara::Expectations#must_have_select
-
# see Capybara::Assertions#assert_select
-
# see Capybara::Assertions#refute_select
-
# see Capybara::Assertions#assert_no_select
-
# :method: wont_have_select
-
-
-
##
-
# Expectation that there is selector
-
#
-
# see Capybara::Expectations#wont_have_selector
-
# see Capybara::Assertions#assert_selector
-
# see Capybara::Assertions#refute_selector
-
# see Capybara::Assertions#assert_no_selector
-
# :method: must_have_selector
-
-
##
-
# Expectation that there is no selector
-
#
-
# see Capybara::Expectations#must_have_selector
-
# see Capybara::Assertions#assert_selector
-
# see Capybara::Assertions#refute_selector
-
# see Capybara::Assertions#assert_no_selector
-
# :method: wont_have_selector
-
-
-
##
-
# Expectation that there is table
-
#
-
# see Capybara::Expectations#wont_have_table
-
# see Capybara::Assertions#assert_table
-
# see Capybara::Assertions#refute_table
-
# see Capybara::Assertions#assert_no_table
-
# :method: must_have_table
-
-
##
-
# Expectation that there is no table
-
#
-
# see Capybara::Expectations#must_have_table
-
# see Capybara::Assertions#assert_table
-
# see Capybara::Assertions#refute_table
-
# see Capybara::Assertions#assert_no_table
-
# :method: wont_have_table
-
-
-
##
-
# Expectation that there is text
-
#
-
# see Capybara::Expectations#wont_have_text
-
# see Capybara::Assertions#assert_text
-
# see Capybara::Assertions#refute_text
-
# see Capybara::Assertions#assert_no_text
-
# :method: must_have_text
-
-
##
-
# Expectation that there is no text
-
#
-
# see Capybara::Expectations#must_have_text
-
# see Capybara::Assertions#assert_text
-
# see Capybara::Assertions#refute_text
-
# see Capybara::Assertions#assert_no_text
-
# :method: wont_have_text
-
-
-
##
-
# Expectation that there is unchecked_field
-
#
-
# see Capybara::Expectations#wont_have_unchecked_field
-
# see Capybara::Assertions#assert_unchecked_field
-
# see Capybara::Assertions#refute_unchecked_field
-
# see Capybara::Assertions#assert_no_unchecked_field
-
# :method: must_have_unchecked_field
-
-
##
-
# Expectation that there is no unchecked_field
-
#
-
# see Capybara::Expectations#must_have_unchecked_field
-
# see Capybara::Assertions#assert_unchecked_field
-
# see Capybara::Assertions#refute_unchecked_field
-
# see Capybara::Assertions#assert_no_unchecked_field
-
# :method: wont_have_unchecked_field
-
-
-
##
-
# Expectation that there is xpath
-
#
-
# see Capybara::Expectations#wont_have_xpath
-
# see Capybara::Assertions#assert_xpath
-
# see Capybara::Assertions#refute_xpath
-
# see Capybara::Assertions#assert_no_xpath
-
# :method: must_have_xpath
-
-
##
-
# Expectation that there is no xpath
-
#
-
# see Capybara::Expectations#must_have_xpath
-
# see Capybara::Assertions#assert_xpath
-
# see Capybara::Assertions#refute_xpath
-
# see Capybara::Assertions#assert_no_xpath
-
# :method: wont_have_xpath
-
end
-
end
-
-
1
class Capybara::Session
-
1
include Capybara::Expectations unless ENV["MT_NO_EXPECTATIONS"]
-
end
-
-
1
class Capybara::Node::Base
-
1
include Capybara::Expectations unless ENV["MT_NO_EXPECTATIONS"]
-
end
-
-
1
class Capybara::Node::Simple
-
1
include Capybara::Expectations unless ENV["MT_NO_EXPECTATIONS"]
-
end
-
1
require 'minitest'
-
1
require 'minitest/capybara'
-
1
require "capybara"
-
1
require "capybara/dsl"
-
1
require "minitest/capybara/version"
-
-
1
module Minitest
-
1
module Capybara
-
25
@@assertions = ::Capybara::Session::NODE_METHODS.grep(/^has_/).map { |s| s.to_s.match(/^has_(.*?)\?/)[1] }
-
1
@@refutations = @@assertions.grep(/^no_/)
-
1
@@assertions = (@@assertions - @@refutations).sort
-
13
@@refutations = @@refutations.map { |s| s.match(/^no_(.*)/)[1] }.sort
-
-
1
def self.assertions
-
2
@@assertions
-
end
-
-
1
def self.refutations
-
2
@@refutations
-
end
-
end
-
end
-
-
# Need to be required after Minitest::Capybara is defined
-
1
require "capybara/assertions"
-
1
require "capybara/expectations"
-
-
1
module Minitest
-
1
module Capybara
-
1
module Behaviour
-
1
include ::Capybara::DSL
-
1
include ::Capybara::Assertions
-
-
1
def teardown
-
::Capybara.reset_session!
-
::Capybara.use_default_driver
-
end
-
end
-
-
1
class Test < Minitest::Test
-
1
include Behaviour
-
end
-
-
1
class Spec < Minitest::Spec
-
1
include Behaviour
-
end
-
end
-
end
-
1
module MiniTest
-
1
module Capybara
-
1
VERSION = File.read(File.expand_path("../../../../VERSION", __FILE__)).strip
-
end
-
end
-
1
require "minitest"
-
-
1
module Minitest
-
1
def self.plugin_fail_fast_options opts, _options
-
1
opts.on "-f", "--fail-fast", "Halt running the test suite when a test fails" do
-
FailFastReporter.fail_fast!
-
end
-
end
-
-
1
def self.plugin_fail_fast_init options
-
1
if FailFastReporter.fail_fast?
-
io = options.fetch(:io, $stdout)
-
self.reporter.reporters << FailFastReporter.new(io, options)
-
end
-
end
-
-
1
class FailFastReporter < Reporter
-
1
def self.fail_fast!
-
@fail_fast = true
-
end
-
-
1
def self.fail_fast?
-
1
@fail_fast ||= false
-
end
-
-
1
def record result
-
if result.failures.reject { |failure| failure.kind_of?(Minitest::Skip) }.any?
-
io.puts
-
raise Interrupt
-
else
-
super
-
end
-
end
-
end
-
end
-
1
module MiniTest::Metadata
-
1
module ClassMethods
-
# Returns Hash metadata for class' test methods
-
1
def metadata
-
6
@metadata ||= Hash.new({})
-
end
-
end
-
-
1
def self.included(klass)
-
1
klass.extend ClassMethods
-
1
klass.class_eval do
-
1
class << self
-
# @private
-
1
alias :old_it :it
-
-
# @private
-
1
def it(description = "", *metadata, &block)
-
name = old_it(description, &block)
-
self.metadata[name] = _compute_metadata(metadata) unless metadata.empty?
-
name
-
end
-
-
1
def _compute_metadata(metadata)
-
if metadata[-1].is_a? Hash
-
meta = metadata.pop
-
else
-
meta = {}
-
end
-
metadata.each { |key| meta[key] = true }
-
meta
-
end
-
end
-
-
# MiniTest 5 compatibility, https://github.com/wojtekmach/minitest-metadata/issues/7
-
1
alias_method :__name__, :name unless method_defined? :__name__
-
end
-
1
super
-
end
-
-
# Returns Hash metadata for currently running test
-
1
def metadata
-
6
self.class.metadata[__name__] || {}
-
end
-
end
-
1
gem "minitest"
-
1
require "minitest"
-
1
require "minitest/test"
-
1
require "minitest/spec"
-
1
require "minitest/mock"
-
1
require "minitest/autorun" unless ENV["MT_RAILS_NO_AUTORUN"]
-
-
################################################################################
-
# Add and configure the spec DSL
-
################################################################################
-
-
1
require "active_support/test_case"
-
1
require "minitest/rails/constant_lookup"
-
1
class ActiveSupport::TestCase
-
# Remove describe method if present
-
class << self
-
remove_method :describe
-
end if self.respond_to?(:describe) &&
-
1
self.method(:describe).owner == ActiveSupport::TestCase
-
-
# Add spec DSL
-
1
extend Minitest::Spec::DSL
-
-
# Resolve constants from the test name when using the spec DSL
-
1
include Minitest::Rails::ConstantLookup
-
end
-
-
1
class ActiveSupport::TestCase
-
1
if defined?(ActiveRecord::Base)
-
# Use AS::TestCase for the base class when describing a model
-
1
register_spec_type(self) do |desc|
-
desc < ActiveRecord::Base if desc.is_a?(Class)
-
end
-
end
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :model
-
end
-
end
-
-
1
require "action_controller/test_case"
-
1
class ActionController::TestCase
-
# Use AC::TestCase for the base class when describing a controller
-
1
register_spec_type(self) do |desc|
-
Class === desc && desc < ActionController::Metal
-
end
-
1
register_spec_type(/Controller( ?Test)?\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :controller
-
end
-
-
# Resolve the controller from the test name when using the spec DSL
-
1
def self.determine_default_controller_class(name)
-
10
controller = determine_constant_from_test_name(name) do |constant|
-
10
Class === constant && constant < ActionController::Metal
-
end
-
10
raise NameError.new("Unable to resolve controller for #{name}") if controller.nil?
-
10
controller
-
end
-
end
-
-
1
require "action_view/test_case"
-
1
class ActionView::TestCase
-
# Use AV::TestCase for the base class for helpers and views
-
1
register_spec_type(/(Helper( ?Test)?| View Test)\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include?(:view) ||
-
addl.include?(:helper)
-
end
-
-
# Resolve the helper or view from the test name when using the spec DSL
-
1
def self.determine_default_helper_class(name)
-
determine_constant_from_test_name(name) do |constant|
-
Module === constant && !(Class === constant)
-
end
-
end
-
end
-
-
1
if defined? ActiveJob
-
1
class ActiveJob::TestCase
-
# Use AJ::TestCase for the base when describing a job
-
1
register_spec_type(self) do |desc|
-
desc < ActiveJob::Base if desc.is_a?(Class)
-
end
-
1
register_spec_type(/Job( ?Test)?\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :job
-
end
-
end
-
end
-
-
1
if defined? ActionMailer
-
1
require "action_mailer/test_helper"
-
1
require "action_mailer/test_case"
-
1
class ActionMailer::TestCase
-
# Use AM::TestCase for the base class when describing a mailer
-
1
register_spec_type(self) do |desc|
-
desc < ActionMailer::Base if desc.is_a?(Class)
-
end
-
1
register_spec_type(/Mailer( ?Test)?\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :mailer
-
end
-
-
# Resolve the mailer from the test name when using the spec DSL
-
1
def self.determine_default_mailer(name)
-
mailer = determine_constant_from_test_name(name) do |constant|
-
Class === constant && constant < ::ActionMailer::Base
-
end
-
raise ActionMailer::NonInferrableMailerError.new(name) if mailer.nil?
-
mailer
-
end
-
end
-
end
-
-
1
require "action_dispatch/testing/integration"
-
1
class ActionDispatch::IntegrationTest
-
# Register by name, consider Acceptance to be deprecated
-
1
register_spec_type(/(Integration|Acceptance)( ?Test)?\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :integration
-
end
-
end
-
-
1
class Rails::Generators::TestCase
-
1
register_spec_type(self) do |desc|
-
desc < Rails::Generators::Base if desc.is_a?(Class)
-
end
-
1
register_spec_type(/Generator( ?Test)?\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :generator
-
end
-
-
1
def self.determine_default_generator(name)
-
generator = determine_constant_from_test_name(name) do |constant|
-
Class === constant && constant < Rails::Generators::Base
-
end
-
raise NameError.new("Unable to resolve generator for #{name}") if generator.nil?
-
generator
-
end
-
end
-
-
################################################################################
-
# Assertions and Expectations
-
################################################################################
-
-
1
require "minitest/rails/assertions"
-
1
require "minitest/rails/expectations"
-
-
# :stopdoc:
-
-
################################################################################
-
# Run load hooks so that other gems can register spec types
-
################################################################################
-
-
1
ActiveSupport.run_load_hooks(:minitest, ActiveSupport::TestCase)
-
1
class ActiveSupport::TestCase
-
##
-
# Checks the numeric difference between the return value of an expression as a result of what is evaluated.
-
#
-
# assert_difference "User.count", +1 do
-
# User.create
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_change
-
#
-
# :method: assert_difference
-
# :call-seq: assert_difference(expression, difference = 1, message = nil, &block)
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# assert_no_difference "User.count" do
-
# User.new
-
# end
-
#
-
# See also Minitest::Rails::Expectations#wont_change
-
#
-
# :method: assert_no_difference
-
# :call-seq: assert_no_difference(expression, message = nil, &block)
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# refute_difference "User.count", do
-
# User.new
-
# end
-
#
-
# See also Minitest::Rails::Expectations#wont_change
-
#
-
# :args: expression, message = nil, &block
-
1
alias :refute_difference :assert_no_difference
-
-
end
-
-
1
class ActionController::TestCase
-
# Asserts that the response is one of the following types:
-
#
-
# * <tt>:success</tt> - Status code was in the 200-299 range
-
# * <tt>:redirect</tt> - Status code was in the 300-399 range
-
# * <tt>:missing</tt> - Status code was 404
-
# * <tt>:error</tt> - Status code was in the 500-599 range
-
#
-
# You can also pass an explicit status number like <tt>assert_response(501)</tt>
-
# or its symbolic equivalent <tt>assert_response(:not_implemented)</tt>.
-
# See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list.
-
#
-
# # assert that the response was a redirection
-
# assert_response :redirect
-
#
-
# # assert that the response code was status code 401 (unauthorized)
-
# assert_response 401
-
#
-
# See also Minitest::Rails::Expectations#must_respond_with
-
#
-
# :method: assert_response
-
# :call-seq: assert_response(type, message = nil)
-
-
##
-
# Assert that the redirection options passed in match those of the redirect called in the latest action.
-
# This match can be partial, such that <tt>assert_redirected_to(controller: "weblog")</tt> will also
-
# match the redirection of <tt>redirect_to(controller: "weblog", action: "show")</tt> and so on.
-
#
-
# # assert that the redirection was to the "index" action on the WeblogController
-
# assert_redirected_to controller: "weblog", action: "index"
-
#
-
# # assert that the redirection was to the named route login_url
-
# assert_redirected_to login_url
-
#
-
# # assert that the redirection was to the url for @customer
-
# assert_redirected_to @customer
-
#
-
# # asserts that the redirection matches the regular expression
-
# assert_redirected_to %r(\Ahttp://example.org)
-
#
-
# See also Minitest::Rails::Expectations#must_redirect_to
-
#
-
# :method: assert_redirected_to
-
# :call-seq: assert_redirected_to(options = {}, message=nil)
-
-
##
-
# Asserts that the request was rendered with the appropriate template file or partials.
-
#
-
# # assert that the "new" view template was rendered
-
# assert_template "new"
-
#
-
# # assert that the exact template "admin/posts/new" was rendered
-
# assert_template %r{\Aadmin/posts/new\Z}
-
#
-
# # assert that the layout 'admin' was rendered
-
# assert_template layout: 'admin'
-
# assert_template layout: 'layouts/admin'
-
# assert_template layout: :admin
-
#
-
# # assert that no layout was rendered
-
# assert_template layout: nil
-
# assert_template layout: false
-
#
-
# # assert that the "_customer" partial was rendered twice
-
# assert_template partial: '_customer', count: 2
-
#
-
# # assert that no partials were rendered
-
# assert_template partial: false
-
#
-
# In a view test case, you can also assert that specific locals are passed
-
# to partials:
-
#
-
# # assert that the "_customer" partial was rendered with a specific object
-
# assert_template partial: '_customer', locals: { customer: @customer }
-
#
-
# See also Minitest::Rails::Expectations#must_render_template
-
#
-
# :method: assert_template
-
# :call-seq: assert_template(options = {}, message = nil)
-
-
##
-
# Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+.
-
# The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in
-
# a query string. The +message+ parameter allows you to specify a custom error message for assertion failures.
-
#
-
# The +defaults+ parameter is unused.
-
#
-
# # Asserts that the default action is generated for a route with no action
-
# assert_generates "/items", controller: "items", action: "index"
-
#
-
# # Tests that the list action is properly routed
-
# assert_generates "/items/list", controller: "items", action: "list"
-
#
-
# # Tests the generation of a route with a parameter
-
# assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" }
-
#
-
# # Asserts that the generated route gives us our custom route
-
# assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" }
-
#
-
# See also Minitest::Rails::Expectations#must_route_to
-
#
-
# :method: assert_generates
-
# :call-seq: assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)
-
-
##
-
# Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
-
# match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+.
-
#
-
# Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes
-
# requiring a specific HTTP method. The hash should contain a :path with the incoming request path
-
# and a :method containing the required HTTP verb.
-
#
-
# # assert that POSTing to /items will call the create action on ItemsController
-
# assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post})
-
#
-
# You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used
-
# to assert that values in the query string string will end up in the params hash correctly. To test query strings you must use the
-
# extras argument, appending the query string on the path directly will not work. For example:
-
#
-
# # assert that a path of '/items/list/1?view=print' returns the correct options
-
# assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" })
-
#
-
# The +message+ parameter allows you to pass in an error message that is displayed upon failure.
-
#
-
# # Check the default route (i.e., the index action)
-
# assert_recognizes({controller: 'items', action: 'index'}, 'items')
-
#
-
# # Test a specific action
-
# assert_recognizes({controller: 'items', action: 'list'}, 'items/list')
-
#
-
# # Test an action with a parameter
-
# assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1')
-
#
-
# # Test a custom route
-
# assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1')
-
#
-
# See also Minitest::Rails::Expectations#must_route_from
-
#
-
# :method: assert_recognizes
-
# :call-seq: assert_recognizes(expected_options, path, extras={}, msg=nil)
-
-
##
-
# Asserts that path and options match both ways; in other words, it verifies that <tt>path</tt> generates
-
# <tt>options</tt> and then that <tt>options</tt> generates <tt>path</tt>. This essentially combines +assert_recognizes+
-
# and +assert_generates+ into one step.
-
#
-
# The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The
-
# +message+ parameter allows you to specify a custom error message to display upon failure.
-
#
-
# # Assert a basic route: a controller with the default action (index)
-
# assert_routing '/home', controller: 'home', action: 'index'
-
#
-
# # Test a route generated with a specific controller, action, and parameter (id)
-
# assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23
-
#
-
# # Assert a basic route (controller + default action), with an error message if it fails
-
# assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly'
-
#
-
# # Tests a route, providing a defaults hash
-
# assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"}
-
#
-
# # Tests a route with a HTTP method
-
# assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" })
-
#
-
# See also Minitest::Rails::Expectations#must_route
-
#
-
# :method: assert_routing
-
# :call-seq: assert_routing(path, options, defaults={}, extras={}, message=nil)
-
-
# An assertion that selects elements and makes one or more equality tests.
-
#
-
# If the first argument is an element, selects all matching elements
-
# starting from (and including) that element and all its children in
-
# depth-first order.
-
#
-
# If no element if specified, calling +assert_select+ selects from the
-
# response HTML unless +assert_select+ is called from within an +assert_select+ block.
-
#
-
# When called with a block +assert_select+ passes an array of selected elements
-
# to the block. Calling +assert_select+ from the block, with no element specified,
-
# runs the assertion on the complete set of elements selected by the enclosing assertion.
-
# Alternatively the array may be iterated through so that +assert_select+ can be called
-
# separately for each element.
-
#
-
#
-
# ==== Example
-
# If the response contains two ordered lists, each with four list elements then:
-
# assert_select "ol" do |elements|
-
# elements.each do |element|
-
# assert_select element, "li", 4
-
# end
-
# end
-
#
-
# will pass, as will:
-
# assert_select "ol" do
-
# assert_select "li", 8
-
# end
-
#
-
# The selector may be a CSS selector expression (String), an expression
-
# with substitution values, or an HTML::Selector object.
-
#
-
# === Equality Tests
-
#
-
# The equality test may be one of the following:
-
# * <tt>true</tt> - Assertion is true if at least one element selected.
-
# * <tt>false</tt> - Assertion is true if no element selected.
-
# * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
-
# one element matches the string or regular expression.
-
# * <tt>Integer</tt> - Assertion is true if exactly that number of
-
# elements are selected.
-
# * <tt>Range</tt> - Assertion is true if the number of selected
-
# elements fit the range.
-
# If no equality test specified, the assertion is true if at least one
-
# element selected.
-
#
-
# To perform more than one equality tests, use a hash with the following keys:
-
# * <tt>:text</tt> - Narrow the selection to elements that have this text
-
# value (string or regexp).
-
# * <tt>:html</tt> - Narrow the selection to elements that have this HTML
-
# content (string or regexp).
-
# * <tt>:count</tt> - Assertion is true if the number of selected elements
-
# is equal to this value.
-
# * <tt>:minimum</tt> - Assertion is true if the number of selected
-
# elements is at least this value.
-
# * <tt>:maximum</tt> - Assertion is true if the number of selected
-
# elements is at most this value.
-
#
-
# If the method is called with a block, once all equality tests are
-
# evaluated the block is called with an array of all matched elements.
-
#
-
# # At least one form element
-
# assert_select "form"
-
#
-
# # Form element includes four input fields
-
# assert_select "form input", 4
-
#
-
# # Page title is "Welcome"
-
# assert_select "title", "Welcome"
-
#
-
# # Page title is "Welcome" and there is only one title element
-
# assert_select "title", {count: 1, text: "Welcome"},
-
# "Wrong title or more than one title element"
-
#
-
# # Page contains no forms
-
# assert_select "form", false, "This page must contain no forms"
-
#
-
# # Test the content and style
-
# assert_select "body div.header ul.menu"
-
#
-
# # Use substitution values
-
# assert_select "ol>li#?", /item-\d+/
-
#
-
# # All input fields in the form have a name
-
# assert_select "form input" do
-
# assert_select "[name=?]", /.+/ # Not empty
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select
-
#
-
# :method: assert_select
-
# :call-seq: assert_select(*args, &block)
-
-
# Extracts the body of an email and runs nested assertions on it.
-
#
-
# You must enable deliveries for this assertion to work, use:
-
# ActionMailer::Base.perform_deliveries = true
-
#
-
# assert_select_email do
-
# assert_select "h1", "Email alert"
-
# end
-
#
-
# assert_select_email do
-
# items = assert_select "ol>li"
-
# items.each do
-
# # Work with items here...
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select_email
-
#
-
# :method: assert_select_email
-
# :call-seq: assert_select_email(&block)
-
-
# Extracts the content of an element, treats it as encoded HTML and runs
-
# nested assertion on it.
-
#
-
# You typically call this method within another assertion to operate on
-
# all currently selected elements. You can also pass an element or array
-
# of elements.
-
#
-
# The content of each element is un-encoded, and wrapped in the root
-
# element +encoded+. It then calls the block with all un-encoded elements.
-
#
-
# # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
-
# assert_select "feed[xmlns='http://www.w3.org/2005/Atom']" do
-
# # Select each entry item and then the title item
-
# assert_select "entry>title" do
-
# # Run assertions on the encoded title elements
-
# assert_select_encoded do
-
# assert_select "b"
-
# end
-
# end
-
# end
-
#
-
#
-
# # Selects all paragraph tags from within the description of an RSS feed
-
# assert_select "rss[version=2.0]" do
-
# # Select description element of each feed item.
-
# assert_select "channel>item>description" do
-
# # Run assertions on the encoded elements.
-
# assert_select_encoded do
-
# assert_select "p"
-
# end
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select_encoded
-
#
-
# :method: assert_select_encoded
-
# :call-seq: assert_select_encoded(element = nil, &block)
-
-
##
-
# Checks that two HTML strings are equivalent. That they contain the same elements and attributes with the associated values.
-
#
-
# assert_dom_equal '<a href="http://www.example.com">Apples</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#must_dom_equal
-
#
-
# :method: assert_dom_equal
-
# :call-seq: assert_dom_equal(expected, actual, message = nil)
-
-
##
-
# Checks that two HTML strings are not equivalent. That they do not contain the same elements and attributes with the associated values.
-
#
-
# assert_dom_not_equal '<a href="http://www.example.com">Oranges</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#wont_dom_equal
-
#
-
# :method: assert_dom_not_equal
-
# :call-seq: assert_dom_not_equal(expected, actual, message = nil)
-
-
##
-
# Checks that two HTML strings are not equivalent. That they do not contain the same elements and attributes with the associated values.
-
#
-
# refute_dom_equal '<a href="http://www.example.com">Oranges</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#wont_dom_equal
-
#
-
# :method: assert_dom_equal
-
# :call-seq: assert_dom_equal(expected, actual, message = nil)
-
1
alias :refute_dom_equal :assert_dom_not_equal
-
-
##
-
# Asserts that there is a tag/node/element in the body of the response
-
# that meets all of the given conditions. The +conditions+ parameter must
-
# be a hash of any of the following keys (all are optional):
-
#
-
# * <tt>:tag</tt>: the node type must match the corresponding value
-
# * <tt>:attributes</tt>: a hash. The node's attributes must match the
-
# corresponding values in the hash.
-
# * <tt>:parent</tt>: a hash. The node's parent must match the
-
# corresponding hash.
-
# * <tt>:child</tt>: a hash. At least one of the node's immediate children
-
# must meet the criteria described by the hash.
-
# * <tt>:ancestor</tt>: a hash. At least one of the node's ancestors must
-
# meet the criteria described by the hash.
-
# * <tt>:descendant</tt>: a hash. At least one of the node's descendants
-
# must meet the criteria described by the hash.
-
# * <tt>:sibling</tt>: a hash. At least one of the node's siblings must
-
# meet the criteria described by the hash.
-
# * <tt>:after</tt>: a hash. The node must be after any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:before</tt>: a hash. The node must be before any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:children</tt>: a hash, for counting children of a node. Accepts
-
# the keys:
-
# * <tt>:count</tt>: either a number or a range which must equal (or
-
# include) the number of children that match.
-
# * <tt>:less_than</tt>: the number of matching children must be less
-
# than this number.
-
# * <tt>:greater_than</tt>: the number of matching children must be
-
# greater than this number.
-
# * <tt>:only</tt>: another hash consisting of the keys to use
-
# to match on the children, and only matching children will be
-
# counted.
-
# * <tt>:content</tt>: the textual content of the node must match the
-
# given value. This will not match HTML tags in the body of a
-
# tag--only text.
-
#
-
# Conditions are matched using the following algorithm:
-
#
-
# * if the condition is a string, it must be a substring of the value.
-
# * if the condition is a regexp, it must match the value.
-
# * if the condition is a number, the value must match number.to_s.
-
# * if the condition is +true+, the value must not be +nil+.
-
# * if the condition is +false+ or +nil+, the value must be +nil+.
-
#
-
# # Assert that there is a "span" tag
-
# assert_tag tag: "span"
-
#
-
# # Assert that there is a "span" tag with id="x"
-
# assert_tag tag: "span", attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" tag using the short-hand
-
# assert_tag :span
-
#
-
# # Assert that there is a "span" tag with id="x" using the short-hand
-
# assert_tag :span, attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" inside of a "div"
-
# assert_tag tag: "span", parent: { tag: "div" }
-
#
-
# # Assert that there is a "span" somewhere inside a table
-
# assert_tag tag: "span", ancestor: { tag: "table" }
-
#
-
# # Assert that there is a "span" with at least one "em" child
-
# assert_tag tag: "span", child: { tag: "em" }
-
#
-
# # Assert that there is a "span" containing a (possibly nested)
-
# # "strong" tag.
-
# assert_tag tag: "span", descendant: { tag: "strong" }
-
#
-
# # Assert that there is a "span" containing between 2 and 4 "em" tags
-
# # as immediate children
-
# assert_tag tag: "span",
-
# children: { count: 2..4, only: { tag: "em" } }
-
#
-
# # Get funky: assert that there is a "div", with an "ul" ancestor
-
# # and an "li" parent (with "class" = "enum"), and containing a
-
# # "span" descendant that contains text matching /hello world/
-
# assert_tag tag: "div",
-
# ancestor: { tag: "ul" },
-
# parent: { tag: "li",
-
# attributes: { class: "enum" } },
-
# descendant: { tag: "span",
-
# child: /hello world/ }
-
#
-
# <b>Please note</b>: +assert_tag+ and +assert_no_tag+ only work
-
# with well-formed XHTML. They recognize a few tags as implicitly self-closing
-
# (like br and hr and such) but will not work correctly with tags
-
# that allow optional closing tags (p, li, td). <em>You must explicitly
-
# close all of your tags to use these assertions.</em>
-
#
-
# See also Minitest::Rails::Expectations#must_have_tag
-
#
-
# :method: assert_tag
-
# :call-seq: assert_tag(*opts)
-
-
##
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also Minitest::Rails::Expectations#wont_have_tag
-
#
-
# :method: assert_no_tag
-
# :call-seq: assert_no_tag(*opts)
-
-
##
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also Minitest::Rails::Expectations#wont_have_tag
-
#
-
# :method: refute_tag
-
# :call-seq: refute_tag(*opts)
-
1
alias :refute_tag :assert_no_tag
-
-
##
-
# Simulate a GET request with the given parameters.
-
#
-
# - +action+: The controller action to call.
-
# - +params+: The hash with HTTP parameters that you want to pass. This may be
-
# +nil+.
-
# - +body+: The request body with a string that is appropriately encoded
-
# (<tt>application/x-www-form-urlencoded</tt> or
-
# <tt>multipart/form-data</tt>).
-
# - +session+: A hash of parameters to store in the session. This may be
-
# +nil+.
-
# - +flash+: A hash of parameters to store in the flash. This may be +nil+.
-
#
-
# You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
-
# +post+, +patch+, +put+, +delete+, and +head+.
-
# Example sending parameters, session and setting a flash message:
-
#
-
# get :show,
-
# params: { id: 7 },
-
# session: { user_id: 1 },
-
# flash: { notice: 'This is a flash message' }
-
#
-
# Note that the request method is not verified. The different methods are
-
# available to make the tests more expressive.
-
#
-
# :method: get
-
# :call-seq: get(action, *args)
-
-
##
-
# Simulate a POST request with the given parameters and set/volley the
-
# response.
-
# See +get+ for more details.
-
#
-
# :method: post
-
# :call-seq: post(action, *args)
-
-
##
-
# Simulate a PATCH request with the given parameters and set/volley the
-
# response.
-
# See +get+ for more details.
-
#
-
# :method: patch
-
# :call-seq: patch(action, *args)
-
-
##
-
# Simulate a PUT request with the given parameters and set/volley the
-
# response.
-
# See +get+ for more details.
-
#
-
# :method: put
-
# :call-seq: put(action, *args)
-
-
##
-
# Simulate a DELETE request with the given parameters and set/volley the
-
# response.
-
# See +get+ for more details.
-
#
-
# :method: delete
-
# :call-seq: delete(action, *args)
-
-
##
-
# Simulate a HEAD request with the given parameters and set/volley the
-
# response.
-
# See +get+ for more details.
-
#
-
# :method: head
-
# :call-seq: head(action, *args)
-
end
-
-
1
class ActionView::TestCase
-
##
-
# Checks the numeric difference between the return value of an expression as a result of what is evaluated.
-
#
-
# assert_difference "User.count", +1 do
-
# User.create
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_change
-
#
-
# :method: assert_difference
-
# :call-seq: assert_difference(expression, difference = 1, message = nil, &block)
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# assert_no_difference "User.count" do
-
# User.new
-
# end
-
#
-
# See also Minitest::Rails::Expectations#wont_change
-
#
-
# :method: assert_no_difference
-
# :call-seq: assert_no_difference(expression, message = nil, &block)
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# refute_difference "User.count", do
-
# User.new
-
# end
-
#
-
# See also Minitest::Rails::Expectations#wont_change
-
#
-
# :args: expression, message = nil, &block
-
1
alias :refute_difference :assert_no_difference
-
-
# Asserts that the response is one of the following types:
-
#
-
# * <tt>:success</tt> - Status code was in the 200-299 range
-
# * <tt>:redirect</tt> - Status code was in the 300-399 range
-
# * <tt>:missing</tt> - Status code was 404
-
# * <tt>:error</tt> - Status code was in the 500-599 range
-
#
-
# You can also pass an explicit status number like <tt>assert_response(501)</tt>
-
# or its symbolic equivalent <tt>assert_response(:not_implemented)</tt>.
-
# See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list.
-
#
-
# # assert that the response was a redirection
-
# assert_response :redirect
-
#
-
# # assert that the response code was status code 401 (unauthorized)
-
# assert_response 401
-
#
-
# See also Minitest::Rails::Expectations#must_respond_with
-
#
-
# :method: assert_response
-
# :call-seq: assert_response(type, message = nil)
-
-
##
-
# Assert that the redirection options passed in match those of the redirect called in the latest action.
-
# This match can be partial, such that <tt>assert_redirected_to(controller: "weblog")</tt> will also
-
# match the redirection of <tt>redirect_to(controller: "weblog", action: "show")</tt> and so on.
-
#
-
# # assert that the redirection was to the "index" action on the WeblogController
-
# assert_redirected_to controller: "weblog", action: "index"
-
#
-
# # assert that the redirection was to the named route login_url
-
# assert_redirected_to login_url
-
#
-
# # assert that the redirection was to the url for @customer
-
# assert_redirected_to @customer
-
#
-
# # asserts that the redirection matches the regular expression
-
# assert_redirected_to %r(\Ahttp://example.org)
-
#
-
# See also Minitest::Rails::Expectations#must_redirect_to
-
#
-
# :method: assert_redirected_to
-
# :call-seq: assert_redirected_to(options = {}, message=nil)
-
-
##
-
# Asserts that the request was rendered with the appropriate template file or partials.
-
#
-
# # assert that the "new" view template was rendered
-
# assert_template "new"
-
#
-
# # assert that the exact template "admin/posts/new" was rendered
-
# assert_template %r{\Aadmin/posts/new\Z}
-
#
-
# # assert that the layout 'admin' was rendered
-
# assert_template layout: 'admin'
-
# assert_template layout: 'layouts/admin'
-
# assert_template layout: :admin
-
#
-
# # assert that no layout was rendered
-
# assert_template layout: nil
-
# assert_template layout: false
-
#
-
# # assert that the "_customer" partial was rendered twice
-
# assert_template partial: '_customer', count: 2
-
#
-
# # assert that no partials were rendered
-
# assert_template partial: false
-
#
-
# In a view test case, you can also assert that specific locals are passed
-
# to partials:
-
#
-
# # assert that the "_customer" partial was rendered with a specific object
-
# assert_template partial: '_customer', locals: { customer: @customer }
-
#
-
# See also Minitest::Rails::Expectations#must_render_template
-
#
-
# :method: assert_template
-
# :call-seq: assert_template(options = {}, message = nil)
-
-
##
-
# Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+.
-
# The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in
-
# a query string. The +message+ parameter allows you to specify a custom error message for assertion failures.
-
#
-
# The +defaults+ parameter is unused.
-
#
-
# # Asserts that the default action is generated for a route with no action
-
# assert_generates "/items", controller: "items", action: "index"
-
#
-
# # Tests that the list action is properly routed
-
# assert_generates "/items/list", controller: "items", action: "list"
-
#
-
# # Tests the generation of a route with a parameter
-
# assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" }
-
#
-
# # Asserts that the generated route gives us our custom route
-
# assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" }
-
#
-
# See also Minitest::Rails::Expectations#must_route_to
-
#
-
# :method: assert_generates
-
# :call-seq: assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)
-
-
##
-
# Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
-
# match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+.
-
#
-
# Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes
-
# requiring a specific HTTP method. The hash should contain a :path with the incoming request path
-
# and a :method containing the required HTTP verb.
-
#
-
# # assert that POSTing to /items will call the create action on ItemsController
-
# assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post})
-
#
-
# You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used
-
# to assert that values in the query string string will end up in the params hash correctly. To test query strings you must use the
-
# extras argument, appending the query string on the path directly will not work. For example:
-
#
-
# # assert that a path of '/items/list/1?view=print' returns the correct options
-
# assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" })
-
#
-
# The +message+ parameter allows you to pass in an error message that is displayed upon failure.
-
#
-
# # Check the default route (i.e., the index action)
-
# assert_recognizes({controller: 'items', action: 'index'}, 'items')
-
#
-
# # Test a specific action
-
# assert_recognizes({controller: 'items', action: 'list'}, 'items/list')
-
#
-
# # Test an action with a parameter
-
# assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1')
-
#
-
# # Test a custom route
-
# assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1')
-
#
-
# See also Minitest::Rails::Expectations#must_route_from
-
#
-
# :method: assert_recognizes
-
# :call-seq: assert_recognizes(expected_options, path, extras={}, msg=nil)
-
-
##
-
# Asserts that path and options match both ways; in other words, it verifies that <tt>path</tt> generates
-
# <tt>options</tt> and then that <tt>options</tt> generates <tt>path</tt>. This essentially combines +assert_recognizes+
-
# and +assert_generates+ into one step.
-
#
-
# The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The
-
# +message+ parameter allows you to specify a custom error message to display upon failure.
-
#
-
# # Assert a basic route: a controller with the default action (index)
-
# assert_routing '/home', controller: 'home', action: 'index'
-
#
-
# # Test a route generated with a specific controller, action, and parameter (id)
-
# assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23
-
#
-
# # Assert a basic route (controller + default action), with an error message if it fails
-
# assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly'
-
#
-
# # Tests a route, providing a defaults hash
-
# assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"}
-
#
-
# # Tests a route with a HTTP method
-
# assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" })
-
#
-
# See also Minitest::Rails::Expectations#must_route
-
#
-
# :method: assert_routing
-
# :call-seq: assert_routing(path, options, defaults={}, extras={}, message=nil)
-
-
# An assertion that selects elements and makes one or more equality tests.
-
#
-
# If the first argument is an element, selects all matching elements
-
# starting from (and including) that element and all its children in
-
# depth-first order.
-
#
-
# If no element if specified, calling +assert_select+ selects from the
-
# response HTML unless +assert_select+ is called from within an +assert_select+ block.
-
#
-
# When called with a block +assert_select+ passes an array of selected elements
-
# to the block. Calling +assert_select+ from the block, with no element specified,
-
# runs the assertion on the complete set of elements selected by the enclosing assertion.
-
# Alternatively the array may be iterated through so that +assert_select+ can be called
-
# separately for each element.
-
#
-
#
-
# ==== Example
-
# If the response contains two ordered lists, each with four list elements then:
-
# assert_select "ol" do |elements|
-
# elements.each do |element|
-
# assert_select element, "li", 4
-
# end
-
# end
-
#
-
# will pass, as will:
-
# assert_select "ol" do
-
# assert_select "li", 8
-
# end
-
#
-
# The selector may be a CSS selector expression (String), an expression
-
# with substitution values, or an HTML::Selector object.
-
#
-
# === Equality Tests
-
#
-
# The equality test may be one of the following:
-
# * <tt>true</tt> - Assertion is true if at least one element selected.
-
# * <tt>false</tt> - Assertion is true if no element selected.
-
# * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
-
# one element matches the string or regular expression.
-
# * <tt>Integer</tt> - Assertion is true if exactly that number of
-
# elements are selected.
-
# * <tt>Range</tt> - Assertion is true if the number of selected
-
# elements fit the range.
-
# If no equality test specified, the assertion is true if at least one
-
# element selected.
-
#
-
# To perform more than one equality tests, use a hash with the following keys:
-
# * <tt>:text</tt> - Narrow the selection to elements that have this text
-
# value (string or regexp).
-
# * <tt>:html</tt> - Narrow the selection to elements that have this HTML
-
# content (string or regexp).
-
# * <tt>:count</tt> - Assertion is true if the number of selected elements
-
# is equal to this value.
-
# * <tt>:minimum</tt> - Assertion is true if the number of selected
-
# elements is at least this value.
-
# * <tt>:maximum</tt> - Assertion is true if the number of selected
-
# elements is at most this value.
-
#
-
# If the method is called with a block, once all equality tests are
-
# evaluated the block is called with an array of all matched elements.
-
#
-
# # At least one form element
-
# assert_select "form"
-
#
-
# # Form element includes four input fields
-
# assert_select "form input", 4
-
#
-
# # Page title is "Welcome"
-
# assert_select "title", "Welcome"
-
#
-
# # Page title is "Welcome" and there is only one title element
-
# assert_select "title", {count: 1, text: "Welcome"},
-
# "Wrong title or more than one title element"
-
#
-
# # Page contains no forms
-
# assert_select "form", false, "This page must contain no forms"
-
#
-
# # Test the content and style
-
# assert_select "body div.header ul.menu"
-
#
-
# # Use substitution values
-
# assert_select "ol>li#?", /item-\d+/
-
#
-
# # All input fields in the form have a name
-
# assert_select "form input" do
-
# assert_select "[name=?]", /.+/ # Not empty
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select
-
#
-
# :method: assert_select
-
# :call-seq: assert_select(*args, &block)
-
-
# Extracts the body of an email and runs nested assertions on it.
-
#
-
# You must enable deliveries for this assertion to work, use:
-
# ActionMailer::Base.perform_deliveries = true
-
#
-
# assert_select_email do
-
# assert_select "h1", "Email alert"
-
# end
-
#
-
# assert_select_email do
-
# items = assert_select "ol>li"
-
# items.each do
-
# # Work with items here...
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select_email
-
#
-
# :method: assert_select_email
-
# :call-seq: assert_select_email(&block)
-
-
# Extracts the content of an element, treats it as encoded HTML and runs
-
# nested assertion on it.
-
#
-
# You typically call this method within another assertion to operate on
-
# all currently selected elements. You can also pass an element or array
-
# of elements.
-
#
-
# The content of each element is un-encoded, and wrapped in the root
-
# element +encoded+. It then calls the block with all un-encoded elements.
-
#
-
# # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
-
# assert_select "feed[xmlns='http://www.w3.org/2005/Atom']" do
-
# # Select each entry item and then the title item
-
# assert_select "entry>title" do
-
# # Run assertions on the encoded title elements
-
# assert_select_encoded do
-
# assert_select "b"
-
# end
-
# end
-
# end
-
#
-
#
-
# # Selects all paragraph tags from within the description of an RSS feed
-
# assert_select "rss[version=2.0]" do
-
# # Select description element of each feed item.
-
# assert_select "channel>item>description" do
-
# # Run assertions on the encoded elements.
-
# assert_select_encoded do
-
# assert_select "p"
-
# end
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select_encoded
-
#
-
# :method: assert_select_encoded
-
# :call-seq: assert_select_encoded(element = nil, &block)
-
-
##
-
# Checks that two HTML strings are equivalent. That they contain the same elements and attributes with the associated values.
-
#
-
# assert_dom_equal '<a href="http://www.example.com">Apples</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#must_dom_equal
-
#
-
# :method: assert_dom_equal
-
# :call-seq: assert_dom_equal(expected, actual, message = nil)
-
-
##
-
# Checks that two HTML strings are not equivalent. That they do not contain the same elements and attributes with the associated values.
-
#
-
# assert_dom_not_equal '<a href="http://www.example.com">Oranges</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#wont_dom_equal
-
#
-
# :method: assert_dom_not_equal
-
# :call-seq: assert_dom_not_equal(expected, actual, message = nil)
-
-
##
-
# Checks that two HTML strings are not equivalent. That they do not contain the same elements and attributes with the associated values.
-
#
-
# refute_dom_equal '<a href="http://www.example.com">Oranges</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#wont_dom_equal
-
#
-
# :method: assert_dom_equal
-
# :call-seq: assert_dom_equal(expected, actual, message = nil)
-
1
alias :refute_dom_equal :assert_dom_not_equal
-
-
##
-
# Asserts that there is a tag/node/element in the body of the response
-
# that meets all of the given conditions. The +conditions+ parameter must
-
# be a hash of any of the following keys (all are optional):
-
#
-
# * <tt>:tag</tt>: the node type must match the corresponding value
-
# * <tt>:attributes</tt>: a hash. The node's attributes must match the
-
# corresponding values in the hash.
-
# * <tt>:parent</tt>: a hash. The node's parent must match the
-
# corresponding hash.
-
# * <tt>:child</tt>: a hash. At least one of the node's immediate children
-
# must meet the criteria described by the hash.
-
# * <tt>:ancestor</tt>: a hash. At least one of the node's ancestors must
-
# meet the criteria described by the hash.
-
# * <tt>:descendant</tt>: a hash. At least one of the node's descendants
-
# must meet the criteria described by the hash.
-
# * <tt>:sibling</tt>: a hash. At least one of the node's siblings must
-
# meet the criteria described by the hash.
-
# * <tt>:after</tt>: a hash. The node must be after any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:before</tt>: a hash. The node must be before any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:children</tt>: a hash, for counting children of a node. Accepts
-
# the keys:
-
# * <tt>:count</tt>: either a number or a range which must equal (or
-
# include) the number of children that match.
-
# * <tt>:less_than</tt>: the number of matching children must be less
-
# than this number.
-
# * <tt>:greater_than</tt>: the number of matching children must be
-
# greater than this number.
-
# * <tt>:only</tt>: another hash consisting of the keys to use
-
# to match on the children, and only matching children will be
-
# counted.
-
# * <tt>:content</tt>: the textual content of the node must match the
-
# given value. This will not match HTML tags in the body of a
-
# tag--only text.
-
#
-
# Conditions are matched using the following algorithm:
-
#
-
# * if the condition is a string, it must be a substring of the value.
-
# * if the condition is a regexp, it must match the value.
-
# * if the condition is a number, the value must match number.to_s.
-
# * if the condition is +true+, the value must not be +nil+.
-
# * if the condition is +false+ or +nil+, the value must be +nil+.
-
#
-
# # Assert that there is a "span" tag
-
# assert_tag tag: "span"
-
#
-
# # Assert that there is a "span" tag with id="x"
-
# assert_tag tag: "span", attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" tag using the short-hand
-
# assert_tag :span
-
#
-
# # Assert that there is a "span" tag with id="x" using the short-hand
-
# assert_tag :span, attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" inside of a "div"
-
# assert_tag tag: "span", parent: { tag: "div" }
-
#
-
# # Assert that there is a "span" somewhere inside a table
-
# assert_tag tag: "span", ancestor: { tag: "table" }
-
#
-
# # Assert that there is a "span" with at least one "em" child
-
# assert_tag tag: "span", child: { tag: "em" }
-
#
-
# # Assert that there is a "span" containing a (possibly nested)
-
# # "strong" tag.
-
# assert_tag tag: "span", descendant: { tag: "strong" }
-
#
-
# # Assert that there is a "span" containing between 2 and 4 "em" tags
-
# # as immediate children
-
# assert_tag tag: "span",
-
# children: { count: 2..4, only: { tag: "em" } }
-
#
-
# # Get funky: assert that there is a "div", with an "ul" ancestor
-
# # and an "li" parent (with "class" = "enum"), and containing a
-
# # "span" descendant that contains text matching /hello world/
-
# assert_tag tag: "div",
-
# ancestor: { tag: "ul" },
-
# parent: { tag: "li",
-
# attributes: { class: "enum" } },
-
# descendant: { tag: "span",
-
# child: /hello world/ }
-
#
-
# <b>Please note</b>: +assert_tag+ and +assert_no_tag+ only work
-
# with well-formed XHTML. They recognize a few tags as implicitly self-closing
-
# (like br and hr and such) but will not work correctly with tags
-
# that allow optional closing tags (p, li, td). <em>You must explicitly
-
# close all of your tags to use these assertions.</em>
-
#
-
# See also Minitest::Rails::Expectations#must_have_tag
-
#
-
# :method: assert_tag
-
# :call-seq: assert_tag(*opts)
-
-
##
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also Minitest::Rails::Expectations#wont_have_tag
-
#
-
# :method: assert_no_tag
-
# :call-seq: assert_no_tag(*opts)
-
-
##
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also Minitest::Rails::Expectations#wont_have_tag
-
#
-
# :method: refute_tag
-
# :call-seq: refute_tag(*opts)
-
1
alias :refute_tag :assert_no_tag
-
end
-
-
1
class ActionDispatch::IntegrationTest
-
##
-
# Checks the numeric difference between the return value of an expression as a result of what is evaluated.
-
#
-
# assert_difference "User.count", +1 do
-
# User.create
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_change
-
#
-
# :method: assert_difference
-
# :call-seq: assert_difference(expression, difference = 1, message = nil, &block)
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# assert_no_difference "User.count" do
-
# User.new
-
# end
-
#
-
# See also Minitest::Rails::Expectations#wont_change
-
#
-
# :method: assert_no_difference
-
# :call-seq: assert_no_difference(expression, message = nil, &block)
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# refute_difference "User.count", do
-
# User.new
-
# end
-
#
-
# See also Minitest::Rails::Expectations#wont_change
-
#
-
# :args: expression, message = nil, &block
-
1
alias :refute_difference :assert_no_difference
-
-
# Asserts that the response is one of the following types:
-
#
-
# * <tt>:success</tt> - Status code was in the 200-299 range
-
# * <tt>:redirect</tt> - Status code was in the 300-399 range
-
# * <tt>:missing</tt> - Status code was 404
-
# * <tt>:error</tt> - Status code was in the 500-599 range
-
#
-
# You can also pass an explicit status number like <tt>assert_response(501)</tt>
-
# or its symbolic equivalent <tt>assert_response(:not_implemented)</tt>.
-
# See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list.
-
#
-
# # assert that the response was a redirection
-
# assert_response :redirect
-
#
-
# # assert that the response code was status code 401 (unauthorized)
-
# assert_response 401
-
#
-
# See also Minitest::Rails::Expectations#must_respond_with
-
#
-
# :method: assert_response
-
# :call-seq: assert_response(type, message = nil)
-
-
##
-
# Assert that the redirection options passed in match those of the redirect called in the latest action.
-
# This match can be partial, such that <tt>assert_redirected_to(controller: "weblog")</tt> will also
-
# match the redirection of <tt>redirect_to(controller: "weblog", action: "show")</tt> and so on.
-
#
-
# # assert that the redirection was to the "index" action on the WeblogController
-
# assert_redirected_to controller: "weblog", action: "index"
-
#
-
# # assert that the redirection was to the named route login_url
-
# assert_redirected_to login_url
-
#
-
# # assert that the redirection was to the url for @customer
-
# assert_redirected_to @customer
-
#
-
# # asserts that the redirection matches the regular expression
-
# assert_redirected_to %r(\Ahttp://example.org)
-
#
-
# See also Minitest::Rails::Expectations#must_redirect_to
-
#
-
# :method: assert_redirected_to
-
# :call-seq: assert_redirected_to(options = {}, message=nil)
-
-
##
-
# Asserts that the request was rendered with the appropriate template file or partials.
-
#
-
# # assert that the "new" view template was rendered
-
# assert_template "new"
-
#
-
# # assert that the exact template "admin/posts/new" was rendered
-
# assert_template %r{\Aadmin/posts/new\Z}
-
#
-
# # assert that the layout 'admin' was rendered
-
# assert_template layout: 'admin'
-
# assert_template layout: 'layouts/admin'
-
# assert_template layout: :admin
-
#
-
# # assert that no layout was rendered
-
# assert_template layout: nil
-
# assert_template layout: false
-
#
-
# # assert that the "_customer" partial was rendered twice
-
# assert_template partial: '_customer', count: 2
-
#
-
# # assert that no partials were rendered
-
# assert_template partial: false
-
#
-
# In a view test case, you can also assert that specific locals are passed
-
# to partials:
-
#
-
# # assert that the "_customer" partial was rendered with a specific object
-
# assert_template partial: '_customer', locals: { customer: @customer }
-
#
-
# See also Minitest::Rails::Expectations#must_render_template
-
#
-
# :method: assert_template
-
# :call-seq: assert_template(options = {}, message = nil)
-
-
##
-
# Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+.
-
# The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in
-
# a query string. The +message+ parameter allows you to specify a custom error message for assertion failures.
-
#
-
# The +defaults+ parameter is unused.
-
#
-
# # Asserts that the default action is generated for a route with no action
-
# assert_generates "/items", controller: "items", action: "index"
-
#
-
# # Tests that the list action is properly routed
-
# assert_generates "/items/list", controller: "items", action: "list"
-
#
-
# # Tests the generation of a route with a parameter
-
# assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" }
-
#
-
# # Asserts that the generated route gives us our custom route
-
# assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" }
-
#
-
# See also Minitest::Rails::Expectations#must_route_to
-
#
-
# :method: assert_generates
-
# :call-seq: assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)
-
-
##
-
# Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
-
# match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+.
-
#
-
# Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes
-
# requiring a specific HTTP method. The hash should contain a :path with the incoming request path
-
# and a :method containing the required HTTP verb.
-
#
-
# # assert that POSTing to /items will call the create action on ItemsController
-
# assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post})
-
#
-
# You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used
-
# to assert that values in the query string string will end up in the params hash correctly. To test query strings you must use the
-
# extras argument, appending the query string on the path directly will not work. For example:
-
#
-
# # assert that a path of '/items/list/1?view=print' returns the correct options
-
# assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" })
-
#
-
# The +message+ parameter allows you to pass in an error message that is displayed upon failure.
-
#
-
# # Check the default route (i.e., the index action)
-
# assert_recognizes({controller: 'items', action: 'index'}, 'items')
-
#
-
# # Test a specific action
-
# assert_recognizes({controller: 'items', action: 'list'}, 'items/list')
-
#
-
# # Test an action with a parameter
-
# assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1')
-
#
-
# # Test a custom route
-
# assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1')
-
#
-
# See also Minitest::Rails::Expectations#must_route_from
-
#
-
# :method: assert_recognizes
-
# :call-seq: assert_recognizes(expected_options, path, extras={}, msg=nil)
-
-
##
-
# Asserts that path and options match both ways; in other words, it verifies that <tt>path</tt> generates
-
# <tt>options</tt> and then that <tt>options</tt> generates <tt>path</tt>. This essentially combines +assert_recognizes+
-
# and +assert_generates+ into one step.
-
#
-
# The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The
-
# +message+ parameter allows you to specify a custom error message to display upon failure.
-
#
-
# # Assert a basic route: a controller with the default action (index)
-
# assert_routing '/home', controller: 'home', action: 'index'
-
#
-
# # Test a route generated with a specific controller, action, and parameter (id)
-
# assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23
-
#
-
# # Assert a basic route (controller + default action), with an error message if it fails
-
# assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly'
-
#
-
# # Tests a route, providing a defaults hash
-
# assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"}
-
#
-
# # Tests a route with a HTTP method
-
# assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" })
-
#
-
# See also Minitest::Rails::Expectations#must_route
-
#
-
# :method: assert_routing
-
# :call-seq: assert_routing(path, options, defaults={}, extras={}, message=nil)
-
-
# An assertion that selects elements and makes one or more equality tests.
-
#
-
# If the first argument is an element, selects all matching elements
-
# starting from (and including) that element and all its children in
-
# depth-first order.
-
#
-
# If no element if specified, calling +assert_select+ selects from the
-
# response HTML unless +assert_select+ is called from within an +assert_select+ block.
-
#
-
# When called with a block +assert_select+ passes an array of selected elements
-
# to the block. Calling +assert_select+ from the block, with no element specified,
-
# runs the assertion on the complete set of elements selected by the enclosing assertion.
-
# Alternatively the array may be iterated through so that +assert_select+ can be called
-
# separately for each element.
-
#
-
#
-
# ==== Example
-
# If the response contains two ordered lists, each with four list elements then:
-
# assert_select "ol" do |elements|
-
# elements.each do |element|
-
# assert_select element, "li", 4
-
# end
-
# end
-
#
-
# will pass, as will:
-
# assert_select "ol" do
-
# assert_select "li", 8
-
# end
-
#
-
# The selector may be a CSS selector expression (String), an expression
-
# with substitution values, or an HTML::Selector object.
-
#
-
# === Equality Tests
-
#
-
# The equality test may be one of the following:
-
# * <tt>true</tt> - Assertion is true if at least one element selected.
-
# * <tt>false</tt> - Assertion is true if no element selected.
-
# * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
-
# one element matches the string or regular expression.
-
# * <tt>Integer</tt> - Assertion is true if exactly that number of
-
# elements are selected.
-
# * <tt>Range</tt> - Assertion is true if the number of selected
-
# elements fit the range.
-
# If no equality test specified, the assertion is true if at least one
-
# element selected.
-
#
-
# To perform more than one equality tests, use a hash with the following keys:
-
# * <tt>:text</tt> - Narrow the selection to elements that have this text
-
# value (string or regexp).
-
# * <tt>:html</tt> - Narrow the selection to elements that have this HTML
-
# content (string or regexp).
-
# * <tt>:count</tt> - Assertion is true if the number of selected elements
-
# is equal to this value.
-
# * <tt>:minimum</tt> - Assertion is true if the number of selected
-
# elements is at least this value.
-
# * <tt>:maximum</tt> - Assertion is true if the number of selected
-
# elements is at most this value.
-
#
-
# If the method is called with a block, once all equality tests are
-
# evaluated the block is called with an array of all matched elements.
-
#
-
# # At least one form element
-
# assert_select "form"
-
#
-
# # Form element includes four input fields
-
# assert_select "form input", 4
-
#
-
# # Page title is "Welcome"
-
# assert_select "title", "Welcome"
-
#
-
# # Page title is "Welcome" and there is only one title element
-
# assert_select "title", {count: 1, text: "Welcome"},
-
# "Wrong title or more than one title element"
-
#
-
# # Page contains no forms
-
# assert_select "form", false, "This page must contain no forms"
-
#
-
# # Test the content and style
-
# assert_select "body div.header ul.menu"
-
#
-
# # Use substitution values
-
# assert_select "ol>li#?", /item-\d+/
-
#
-
# # All input fields in the form have a name
-
# assert_select "form input" do
-
# assert_select "[name=?]", /.+/ # Not empty
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select
-
#
-
# :method: assert_select
-
# :call-seq: assert_select(*args, &block)
-
-
# Extracts the body of an email and runs nested assertions on it.
-
#
-
# You must enable deliveries for this assertion to work, use:
-
# ActionMailer::Base.perform_deliveries = true
-
#
-
# assert_select_email do
-
# assert_select "h1", "Email alert"
-
# end
-
#
-
# assert_select_email do
-
# items = assert_select "ol>li"
-
# items.each do
-
# # Work with items here...
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select_email
-
#
-
# :method: assert_select_email
-
# :call-seq: assert_select_email(&block)
-
-
# Extracts the content of an element, treats it as encoded HTML and runs
-
# nested assertion on it.
-
#
-
# You typically call this method within another assertion to operate on
-
# all currently selected elements. You can also pass an element or array
-
# of elements.
-
#
-
# The content of each element is un-encoded, and wrapped in the root
-
# element +encoded+. It then calls the block with all un-encoded elements.
-
#
-
# # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
-
# assert_select "feed[xmlns='http://www.w3.org/2005/Atom']" do
-
# # Select each entry item and then the title item
-
# assert_select "entry>title" do
-
# # Run assertions on the encoded title elements
-
# assert_select_encoded do
-
# assert_select "b"
-
# end
-
# end
-
# end
-
#
-
#
-
# # Selects all paragraph tags from within the description of an RSS feed
-
# assert_select "rss[version=2.0]" do
-
# # Select description element of each feed item.
-
# assert_select "channel>item>description" do
-
# # Run assertions on the encoded elements.
-
# assert_select_encoded do
-
# assert_select "p"
-
# end
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_select_encoded
-
#
-
# :method: assert_select_encoded
-
# :call-seq: assert_select_encoded(element = nil, &block)
-
-
##
-
# Checks that two HTML strings are equivalent. That they contain the same elements and attributes with the associated values.
-
#
-
# assert_dom_equal '<a href="http://www.example.com">Apples</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#must_dom_equal
-
#
-
# :method: assert_dom_equal
-
# :call-seq: assert_dom_equal(expected, actual, message = nil)
-
-
##
-
# Checks that two HTML strings are not equivalent. That they do not contain the same elements and attributes with the associated values.
-
#
-
# assert_dom_not_equal '<a href="http://www.example.com">Oranges</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#wont_dom_equal
-
#
-
# :method: assert_dom_not_equal
-
# :call-seq: assert_dom_not_equal(expected, actual, message = nil)
-
-
##
-
# Checks that two HTML strings are not equivalent. That they do not contain the same elements and attributes with the associated values.
-
#
-
# refute_dom_equal '<a href="http://www.example.com">Oranges</a>',
-
# link_to("Apples", "http://www.example.com")
-
#
-
# See also Minitest::Rails::Expectations#wont_dom_equal
-
#
-
# :method: assert_dom_equal
-
# :call-seq: assert_dom_equal(expected, actual, message = nil)
-
1
alias :refute_dom_equal :assert_dom_not_equal
-
-
##
-
# Asserts that there is a tag/node/element in the body of the response
-
# that meets all of the given conditions. The +conditions+ parameter must
-
# be a hash of any of the following keys (all are optional):
-
#
-
# * <tt>:tag</tt>: the node type must match the corresponding value
-
# * <tt>:attributes</tt>: a hash. The node's attributes must match the
-
# corresponding values in the hash.
-
# * <tt>:parent</tt>: a hash. The node's parent must match the
-
# corresponding hash.
-
# * <tt>:child</tt>: a hash. At least one of the node's immediate children
-
# must meet the criteria described by the hash.
-
# * <tt>:ancestor</tt>: a hash. At least one of the node's ancestors must
-
# meet the criteria described by the hash.
-
# * <tt>:descendant</tt>: a hash. At least one of the node's descendants
-
# must meet the criteria described by the hash.
-
# * <tt>:sibling</tt>: a hash. At least one of the node's siblings must
-
# meet the criteria described by the hash.
-
# * <tt>:after</tt>: a hash. The node must be after any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:before</tt>: a hash. The node must be before any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:children</tt>: a hash, for counting children of a node. Accepts
-
# the keys:
-
# * <tt>:count</tt>: either a number or a range which must equal (or
-
# include) the number of children that match.
-
# * <tt>:less_than</tt>: the number of matching children must be less
-
# than this number.
-
# * <tt>:greater_than</tt>: the number of matching children must be
-
# greater than this number.
-
# * <tt>:only</tt>: another hash consisting of the keys to use
-
# to match on the children, and only matching children will be
-
# counted.
-
# * <tt>:content</tt>: the textual content of the node must match the
-
# given value. This will not match HTML tags in the body of a
-
# tag--only text.
-
#
-
# Conditions are matched using the following algorithm:
-
#
-
# * if the condition is a string, it must be a substring of the value.
-
# * if the condition is a regexp, it must match the value.
-
# * if the condition is a number, the value must match number.to_s.
-
# * if the condition is +true+, the value must not be +nil+.
-
# * if the condition is +false+ or +nil+, the value must be +nil+.
-
#
-
# # Assert that there is a "span" tag
-
# assert_tag tag: "span"
-
#
-
# # Assert that there is a "span" tag with id="x"
-
# assert_tag tag: "span", attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" tag using the short-hand
-
# assert_tag :span
-
#
-
# # Assert that there is a "span" tag with id="x" using the short-hand
-
# assert_tag :span, attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" inside of a "div"
-
# assert_tag tag: "span", parent: { tag: "div" }
-
#
-
# # Assert that there is a "span" somewhere inside a table
-
# assert_tag tag: "span", ancestor: { tag: "table" }
-
#
-
# # Assert that there is a "span" with at least one "em" child
-
# assert_tag tag: "span", child: { tag: "em" }
-
#
-
# # Assert that there is a "span" containing a (possibly nested)
-
# # "strong" tag.
-
# assert_tag tag: "span", descendant: { tag: "strong" }
-
#
-
# # Assert that there is a "span" containing between 2 and 4 "em" tags
-
# # as immediate children
-
# assert_tag tag: "span",
-
# children: { count: 2..4, only: { tag: "em" } }
-
#
-
# # Get funky: assert that there is a "div", with an "ul" ancestor
-
# # and an "li" parent (with "class" = "enum"), and containing a
-
# # "span" descendant that contains text matching /hello world/
-
# assert_tag tag: "div",
-
# ancestor: { tag: "ul" },
-
# parent: { tag: "li",
-
# attributes: { class: "enum" } },
-
# descendant: { tag: "span",
-
# child: /hello world/ }
-
#
-
# <b>Please note</b>: +assert_tag+ and +assert_no_tag+ only work
-
# with well-formed XHTML. They recognize a few tags as implicitly self-closing
-
# (like br and hr and such) but will not work correctly with tags
-
# that allow optional closing tags (p, li, td). <em>You must explicitly
-
# close all of your tags to use these assertions.</em>
-
#
-
# See also Minitest::Rails::Expectations#must_have_tag
-
#
-
# :method: assert_tag
-
# :call-seq: assert_tag(*opts)
-
-
##
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also Minitest::Rails::Expectations#wont_have_tag
-
#
-
# :method: assert_no_tag
-
# :call-seq: assert_no_tag(*opts)
-
-
##
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also Minitest::Rails::Expectations#wont_have_tag
-
#
-
# :method: refute_tag
-
# :call-seq: refute_tag(*opts)
-
1
alias :refute_tag :assert_no_tag
-
end
-
-
1
if defined? ActiveJob
-
1
class ActiveJob::TestCase
-
# Asserts that the number of enqueued jobs matches the given number.
-
#
-
# def test_jobs
-
# assert_enqueued_jobs 0
-
# HelloJob.perform_later('david')
-
# assert_enqueued_jobs 1
-
# HelloJob.perform_later('abdelkader')
-
# assert_enqueued_jobs 2
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# jobs to be enqueued.
-
#
-
# def test_jobs_again
-
# assert_enqueued_jobs 1 do
-
# HelloJob.perform_later('cristian')
-
# end
-
#
-
# assert_enqueued_jobs 2 do
-
# HelloJob.perform_later('aaron')
-
# HelloJob.perform_later('rafael')
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_enqueue_jobs
-
#
-
# :method: assert_enqueued_jobs
-
# :call-seq: assert_enqueued_jobs(number)
-
-
##
-
# Asserts that no jobs have been enqueued.
-
#
-
# def test_jobs
-
# assert_no_enqueued_jobs
-
# HelloJob.perform_later('jeremy')
-
# assert_enqueued_jobs 1
-
# end
-
#
-
# If a block is passed, that block should not cause any job to be enqueued.
-
#
-
# def test_jobs_again
-
# assert_no_enqueued_jobs do
-
# # No job should be enqueued from this block
-
# end
-
# end
-
#
-
# Note: This assertion is simply a shortcut for:
-
#
-
# assert_enqueued_jobs 0, &block
-
#
-
# See also Minitest::Rails::Expectations#wont_enqueue_jobs
-
#
-
# :method: assert_no_enqueued_jobs
-
# :call-seq: assert_no_enqueued_jobs(number)
-
-
##
-
# Asserts that the number of performed jobs matches the given number.
-
# If no block is passed, <tt>perform_enqueued_jobs</tt>d
-
# must be called around the job call.
-
#
-
# def test_jobs
-
# assert_performed_jobs 0
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('xavier')
-
# end
-
# assert_performed_jobs 1
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('yves')
-
# assert_performed_jobs 2
-
# end
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# jobs to be performed.
-
#
-
# def test_jobs_again
-
# assert_performed_jobs 1 do
-
# HelloJob.perform_later('robin')
-
# end
-
#
-
# assert_performed_jobs 2 do
-
# HelloJob.perform_later('carlos')
-
# HelloJob.perform_later('sean')
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_perform_jobs
-
#
-
# :method: assert_performed_jobs
-
# :call-seq: assert_performed_jobs(number)
-
-
##
-
# Asserts that no jobs have been performed.
-
#
-
# def test_jobs
-
# assert_no_performed_jobs
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('matthew')
-
# assert_performed_jobs 1
-
# end
-
# end
-
#
-
# If a block is passed, that block should not cause any job to be performed.
-
#
-
# def test_jobs_again
-
# assert_no_performed_jobs do
-
# # No job should be performed from this block
-
# end
-
# end
-
#
-
# Note: This assertion is simply a shortcut for:
-
#
-
# assert_performed_jobs 0, &block
-
#
-
# See also Minitest::Rails::Expectations#wont_perform_jobs
-
#
-
# :method: assert_no_performed_jobs
-
# :call-seq: assert_no_performed_jobs(number)
-
-
##
-
# Asserts that the job passed in the block has been enqueued with the given arguments.
-
#
-
# def test_assert_enqueued_with
-
# assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low') do
-
# MyJob.perform_later(1,2,3)
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_enqueue_with
-
#
-
# :method: assert_enqueued_with
-
# :call-seq: assert_enqueued_with(args)
-
-
##
-
# Asserts that the job passed in the block has been performed with the given arguments.
-
#
-
# def test_assert_performed_with
-
# assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high') do
-
# MyJob.perform_later(1,2,3)
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#must_perform_with
-
#
-
# :method: assert_performed_with
-
# :call-seq: assert_performed_with(args)
-
end
-
end
-
1
require "active_support/concern"
-
1
require "active_support/inflector"
-
-
1
module Minitest
-
1
module Rails
-
# Resolves a constant from a minitest spec name.
-
#
-
# Given the following spec-style test:
-
#
-
# describe WidgetsController, :index do
-
# describe "authenticated user" do
-
# describe "returns widgets" do
-
# it "has a controller that exists" do
-
# assert_kind_of WidgetsController, @controller
-
# end
-
# end
-
# end
-
# end
-
#
-
# The test will have the following name:
-
#
-
# "WidgetsController::index::authenticated user::returns widgets"
-
#
-
# The constant WidgetsController can be resolved from the name.
-
# The following code will resolve the constant:
-
#
-
# controller = determine_constant_from_test_name(name) do |constant|
-
# Class === constant && constant < ::ActionController::Metal
-
# end
-
1
module ConstantLookup
-
1
extend ::ActiveSupport::Concern
-
-
1
module ClassMethods # :nodoc:
-
1
def determine_constant_from_test_name(test_name)
-
names = test_name.split "::"
-
while names.size > 0 do
-
names.last.sub!(/Test$/, "")
-
begin
-
constant = names.join("::").constantize
-
break(constant) if yield(constant)
-
rescue NameError
-
# Constant wasn't found, move on
-
ensure
-
names.pop
-
end
-
end
-
end
-
end
-
-
end
-
end
-
end
-
1
require "active_support/concern"
-
-
1
module Minitest::Rails::Expectations
-
-
##############################################################################
-
# ActiveSupport Expectations
-
##############################################################################
-
-
##
-
# Checks the numeric difference between the return value of an expression as a result of what is evaluated.
-
#
-
# value { User.create password: "valid" }.must_change "User.count"
-
# value { 3.times do
-
# User.create password: "valid"
-
# end }.must_change "User.count", 3
-
#
-
# See also ActiveSupport::TestCase#assert_difference
-
#
-
# :method: must_change
-
# :args: expression, difference = 1, message = nil
-
1
infect_an_assertion :assert_difference, :must_change, :block
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# value { User.new }.wont_change "User.count"
-
#
-
# See also ActiveSupport::TestCase#refute_difference
-
#
-
# :method: wont_change
-
# :args: expression, message = nil
-
1
infect_an_assertion :refute_difference, :wont_change, :block
-
-
##############################################################################
-
# ActionController/ActionView/ActionDispatch Expectations
-
##############################################################################
-
-
# Expects that the response is one of the following types:
-
#
-
# * <tt>:success</tt> - Status code was in the 200-299 range
-
# * <tt>:redirect</tt> - Status code was in the 300-399 range
-
# * <tt>:missing</tt> - Status code was 404
-
# * <tt>:error</tt> - Status code was in the 500-599 range
-
#
-
# You can also pass an explicit status number like <tt>assert_response(501)</tt>
-
# or its symbolic equivalent <tt>assert_response(:not_implemented)</tt>.
-
# See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list.
-
#
-
# # expect that the response was a redirection
-
# must_respond_with :redirect
-
# value(response).must_respond_with :redirect
-
#
-
# # expect that the response code was status code 401 (unauthorized)
-
# must_respond_with 401
-
# value(response).must_respond_with 401
-
#
-
# See also ActionController::TestCase#assert_response
-
# See also ActionView::TestCase#assert_response
-
# See also ActionDispatch::IntegrationTest#assert_response
-
#
-
# :method: must_respond_with
-
# :call-seq: must_respond_with(type, message = nil)
-
-
##
-
# Expects that the redirection options passed in match those of the redirect called in the latest action.
-
# This match can be partial, such that <tt>assert_redirected_to(controller: "weblog")</tt> will also
-
# match the redirection of <tt>redirect_to(controller: "weblog", action: "show")</tt> and so on.
-
#
-
# # expect that the redirection was to the "index" action on the WeblogController
-
# must_redirect_to controller: "weblog", action: "index"
-
#
-
# # expect that the redirection was to the named route login_url
-
# must_redirect_to login_url
-
#
-
# # expect that the redirection was to the url for @customer
-
# must_redirect_to @customer
-
#
-
# # expect that the redirection matches the regular expression
-
# must_redirect_to %r(\Ahttp://example.org)
-
#
-
# See also ActionController::TestCase#assert_redirected_to
-
# See also ActionView::TestCase#assert_redirected_to
-
# See also ActionDispatch::IntegrationTest#assert_redirected_to
-
#
-
# :method: must_redirect_to
-
# :call-seq: must_redirect_to(options = {}, message=nil)
-
-
##
-
# Expects that the request was rendered with the appropriate template file or partials.
-
#
-
# # expect that the "new" view template was rendered
-
# must_render_template "new"
-
#
-
# # expect that the exact template "admin/posts/new" was rendered
-
# must_render_template %r{\Aadmin/posts/new\Z}
-
#
-
# # expect that the layout 'admin' was rendered
-
# must_render_template layout: 'admin'
-
# must_render_template layout: 'layouts/admin'
-
# must_render_template layout: :admin
-
#
-
# # expect that no layout was rendered
-
# must_render_template layout: nil
-
# must_render_template layout: false
-
#
-
# # expect that the "_customer" partial was rendered twice
-
# must_render_template partial: '_customer', count: 2
-
#
-
# # expect that no partials were rendered
-
# must_render_template partial: false
-
#
-
# In a view test case, you can also expect that specific locals are passed
-
# to partials:
-
#
-
# # expect that the "_customer" partial was rendered with a specific object
-
# must_render_template partial: '_customer', locals: { customer: @customer }
-
#
-
# See also ActionController::TestCase#assert_template
-
# See also ActionView::TestCase#assert_template
-
# See also ActionDispatch::IntegrationTest#assert_template
-
#
-
# :method: must_render_template
-
# :call-seq: must_render_template(options = {}, message = nil)
-
-
##
-
# Expects that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+.
-
# The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in
-
# a query string. The +message+ parameter allows you to specify a custom error message for assertion failures.
-
#
-
# The +defaults+ parameter is unused.
-
#
-
# # Expects that the default action is generated for a route with no action
-
# value({controller: "items", action: "index"}).must_route_from "/items"
-
#
-
# # Tests that the list action is properly routed
-
# value({controller: "items", action: "list"}).must_route_to "/items/list"
-
#
-
# # Tests the generation of a route with a parameter
-
# value({ controller: "items", action: "list", id: "1" }).must_route_from "/items/list/1"
-
#
-
# # Expects that the generated route gives us our custom route
-
# value({ controller: 'scm', action: 'show_diff', revision: "12" }).must_route_from "changesets/12"
-
#
-
# See also ActionController::TestCase#assert_generates
-
# See also ActionView::TestCase#assert_generates
-
# See also ActionDispatch::IntegrationTest#assert_generates
-
#
-
# :method: must_route_from
-
# :call-seq: options.must_route_from(expected_path, defaults={}, extras = {}, message=nil)
-
1
infect_an_assertion :assert_generates, :must_route_to
-
-
##
-
# Expects that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
-
# match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+.
-
#
-
# Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes
-
# requiring a specific HTTP method. The hash should contain a :path with the incoming request path
-
# and a :method containing the required HTTP verb.
-
#
-
# # assert that POSTing to /items will call the create action on ItemsController
-
# assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post})
-
#
-
# You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used
-
# to assert that values in the query string string will end up in the params hash correctly. To test query strings you must use the
-
# extras argument, appending the query string on the path directly will not work. For example:
-
#
-
# # Expect that a path of '/items/list/1?view=print' returns the correct options
-
# value('items/list/1').must_route_from({controller: 'items', action: 'list', id: '1', view: 'print'}, { view: "print" })
-
#
-
# The +message+ parameter allows you to pass in an error message that is displayed upon failure.
-
#
-
# # Check the default route (i.e., the index action)
-
# value('items').must_route_from({controller: 'items', action: 'index'})
-
#
-
# # Test a specific action
-
# value('items/list').must_route_from({controller: 'items', action: 'list'})
-
#
-
# # Test an action with a parameter
-
# value('items/destroy/1').must_route_from({controller: 'items', action: 'destroy', id: '1'})
-
#
-
# # Test a custom route
-
# value('view/item1').must_route_from({controller: 'items', action: 'show', id: '1'})
-
#
-
# See also ActionController::TestCase#assert_recognizes
-
# See also ActionView::TestCase#assert_recognizes
-
# See also ActionDispatch::IntegrationTest#assert_recognizes
-
#
-
# :method: must_route_from
-
# :call-seq: path.must_route_from(expected_options, extras={}, msg=nil)
-
1
infect_an_assertion :assert_recognizes, :must_route_from
-
-
##
-
# Expects that path and options match both ways; in other words, it verifies that <tt>path</tt> generates
-
# <tt>options</tt> and then that <tt>options</tt> generates <tt>path</tt>. This essentially combines +assert_recognizes+
-
# and +assert_generates+ into one step.
-
#
-
# The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The
-
# +message+ parameter allows you to specify a custom error message to display upon failure.
-
#
-
# # Expect a basic route: a controller with the default action (index)
-
# value({ controller: 'home', action: 'index' }).must_route_for '/home'
-
#
-
# # Test a route generated with a specific controller, action, and parameter (id)
-
# value({ controller: 'entries', action: 'show', id: 23 }).must_route_for '/entries/show/23'
-
#
-
# # Expect a basic route (controller + default action), with an error message if it fails
-
# value({ controller: 'store', action: 'index' }).must_route_for '/store'
-
#
-
# # Tests a route, providing a defaults hash
-
# value({id: "9", item: "square"}).must_route_for 'controller/action/9', {controller: "controller", action: "action"}, {}, {item: "square"}
-
#
-
# # Tests a route with a HTTP method
-
# value({ controller: "product", action: "update", id: "321" }).must_route_for({ method: 'put', path: '/product/321' })
-
#
-
# See also ActionController::TestCase#assert_routing
-
# See also ActionView::TestCase#assert_routing
-
# See also ActionDispatch::IntegrationTest#assert_routing
-
#
-
# :method: must_route_for
-
# :call-seq: options.must_route_for(path, defaults={}, extras={}, message=nil)
-
1
infect_an_assertion :assert_routing, :must_route_for
-
-
# An expectation that selects elements and makes one or more equality tests.
-
#
-
# If the first argument is an element, selects all matching elements
-
# starting from (and including) that element and all its children in
-
# depth-first order.
-
#
-
# If no element if specified, calling +must_select+ selects from the
-
# response HTML unless +must_select+ is called from within an +must_select+ block.
-
#
-
# When called with a block +must_select+ passes an array of selected elements
-
# to the block. Calling +must_select+ from the block, with no element specified,
-
# runs the expectation on the complete set of elements selected by the enclosing expectation.
-
# Alternatively the array may be iterated through so that +must_select+ can be called
-
# separately for each element.
-
#
-
#
-
# ==== Example
-
# If the response contains two ordered lists, each with four list elements then:
-
# must_select "ol" do |elements|
-
# elements.each do |element|
-
# must_select element, "li", 4
-
# end
-
# end
-
#
-
# will pass, as will:
-
# must_select "ol" do
-
# must_select "li", 8
-
# end
-
#
-
# The selector may be a CSS selector expression (String), an expression
-
# with substitution values, or an HTML::Selector object.
-
#
-
# === Equality Tests
-
#
-
# The equality test may be one of the following:
-
# * <tt>true</tt> - Assertion is true if at least one element selected.
-
# * <tt>false</tt> - Assertion is true if no element selected.
-
# * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
-
# one element matches the string or regular expression.
-
# * <tt>Integer</tt> - Assertion is true if exactly that number of
-
# elements are selected.
-
# * <tt>Range</tt> - Assertion is true if the number of selected
-
# elements fit the range.
-
# If no equality test specified, the expectation is true if at least one
-
# element selected.
-
#
-
# To perform more than one equality tests, use a hash with the following keys:
-
# * <tt>:text</tt> - Narrow the selection to elements that have this text
-
# value (string or regexp).
-
# * <tt>:html</tt> - Narrow the selection to elements that have this HTML
-
# content (string or regexp).
-
# * <tt>:count</tt> - Assertion is true if the number of selected elements
-
# is equal to this value.
-
# * <tt>:minimum</tt> - Assertion is true if the number of selected
-
# elements is at least this value.
-
# * <tt>:maximum</tt> - Assertion is true if the number of selected
-
# elements is at most this value.
-
#
-
# If the method is called with a block, once all equality tests are
-
# evaluated the block is called with an array of all matched elements.
-
#
-
# # At least one form element
-
# must_select "form"
-
#
-
# # Form element includes four input fields
-
# must_select "form input", 4
-
#
-
# # Page title is "Welcome"
-
# must_select "title", "Welcome"
-
#
-
# # Page title is "Welcome" and there is only one title element
-
# must_select "title", {count: 1, text: "Welcome"},
-
# "Wrong title or more than one title element"
-
#
-
# # Page contains no forms
-
# must_select "form", false, "This page must contain no forms"
-
#
-
# # Test the content and style
-
# must_select "body div.header ul.menu"
-
#
-
# # Use substitution values
-
# must_select "ol>li#?", /item-\d+/
-
#
-
# # All input fields in the form have a name
-
# must_select "form input" do
-
# must_select "[name=?]", /.+/ # Not empty
-
# end
-
#
-
# See also ActionController::TestCase#assert_select
-
# See also ActionView::TestCase#assert_select
-
# See also ActionDispatch::IntegrationTest#assert_select
-
#
-
# :method: must_select
-
# :call-seq: must_select(*args, &block)
-
-
# Extracts the body of an email and runs nested expectations on it.
-
#
-
# You must enable deliveries for this expectation to work, use:
-
# ActionMailer::Base.perform_deliveries = true
-
#
-
# must_select_email do
-
# must_select "h1", "Email alert"
-
# end
-
#
-
# must_select_email do
-
# items = must_select "ol>li"
-
# items.each do
-
# # Work with items here...
-
# end
-
# end
-
#
-
# See also ActionController::TestCase#assert_select_email
-
# See also ActionView::TestCase#assert_select_email
-
# See also ActionDispatch::IntegrationTest#assert_select_email
-
#
-
# :method: must_select_email
-
# :call-seq: must_select_email(&block)
-
-
# Extracts the content of an element, treats it as encoded HTML and runs
-
# nested expectation on it.
-
#
-
# You typically call this method within another expectation to operate on
-
# all currently selected elements. You can also pass an element or array
-
# of elements.
-
#
-
# The content of each element is un-encoded, and wrapped in the root
-
# element +encoded+. It then calls the block with all un-encoded elements.
-
#
-
# # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
-
# must_select "feed[xmlns='http://www.w3.org/2005/Atom']" do
-
# # Select each entry item and then the title item
-
# must_select "entry>title" do
-
# # Run expectations on the encoded title elements
-
# must_select_encoded do
-
# must_select "b"
-
# end
-
# end
-
# end
-
#
-
#
-
# # Selects all paragraph tags from within the description of an RSS feed
-
# must_select "rss[version=2.0]" do
-
# # Select description element of each feed item.
-
# must_select "channel>item>description" do
-
# # Run expectations on the encoded elements.
-
# must_select_encoded do
-
# must_select "p"
-
# end
-
# end
-
# end
-
#
-
# See also ActionController::TestCase#assert_select_encoded
-
# See also ActionView::TestCase#assert_select_encoded
-
# See also ActionDispatch::IntegrationTest#assert_select_encoded
-
#
-
# :method: must_select_encoded
-
# :call-seq: must_select_encoded(element = nil, &block)
-
-
##
-
# Checks that two HTML strings are equivalent. That they contain the same elements and attributes with the associated values.
-
# Checks the numeric difference between the return value of an expression as a result of what is evaluated.
-
#
-
# apple_link = '<a href="http://www.example.com">Apples</a>'
-
# value(link_to("Apples", "http://www.example.com")).must_dom_equal apple_link
-
#
-
# See also ActionController::TestCase#assert_dom_equal
-
# See also ActionView::TestCase#assert_dom_equal
-
# See also ActionDispatch::IntegrationTest#assert_dom_equal
-
#
-
# :method: must_dom_equal
-
# :args: expected, message = nil
-
1
infect_an_assertion :assert_dom_equal, :must_dom_equal
-
-
##
-
# Checks that the numeric result of evaluating an expression is not changed before and after invoking.
-
#
-
# orange_link = '<a href="http://www.example.com">Oranges</a>'
-
# link_to("Apples", "http://www.example.com").wont_dom_equal orange_link
-
#
-
# See also ActionController::TestCase#refute_dom_equal
-
# See also ActionView::TestCase#refute_dom_equal
-
# See also ActionDispatch::IntegrationTest#refute_dom_equal
-
# See also ActionController::TestCase#assert_dom_not_equal
-
# See also ActionView::TestCase#assert_dom_not_equal
-
# See also ActionDispatch::IntegrationTest#assert_dom_not_equal
-
#
-
# :method: wont_dom_equal
-
# :args: expected, message = nil
-
1
infect_an_assertion :refute_dom_equal, :wont_dom_equal
-
-
##
-
# Expects that there is a tag/node/element in the body of the response
-
# that meets all of the given conditions. The +conditions+ parameter must
-
# be a hash of any of the following keys (all are optional):
-
#
-
# * <tt>:tag</tt>: the node type must match the corresponding value
-
# * <tt>:attributes</tt>: a hash. The node's attributes must match the
-
# corresponding values in the hash.
-
# * <tt>:parent</tt>: a hash. The node's parent must match the
-
# corresponding hash.
-
# * <tt>:child</tt>: a hash. At least one of the node's immediate children
-
# must meet the criteria described by the hash.
-
# * <tt>:ancestor</tt>: a hash. At least one of the node's ancestors must
-
# meet the criteria described by the hash.
-
# * <tt>:descendant</tt>: a hash. At least one of the node's descendants
-
# must meet the criteria described by the hash.
-
# * <tt>:sibling</tt>: a hash. At least one of the node's siblings must
-
# meet the criteria described by the hash.
-
# * <tt>:after</tt>: a hash. The node must be after any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:before</tt>: a hash. The node must be before any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:children</tt>: a hash, for counting children of a node. Accepts
-
# the keys:
-
# * <tt>:count</tt>: either a number or a range which must equal (or
-
# include) the number of children that match.
-
# * <tt>:less_than</tt>: the number of matching children must be less
-
# than this number.
-
# * <tt>:greater_than</tt>: the number of matching children must be
-
# greater than this number.
-
# * <tt>:only</tt>: another hash consisting of the keys to use
-
# to match on the children, and only matching children will be
-
# counted.
-
# * <tt>:content</tt>: the textual content of the node must match the
-
# given value. This will not match HTML tags in the body of a
-
# tag--only text.
-
#
-
# Conditions are matched using the following algorithm:
-
#
-
# * if the condition is a string, it must be a substring of the value.
-
# * if the condition is a regexp, it must match the value.
-
# * if the condition is a number, the value must match number.to_s.
-
# * if the condition is +true+, the value must not be +nil+.
-
# * if the condition is +false+ or +nil+, the value must be +nil+.
-
#
-
# # Expect that there is a "span" tag
-
# must_have_tag tag: "span"
-
#
-
# # Expect that there is a "span" tag with id="x"
-
# must_have_tag tag: "span", attributes: { id: "x" }
-
#
-
# # Expect that there is a "span" tag using the short-hand
-
# must_have_tag :span
-
#
-
# # Expect that there is a "span" tag with id="x" using the short-hand
-
# must_have_tag :span, attributes: { id: "x" }
-
#
-
# # Expect that there is a "span" inside of a "div"
-
# must_have_tag tag: "span", parent: { tag: "div" }
-
#
-
# # Expect that there is a "span" somewhere inside a table
-
# must_have_tag tag: "span", ancestor: { tag: "table" }
-
#
-
# # Expect that there is a "span" with at least one "em" child
-
# must_have_tag tag: "span", child: { tag: "em" }
-
#
-
# # Expect that there is a "span" containing a (possibly nested)
-
# # "strong" tag.
-
# must_have_tag tag: "span", descendant: { tag: "strong" }
-
#
-
# # Expect that there is a "span" containing between 2 and 4 "em" tags
-
# # as immediate children
-
# must_have_tag tag: "span",
-
# children: { count: 2..4, only: { tag: "em" } }
-
#
-
# # Get funky: assert that there is a "div", with an "ul" ancestor
-
# # and an "li" parent (with "class" = "enum"), and containing a
-
# # "span" descendant that contains text matching /hello world/
-
# must_have_tag tag: "div",
-
# ancestor: { tag: "ul" },
-
# parent: { tag: "li",
-
# attributes: { class: "enum" } },
-
# descendant: { tag: "span",
-
# child: /hello world/ }
-
#
-
# <b>Please note</b>: +must_have_tag+ and +wont_have_tag+ only work
-
# with well-formed XHTML. They recognize a few tags as implicitly self-closing
-
# (like br and hr and such) but will not work correctly with tags
-
# that allow optional closing tags (p, li, td). <em>You must explicitly
-
# close all of your tags to use these assertions.</em>
-
#
-
# See also ActionController::TestCase#assert_tag
-
# See also ActionView::TestCase#assert_tag
-
# See also ActionDispatch::IntegrationTest#assert_tag
-
#
-
# :method: must_have_tag
-
# :call-seq: must_have_tag(*opts)
-
-
##
-
# Identical to +must_have_tag+, but asserts that a matching tag does _not_
-
# exist. (See +must_have_tag+ for a full discussion of the syntax.)
-
#
-
# # Expect that there is not a "div" containing a "p"
-
# wont_have_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Expect that an unordered list is empty
-
# wont_have_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Expect that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# wont_have_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
#
-
# See also ActionController::TestCase#refute_tag
-
# See also ActionView::TestCase#refute_tag
-
# See also ActionDispatch::IntegrationTest#refute_tag
-
# See also ActionController::TestCase#assert_no_tag
-
# See also ActionView::TestCase#assert_no_tag
-
# See also ActionDispatch::IntegrationTest#assert_no_tag
-
#
-
# :method: wont_have_tag
-
# :call-seq: wont_have_tag(*opts)
-
-
1
if defined?(::ActiveJob)
-
##############################################################################
-
# ActiveJob Expectations
-
##############################################################################
-
-
##
-
# Expects that the number of enqueued jobs matches the given number.
-
#
-
# def test_jobs
-
# must_enqueue_jobs 0
-
# HelloJob.perform_later('david')
-
# must_enqueue_jobs 1
-
# HelloJob.perform_later('abdelkader')
-
# must_enqueue_jobs 2
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# jobs to be enqueued.
-
#
-
# def test_jobs_again
-
# must_enqueue_jobs 1 do
-
# HelloJob.perform_later('cristian')
-
# end
-
#
-
# must_enqueue_jobs 2 do
-
# HelloJob.perform_later('aaron')
-
# HelloJob.perform_later('rafael')
-
# end
-
# end
-
#
-
# See also ActiveJob::TestCase#assert_enqueued_jobs
-
#
-
# :method: must_enqueue_jobs
-
# :call-seq: must_enqueue_jobs(number)
-
-
##
-
# Expects that no jobs have been enqueued.
-
#
-
# def test_jobs
-
# wont_enqueue_jobs
-
# HelloJob.perform_later('jeremy')
-
# must_enqueue_jobs 1
-
# end
-
#
-
# If a block is passed, that block should not cause any job to be enqueued.
-
#
-
# def test_jobs_again
-
# wont_enqueue_jobs do
-
# # No job should be enqueued from this block
-
# end
-
# end
-
#
-
# Note: This expectation is simply a shortcut for:
-
#
-
# must_enqueue_jobs 0, &block
-
#
-
# See also ActiveJob::TestCase#assert_no_enqueued_jobs
-
#
-
# :method: wont_enqueue_jobs
-
# :call-seq: wont_enqueue_jobs(number)
-
-
##
-
# Expects that the number of performed jobs matches the given number.
-
# If no block is passed, <tt>perform_enqueued_jobs</tt>d
-
# must be called around the job call.
-
#
-
# def test_jobs
-
# must_perform_jobs 0
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('xavier')
-
# end
-
# must_perform_jobs 1
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('yves')
-
# must_perform_jobs 2
-
# end
-
# end
-
#
-
# If a block is passed, that block should cause the specified number of
-
# jobs to be performed.
-
#
-
# def test_jobs_again
-
# must_perform_jobs 1 do
-
# HelloJob.perform_later('robin')
-
# end
-
#
-
# must_perform_jobs 2 do
-
# HelloJob.perform_later('carlos')
-
# HelloJob.perform_later('sean')
-
# end
-
# end
-
#
-
# See also ActiveJob::TestCase#assert_performed_jobs
-
#
-
# :method: must_perform_jobs
-
# :call-seq: must_perform_jobs(number)
-
-
##
-
# Expects that no jobs have been performed.
-
#
-
# def test_jobs
-
# wont_perform_jobs
-
#
-
# perform_enqueued_jobs do
-
# HelloJob.perform_later('matthew')
-
# must_perform_jobs 1
-
# end
-
# end
-
#
-
# If a block is passed, that block should not cause any job to be performed.
-
#
-
# def test_jobs_again
-
# wont_perform_jobs do
-
# # No job should be performed from this block
-
# end
-
# end
-
#
-
# Note: This assertion is simply a shortcut for:
-
#
-
# must_perform_jobs 0, &block
-
#
-
# See also ActiveJob::TestCase#assert_no_performed_jobs
-
#
-
# :method: wont_perform_jobs
-
# :call-seq: wont_perform_jobs(number)
-
-
##
-
# Expects that the job passed in the block has been enqueued with the given arguments.
-
#
-
# def test_must_enqueue_with
-
# must_enqueue_with(job: MyJob, args: [1,2,3], queue: 'low') do
-
# MyJob.perform_later(1,2,3)
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#assert_enqueued_with
-
#
-
# :method: must_enqueue_with
-
# :call-seq: must_enqueue_with(args)
-
-
##
-
# Expects that the job passed in the block has been performed with the given arguments.
-
#
-
# def test_must_perform_with
-
# must_perform_with(job: MyJob, args: [1,2,3], queue: 'high') do
-
# MyJob.perform_later(1,2,3)
-
# end
-
# end
-
#
-
# See also Minitest::Rails::Expectations#assert_performed_with
-
#
-
# :method: must_perform_with
-
# :call-seq: must_perform_with(args)
-
-
-
# This exists as a module to allow easy mixing into classes
-
# other than ActiveJob::TestCase where you might want to do
-
# job testing e.g. in an Active Record model which triggers
-
# jobs in a callback.
-
1
module ActiveJob
-
1
extend ActiveSupport::Concern
-
1
include ::ActiveJob::TestHelper
-
-
1
included do
-
1
alias :must_enqueue_jobs :assert_enqueued_jobs
-
1
alias :must_perform_jobs :assert_performed_jobs
-
1
alias :wont_enqueue_jobs :assert_no_enqueued_jobs
-
1
alias :wont_perform_jobs :assert_no_performed_jobs
-
1
alias :must_enqueue_with :assert_enqueued_with
-
1
alias :must_perform_with :assert_performed_with
-
end
-
end
-
end
-
end
-
-
1
unless ENV["MT_NO_EXPECTATIONS"]
-
1
class Object # :nodoc:
-
1
include Minitest::Rails::Expectations
-
end
-
# Not real expectations, just aliases
-
# The error messages don't get messed up this way
-
1
class ActionController::TestCase # :nodoc:
-
1
alias :must_respond_with :assert_response
-
1
alias :must_redirect_to :assert_redirected_to
-
1
alias :must_render_template :assert_template
-
1
alias :must_have_tag :assert_tag
-
1
alias :wont_have_tag :assert_no_tag
-
1
alias :must_select :assert_select
-
1
alias :must_select_email :assert_select_email
-
1
alias :must_select_encoded :assert_select_encoded
-
end
-
1
class ActionView::TestCase # :nodoc:
-
1
alias :must_respond_with :assert_response
-
1
alias :must_redirect_to :assert_redirected_to
-
1
alias :must_render_template :assert_template
-
1
alias :must_have_tag :assert_tag
-
1
alias :wont_have_tag :assert_no_tag
-
1
alias :must_select :assert_select
-
1
alias :must_select_email :assert_select_email
-
1
alias :must_select_encoded :assert_select_encoded
-
end
-
class ActiveJob::TestCase # :nodoc:
-
1
include Minitest::Rails::Expectations::ActiveJob
-
1
end if defined?(ActiveJob)
-
1
class ActionDispatch::IntegrationTest # :nodoc:
-
1
alias :must_respond_with :assert_response
-
1
alias :must_redirect_to :assert_redirected_to
-
1
alias :must_render_template :assert_template
-
1
alias :must_have_tag :assert_tag
-
1
alias :wont_have_tag :assert_no_tag
-
1
alias :must_select :assert_select
-
1
alias :must_select_email :assert_select_email
-
1
alias :must_select_encoded :assert_select_encoded
-
end
-
end
-
1
require "minitest/rails"
-
# Load minitest-capybara and minitest-matchers
-
1
require "minitest-capybara"
-
1
require "capybara/rails"
-
1
require "minitest/metadata"
-
-
1
module Capybara
-
1
module Rails
-
1
class Helpers # :nodoc:
-
1
include ::Rails.application.routes.url_helpers
-
1
include ::Rails.application.routes.mounted_helpers if ::Rails.application.routes.respond_to? :mounted_helpers
-
1
def initialize
-
21
self.default_url_options = ::Rails.application.routes.default_url_options
-
21
self.default_url_options[:host] ||= "test.local"
-
end
-
end
-
1
class TestCase < ::ActiveSupport::TestCase
-
1
include Capybara::DSL
-
1
include Capybara::Assertions
-
1
include Minitest::Metadata
-
-
# Register by name
-
1
register_spec_type(/(Feature|Browser)( ?Test)?\z/i, self)
-
1
register_spec_type(self) do |desc, *addl|
-
addl.include? :capybara
-
end
-
-
# Enable Capybara's spec DSL
-
1
class << self
-
1
alias :background :before
-
1
alias :scenario :it
-
1
alias :given :let
-
end
-
-
# Configure the driver using metadata
-
1
before do
-
6
if metadata[:js] == true
-
Capybara.current_driver = Capybara.javascript_driver
-
end
-
end
-
-
1
after do
-
18
Capybara.reset_sessions!
-
18
Capybara.use_default_driver
-
end
-
-
# Defer rails helpers methods to a different object
-
1
def __rails_helpers__ # :nodoc:
-
44
@__rails_helpers__ ||= ::Capybara::Rails::Helpers.new
-
end
-
1
def respond_to?(method, include_private = false) # :nodoc:
-
__rails_helpers__.respond_to?(method, include_private) || super
-
end
-
1
def method_missing(sym, *args, &block) # :nodoc:
-
22
if __rails_helpers__.respond_to?(sym, true)
-
22
__rails_helpers__.__send__(sym, *args, &block)
-
else
-
super
-
end
-
end
-
end
-
end
-
end
-
-
1
module Kernel # :nodoc:
-
1
def feature desc, &blk
-
describe "#{desc} Feature Test", &blk
-
end
-
end
-
-
1
module Capybara
-
1
module Assertions
-
##
-
# Assertion that there is button
-
#
-
# see Capybara::Assertions#refute_button
-
# see Capybara::Assertions#assert_no_button
-
# see Capybara::expectations#must_have_button
-
# see Capybara::expectations#wont_have_button
-
# :method: assert_button
-
-
##
-
# Assertion that there is no button
-
#
-
# see Capybara::Assertions#assert_button
-
# see Capybara::expectations#must_have_button
-
# see Capybara::expectations#wont_have_button
-
# :method: refute_button
-
# :alias: assert_no_button
-
-
-
##
-
# Assertion that there is checked_field
-
#
-
# see Capybara::Assertions#refute_checked_field
-
# see Capybara::Assertions#assert_no_checked_field
-
# see Capybara::expectations#must_have_checked_field
-
# see Capybara::expectations#wont_have_checked_field
-
# :method: assert_checked_field
-
-
##
-
# Assertion that there is no checked_field
-
#
-
# see Capybara::Assertions#assert_checked_field
-
# see Capybara::expectations#must_have_checked_field
-
# see Capybara::expectations#wont_have_checked_field
-
# :method: refute_checked_field
-
# :alias: assert_no_checked_field
-
-
-
##
-
# Assertion that there is content
-
#
-
# see Capybara::Assertions#refute_content
-
# see Capybara::Assertions#assert_no_content
-
# see Capybara::expectations#must_have_content
-
# see Capybara::expectations#wont_have_content
-
# :method: assert_content
-
-
##
-
# Assertion that there is no content
-
#
-
# see Capybara::Assertions#assert_content
-
# see Capybara::expectations#must_have_content
-
# see Capybara::expectations#wont_have_content
-
# :method: refute_content
-
# :alias: assert_no_content
-
-
-
##
-
# Assertion that there is css
-
#
-
# see Capybara::Assertions#refute_css
-
# see Capybara::Assertions#assert_no_css
-
# see Capybara::expectations#must_have_css
-
# see Capybara::expectations#wont_have_css
-
# :method: assert_css
-
-
##
-
# Assertion that there is no css
-
#
-
# see Capybara::Assertions#assert_css
-
# see Capybara::expectations#must_have_css
-
# see Capybara::expectations#wont_have_css
-
# :method: refute_css
-
# :alias: assert_no_css
-
-
-
##
-
# Assertion that there is field
-
#
-
# see Capybara::Assertions#refute_field
-
# see Capybara::Assertions#assert_no_field
-
# see Capybara::expectations#must_have_field
-
# see Capybara::expectations#wont_have_field
-
# :method: assert_field
-
-
##
-
# Assertion that there is no field
-
#
-
# see Capybara::Assertions#assert_field
-
# see Capybara::expectations#must_have_field
-
# see Capybara::expectations#wont_have_field
-
# :method: refute_field
-
# :alias: assert_no_field
-
-
-
##
-
# Assertion that there is link
-
#
-
# see Capybara::Assertions#refute_link
-
# see Capybara::Assertions#assert_no_link
-
# see Capybara::expectations#must_have_link
-
# see Capybara::expectations#wont_have_link
-
# :method: assert_link
-
-
##
-
# Assertion that there is no link
-
#
-
# see Capybara::Assertions#assert_link
-
# see Capybara::expectations#must_have_link
-
# see Capybara::expectations#wont_have_link
-
# :method: refute_link
-
# :alias: assert_no_link
-
-
-
##
-
# Assertion that there is select
-
#
-
# see Capybara::Assertions#refute_select
-
# see Capybara::Assertions#assert_no_select
-
# see Capybara::expectations#must_have_select
-
# see Capybara::expectations#wont_have_select
-
# :method: assert_select
-
-
##
-
# Assertion that there is no select
-
#
-
# see Capybara::Assertions#assert_select
-
# see Capybara::expectations#must_have_select
-
# see Capybara::expectations#wont_have_select
-
# :method: refute_select
-
# :alias: assert_no_select
-
-
-
##
-
# Assertion that there is selector
-
#
-
# see Capybara::Assertions#refute_selector
-
# see Capybara::Assertions#assert_no_selector
-
# see Capybara::expectations#must_have_selector
-
# see Capybara::expectations#wont_have_selector
-
# :method: assert_selector
-
-
##
-
# Assertion that there is no selector
-
#
-
# see Capybara::Assertions#assert_selector
-
# see Capybara::expectations#must_have_selector
-
# see Capybara::expectations#wont_have_selector
-
# :method: refute_selector
-
# :alias: assert_no_selector
-
-
-
##
-
# Assertion that there is table
-
#
-
# see Capybara::Assertions#refute_table
-
# see Capybara::Assertions#assert_no_table
-
# see Capybara::expectations#must_have_table
-
# see Capybara::expectations#wont_have_table
-
# :method: assert_table
-
-
##
-
# Assertion that there is no table
-
#
-
# see Capybara::Assertions#assert_table
-
# see Capybara::expectations#must_have_table
-
# see Capybara::expectations#wont_have_table
-
# :method: refute_table
-
# :alias: assert_no_table
-
-
-
##
-
# Assertion that there is text
-
#
-
# see Capybara::Assertions#refute_text
-
# see Capybara::Assertions#assert_no_text
-
# see Capybara::expectations#must_have_text
-
# see Capybara::expectations#wont_have_text
-
# :method: assert_text
-
-
##
-
# Assertion that there is no text
-
#
-
# see Capybara::Assertions#assert_text
-
# see Capybara::expectations#must_have_text
-
# see Capybara::expectations#wont_have_text
-
# :method: refute_text
-
# :alias: assert_no_text
-
-
-
##
-
# Assertion that there is unchecked_field
-
#
-
# see Capybara::Assertions#refute_unchecked_field
-
# see Capybara::Assertions#assert_no_unchecked_field
-
# see Capybara::expectations#must_have_unchecked_field
-
# see Capybara::expectations#wont_have_unchecked_field
-
# :method: assert_unchecked_field
-
-
##
-
# Assertion that there is no unchecked_field
-
#
-
# see Capybara::Assertions#assert_unchecked_field
-
# see Capybara::expectations#must_have_unchecked_field
-
# see Capybara::expectations#wont_have_unchecked_field
-
# :method: refute_unchecked_field
-
# :alias: assert_no_unchecked_field
-
-
-
##
-
# Assertion that there is xpath
-
#
-
# see Capybara::Assertions#refute_xpath
-
# see Capybara::Assertions#assert_no_xpath
-
# see Capybara::expectations#must_have_xpath
-
# see Capybara::expectations#wont_have_xpath
-
# :method: assert_xpath
-
-
##
-
# Assertion that there is no xpath
-
#
-
# see Capybara::Assertions#assert_xpath
-
# see Capybara::expectations#must_have_xpath
-
# see Capybara::expectations#wont_have_xpath
-
# :method: refute_xpath
-
# :alias: assert_no_xpath
-
end
-
-
1
module Expectations
-
##
-
# Expectation that there is button
-
#
-
# see Capybara::Expectations#wont_have_button
-
# see Capybara::Assertions#assert_button
-
# see Capybara::Assertions#refute_button
-
# see Capybara::Assertions#assert_no_button
-
# :method: must_have_button
-
-
##
-
# Expectation that there is no button
-
#
-
# see Capybara::Expectations#must_have_button
-
# see Capybara::Assertions#assert_button
-
# see Capybara::Assertions#refute_button
-
# see Capybara::Assertions#assert_no_button
-
# :method: wont_have_button
-
-
-
##
-
# Expectation that there is checked_field
-
#
-
# see Capybara::Expectations#wont_have_checked_field
-
# see Capybara::Assertions#assert_checked_field
-
# see Capybara::Assertions#refute_checked_field
-
# see Capybara::Assertions#assert_no_checked_field
-
# :method: must_have_checked_field
-
-
##
-
# Expectation that there is no checked_field
-
#
-
# see Capybara::Expectations#must_have_checked_field
-
# see Capybara::Assertions#assert_checked_field
-
# see Capybara::Assertions#refute_checked_field
-
# see Capybara::Assertions#assert_no_checked_field
-
# :method: wont_have_checked_field
-
-
-
##
-
# Expectation that there is content
-
#
-
# see Capybara::Expectations#wont_have_content
-
# see Capybara::Assertions#assert_content
-
# see Capybara::Assertions#refute_content
-
# see Capybara::Assertions#assert_no_content
-
# :method: must_have_content
-
-
##
-
# Expectation that there is no content
-
#
-
# see Capybara::Expectations#must_have_content
-
# see Capybara::Assertions#assert_content
-
# see Capybara::Assertions#refute_content
-
# see Capybara::Assertions#assert_no_content
-
# :method: wont_have_content
-
-
-
##
-
# Expectation that there is css
-
#
-
# see Capybara::Expectations#wont_have_css
-
# see Capybara::Assertions#assert_css
-
# see Capybara::Assertions#refute_css
-
# see Capybara::Assertions#assert_no_css
-
# :method: must_have_css
-
-
##
-
# Expectation that there is no css
-
#
-
# see Capybara::Expectations#must_have_css
-
# see Capybara::Assertions#assert_css
-
# see Capybara::Assertions#refute_css
-
# see Capybara::Assertions#assert_no_css
-
# :method: wont_have_css
-
-
-
##
-
# Expectation that there is field
-
#
-
# see Capybara::Expectations#wont_have_field
-
# see Capybara::Assertions#assert_field
-
# see Capybara::Assertions#refute_field
-
# see Capybara::Assertions#assert_no_field
-
# :method: must_have_field
-
-
##
-
# Expectation that there is no field
-
#
-
# see Capybara::Expectations#must_have_field
-
# see Capybara::Assertions#assert_field
-
# see Capybara::Assertions#refute_field
-
# see Capybara::Assertions#assert_no_field
-
# :method: wont_have_field
-
-
-
##
-
# Expectation that there is link
-
#
-
# see Capybara::Expectations#wont_have_link
-
# see Capybara::Assertions#assert_link
-
# see Capybara::Assertions#refute_link
-
# see Capybara::Assertions#assert_no_link
-
# :method: must_have_link
-
-
##
-
# Expectation that there is no link
-
#
-
# see Capybara::Expectations#must_have_link
-
# see Capybara::Assertions#assert_link
-
# see Capybara::Assertions#refute_link
-
# see Capybara::Assertions#assert_no_link
-
# :method: wont_have_link
-
-
-
##
-
# Expectation that there is select
-
#
-
# see Capybara::Expectations#wont_have_select
-
# see Capybara::Assertions#assert_select
-
# see Capybara::Assertions#refute_select
-
# see Capybara::Assertions#assert_no_select
-
# :method: must_have_select
-
-
##
-
# Expectation that there is no select
-
#
-
# see Capybara::Expectations#must_have_select
-
# see Capybara::Assertions#assert_select
-
# see Capybara::Assertions#refute_select
-
# see Capybara::Assertions#assert_no_select
-
# :method: wont_have_select
-
-
-
##
-
# Expectation that there is selector
-
#
-
# see Capybara::Expectations#wont_have_selector
-
# see Capybara::Assertions#assert_selector
-
# see Capybara::Assertions#refute_selector
-
# see Capybara::Assertions#assert_no_selector
-
# :method: must_have_selector
-
-
##
-
# Expectation that there is no selector
-
#
-
# see Capybara::Expectations#must_have_selector
-
# see Capybara::Assertions#assert_selector
-
# see Capybara::Assertions#refute_selector
-
# see Capybara::Assertions#assert_no_selector
-
# :method: wont_have_selector
-
-
-
##
-
# Expectation that there is table
-
#
-
# see Capybara::Expectations#wont_have_table
-
# see Capybara::Assertions#assert_table
-
# see Capybara::Assertions#refute_table
-
# see Capybara::Assertions#assert_no_table
-
# :method: must_have_table
-
-
##
-
# Expectation that there is no table
-
#
-
# see Capybara::Expectations#must_have_table
-
# see Capybara::Assertions#assert_table
-
# see Capybara::Assertions#refute_table
-
# see Capybara::Assertions#assert_no_table
-
# :method: wont_have_table
-
-
-
##
-
# Expectation that there is text
-
#
-
# see Capybara::Expectations#wont_have_text
-
# see Capybara::Assertions#assert_text
-
# see Capybara::Assertions#refute_text
-
# see Capybara::Assertions#assert_no_text
-
# :method: must_have_text
-
-
##
-
# Expectation that there is no text
-
#
-
# see Capybara::Expectations#must_have_text
-
# see Capybara::Assertions#assert_text
-
# see Capybara::Assertions#refute_text
-
# see Capybara::Assertions#assert_no_text
-
# :method: wont_have_text
-
-
-
##
-
# Expectation that there is unchecked_field
-
#
-
# see Capybara::Expectations#wont_have_unchecked_field
-
# see Capybara::Assertions#assert_unchecked_field
-
# see Capybara::Assertions#refute_unchecked_field
-
# see Capybara::Assertions#assert_no_unchecked_field
-
# :method: must_have_unchecked_field
-
-
##
-
# Expectation that there is no unchecked_field
-
#
-
# see Capybara::Expectations#must_have_unchecked_field
-
# see Capybara::Assertions#assert_unchecked_field
-
# see Capybara::Assertions#refute_unchecked_field
-
# see Capybara::Assertions#assert_no_unchecked_field
-
# :method: wont_have_unchecked_field
-
-
-
##
-
# Expectation that there is xpath
-
#
-
# see Capybara::Expectations#wont_have_xpath
-
# see Capybara::Assertions#assert_xpath
-
# see Capybara::Assertions#refute_xpath
-
# see Capybara::Assertions#assert_no_xpath
-
# :method: must_have_xpath
-
-
##
-
# Expectation that there is no xpath
-
#
-
# see Capybara::Expectations#must_have_xpath
-
# see Capybara::Assertions#assert_xpath
-
# see Capybara::Assertions#refute_xpath
-
# see Capybara::Assertions#assert_no_xpath
-
# :method: wont_have_xpath
-
end
-
end
-
1
module Minitest
-
1
module Reporters
-
1
class DelegateReporter
-
1
def initialize(reporters, options = {})
-
1
@reporters = reporters
-
1
@options = options
-
1
@all_reporters = nil
-
end
-
-
1
def io
-
all_reporters.first.io unless all_reporters.empty?
-
@options[:io]
-
end
-
-
1
def start
-
1
all_reporters.each(&:start)
-
end
-
-
1
def record(result)
-
490
all_reporters.each do |reporter|
-
490
reporter.record result
-
end
-
end
-
-
1
def report
-
1
all_reporters.each(&:report)
-
end
-
-
1
def passed?
-
1
all_reporters.all?(&:passed?)
-
end
-
-
1
private
-
# stolen from minitest self.run
-
1
def total_count(options)
-
1
filter = options[:filter] || '/./'
-
1
filter = Regexp.new $1 if filter =~ /\/(.*)\//
-
-
Minitest::Runnable.runnables.map(&:runnable_methods).flatten.find_all { |m|
-
490
filter === m || filter === "#{self}##{m}"
-
1
}.size
-
end
-
-
1
def all_reporters
-
493
@all_reporters ||= init_all_reporters
-
end
-
-
1
def init_all_reporters
-
1
return @reporters unless defined?(Minitest::Reporters.reporters) && Minitest::Reporters.reporters
-
1
(Minitest::Reporters.reporters + guard_reporter(@reporters)).each do |reporter|
-
1
reporter.io = @options[:io]
-
1
if reporter.respond_to?(:add_defaults)
-
1
reporter.add_defaults(@options.merge(:total_count => total_count(@options)))
-
end
-
end
-
end
-
-
1
def guard_reporter(reporters)
-
3
guards = Array(reporters.detect { |r| r.class.name == "Guard::Minitest::Reporter" })
-
1
return guards unless ENV['RM_INFO']
-
-
warn 'RM_INFO is set thus guard reporter has been dropped' unless guards.empty?
-
[]
-
end
-
end
-
end
-
-
1
class << self
-
1
def plugin_minitest_reporter_init(options)
-
1
reporter.reporters = [Minitest::Reporters::DelegateReporter.new(reporter.reporters, options)]
-
end
-
end
-
end
-
1
module Minitest
-
1
module Reporters
-
1
module ANSI
-
1
module Code
-
-
1
def self.color?
-
1
return false if ENV['MINITEST_REPORTERS_MONO']
-
1
color_terminal = ENV['TERM'].to_s.downcase.include?("color")
-
1
$stdout.tty? || color_terminal
-
end
-
-
1
if color?
-
1
require 'ansi/code'
-
-
1
include ::ANSI::Code
-
1
extend ::ANSI::Code
-
else
-
def black(s = nil)
-
block_given? ? yield : s
-
end
-
-
%w[ red green yellow blue magenta cyan white ].each do |color|
-
alias_method color, :black
-
end
-
-
extend self
-
end
-
end
-
end
-
end
-
end
-
1
module Minitest
-
1
module Reporters
-
1
class BaseReporter < Minitest::StatisticsReporter
-
1
attr_accessor :tests
-
-
1
def initialize(options={})
-
1
super($stdout, options)
-
1
self.tests = []
-
end
-
-
1
def add_defaults(defaults)
-
1
self.options = defaults.merge(options)
-
end
-
-
# called by our own before hooks
-
1
def before_test(test)
-
490
last_test = tests.last
-
490
if last_test.class != test.class
-
64
after_suite(last_test.class) if last_test
-
64
before_suite(test.class)
-
end
-
end
-
-
1
def record(test)
-
490
super
-
490
tests << test
-
end
-
-
# called by our own after hooks
-
1
def after_test(test)
-
end
-
-
1
def report
-
1
super
-
1
after_suite(tests.last.class)
-
end
-
-
1
protected
-
-
1
def after_suite(test)
-
end
-
-
1
def before_suite(test)
-
end
-
-
1
def result(test)
-
68
if test.error?
-
18
:error
-
50
elsif test.skipped?
-
48
:skip
-
2
elsif test.failure
-
2
:fail
-
else
-
:pass
-
end
-
end
-
-
1
def print_colored_status(test)
-
68
if test.passed?
-
print(green { pad_mark( result(test).to_s.upcase ) })
-
68
elsif test.skipped?
-
96
print(yellow { pad_mark( result(test).to_s.upcase ) })
-
else
-
40
print(red { pad_mark( result(test).to_s.upcase ) })
-
end
-
end
-
-
1
def total_time
-
137
super || Minitest::Reporters.clock_time - start_time
-
end
-
-
1
def total_count
-
2
options[:total_count]
-
end
-
-
1
def filter_backtrace(backtrace)
-
50
Minitest.filter_backtrace(backtrace)
-
end
-
-
1
def puts(*args)
-
385
io.puts(*args)
-
end
-
-
1
def print(*args)
-
225
io.print(*args)
-
end
-
-
1
def print_info(e, name=true)
-
68
print "#{e.exception.class.to_s}: " if name
-
193
e.message.each_line { |line| print_with_info_padding(line) }
-
-
# When e is a Minitest::UnexpectedError, the filtered backtrace is already part of the message printed out
-
# by the previous line. In that case, and that case only, skip the backtrace output.
-
68
unless e.is_a?(MiniTest::UnexpectedError)
-
50
trace = filter_backtrace(e.backtrace)
-
101
trace.each { |line| print_with_info_padding(line) }
-
end
-
end
-
end
-
end
-
end
-
1
require 'ruby-progressbar'
-
-
1
module Minitest
-
1
module Reporters
-
# Fuubar-like reporter with a progress bar.
-
#
-
# Based upon Jeff Kreefmeijer's Fuubar (MIT License) and paydro's
-
# monkey-patch.
-
#
-
# @see https://github.com/jeffkreeftmeijer/fuubar Fuubar
-
# @see https://gist.github.com/356945 paydro's monkey-patch
-
1
class ProgressReporter < BaseReporter
-
1
include RelativePosition
-
1
include ANSI::Code
-
-
1
PROGRESS_MARK = '='
-
-
1
def initialize(options = {})
-
1
super
-
1
@detailed_skip = options.fetch(:detailed_skip, true)
-
-
1
@progress = ProgressBar.create({
-
total: total_count,
-
starting_at: count,
-
progress_mark: green(PROGRESS_MARK),
-
remainder_mark: ' ',
-
format: ' %C/%c: [%B] %p%% %a, %e',
-
autostart: false
-
})
-
end
-
-
1
def start
-
1
super
-
1
puts('Started with run options %s' % options[:args])
-
1
puts
-
1
@progress.start
-
1
@progress.total = total_count
-
1
show
-
end
-
-
1
def record(test)
-
490
super
-
490
return if test.skipped? && !@detailed_skip
-
490
if test.failure
-
68
print "\e[0m\e[1000D\e[K"
-
68
print_colored_status(test)
-
68
print_test_with_time(test)
-
68
puts
-
68
print_info(test.failure, test.error?)
-
68
puts
-
end
-
-
490
if test.skipped? && color != "red"
-
2
self.color = "yellow"
-
elsif test.failure
-
66
self.color = "red"
-
end
-
-
490
show
-
end
-
-
1
def report
-
1
super
-
1
@progress.finish
-
-
1
puts
-
1
puts('Finished in %.5fs' % total_time)
-
1
print('%d tests, %d assertions, ' % [count, assertions])
-
1
color = failures.zero? && errors.zero? ? :green : :red
-
2
print(send(color) { '%d failures, %d errors, ' } % [failures, errors])
-
2
print(yellow { '%d skips' } % skips)
-
1
puts
-
end
-
-
1
private
-
-
1
def show
-
491
@progress.increment unless count == 0
-
end
-
-
1
def print_test_with_time(test)
-
68
puts [test.name, test.class, total_time].inspect
-
68
print(" %s#%s (%.2fs)" % [test.name, test.class, total_time])
-
end
-
-
1
def color
-
48
@color ||= "green"
-
end
-
-
1
def color=(color)
-
68
@color = color
-
68
@progress.progress_mark = send(color, PROGRESS_MARK)
-
end
-
end
-
end
-
end
-
1
require 'nenv/version'
-
-
1
require 'nenv/autoenvironment'
-
1
require 'nenv/builder'
-
-
1
def Nenv(namespace = nil)
-
Nenv::AutoEnvironment.new(namespace).tap do |env|
-
yield env if block_given?
-
end
-
end
-
-
1
module Nenv
-
1
class << self
-
1
def respond_to?(meth)
-
instance.respond_to?(meth)
-
end
-
-
1
def method_missing(meth, *args)
-
instance.send(meth, *args)
-
end
-
-
1
def reset
-
@instance = nil
-
end
-
-
1
def instance
-
@instance ||= Nenv::AutoEnvironment.new
-
end
-
end
-
end
-
1
require 'nenv/environment'
-
1
module Nenv
-
1
class AutoEnvironment < Nenv::Environment
-
1
def method_missing(meth, *args)
-
create_method(meth) unless respond_to?(meth)
-
send(meth, *args)
-
end
-
end
-
end
-
1
require 'nenv/environment'
-
-
1
module Nenv
-
1
module Builder
-
1
def self.build(&block)
-
3
Class.new(Nenv::Environment, &block)
-
end
-
end
-
end
-
1
require 'nenv/environment/dumper'
-
1
require 'nenv/environment/loader'
-
-
1
module Nenv
-
1
class Environment
-
1
class Error < ArgumentError
-
end
-
-
1
class MethodError < Error
-
1
def initialize(meth)
-
@meth = meth
-
end
-
end
-
-
1
class AlreadyExistsError < MethodError
-
1
def message
-
format('Method %s already exists', @meth.inspect)
-
end
-
end
-
-
1
def initialize(namespace = nil)
-
14
@namespace = (namespace ? namespace.upcase : nil)
-
end
-
-
1
def create_method(meth, &block)
-
self.class._create_env_accessor(singleton_class, meth, &block)
-
end
-
-
1
private
-
-
1
def _sanitize(meth)
-
8
meth.to_s[/^([^=?]*)[=?]?$/, 1].upcase
-
end
-
-
1
def _namespaced_sanitize(meth)
-
8
[@namespace, _sanitize(meth)].compact.join('_')
-
end
-
-
1
class << self
-
1
def create_method(meth, &block)
-
9
_create_env_accessor(self, meth, &block)
-
end
-
-
1
def _create_env_accessor(klass, meth, &block)
-
9
_fail_if_accessor_exists(klass, meth)
-
-
9
if meth.to_s.end_with? '='
-
3
_create_env_writer(klass, meth, &block)
-
else
-
6
_create_env_reader(klass, meth, &block)
-
end
-
end
-
-
1
private
-
-
1
def _create_env_writer(klass, meth, &block)
-
3
env_name = nil
-
3
dumper = nil
-
3
klass.send(:define_method, meth) do |raw_value|
-
3
env_name ||= _namespaced_sanitize(meth)
-
3
dumper ||= Dumper.setup(&block)
-
3
ENV[env_name] = dumper.(raw_value)
-
end
-
end
-
-
1
def _create_env_reader(klass, meth, &block)
-
6
env_name = nil
-
6
loader = nil
-
6
klass.send(:define_method, meth) do
-
33
env_name ||= _namespaced_sanitize(meth)
-
33
loader ||= Loader.setup(meth, &block)
-
33
loader.(ENV[env_name])
-
end
-
end
-
-
1
def _fail_if_accessor_exists(klass, meth)
-
9
fail(AlreadyExistsError, meth) if klass.method_defined?(meth)
-
end
-
end
-
end
-
end
-
1
module Nenv
-
1
class Environment
-
1
module Dumper
-
1
require 'nenv/environment/dumper/default'
-
-
1
def self.setup(&callback)
-
3
if callback
-
1
callback
-
else
-
2
Default
-
end
-
end
-
end
-
end
-
end
-
1
module Nenv
-
1
class Environment
-
1
module Dumper::Default
-
1
def self.call(raw_value)
-
2
raw_value.nil? ? nil : raw_value.to_s
-
end
-
end
-
end
-
end
-
1
module Nenv
-
1
class Environment
-
1
module Loader
-
1
require 'nenv/environment/loader/predicate'
-
1
require 'nenv/environment/loader/default'
-
-
1
def self.setup(meth, &callback)
-
5
if callback
-
3
callback
-
else
-
2
if meth.to_s.end_with? '?'
-
2
Predicate
-
else
-
Default
-
end
-
end
-
end
-
end
-
end
-
end
-
1
module Nenv
-
1
class Environment
-
1
module Loader::Default
-
1
def self.call(raw_value)
-
raw_value
-
end
-
end
-
end
-
end
-
1
module Nenv
-
1
class Environment
-
1
module Loader::Predicate
-
1
def self.call(raw_value)
-
15
case raw_value
-
when nil
-
nil
-
when ''
-
fail ArgumentError, "Can't convert empty string into Bool"
-
when '0', 'false', 'n', 'no', 'NO', 'FALSE'
-
false
-
else
-
1
true
-
end
-
end
-
end
-
end
-
end
-
1
module Nenv
-
1
VERSION = '0.3.0'
-
end
-
1
require "yaml"
-
1
require "rbconfig"
-
1
require "pathname"
-
1
require "nenv"
-
1
require "logger"
-
-
1
require "notiffany/notifier/detected"
-
-
1
module Notiffany
-
# The notifier handles sending messages to different notifiers. Currently the
-
# following libraries are supported:
-
#
-
# * Ruby GNTP
-
# * Growl
-
# * Libnotify
-
# * rb-notifu
-
# * emacs
-
# * Terminal Notifier
-
# * Terminal Title
-
# * Tmux
-
#
-
# Please see the documentation of each notifier for more information about
-
# the requirements
-
# and configuration possibilities.
-
#
-
# Notiffany knows four different notification types:
-
#
-
# * success
-
# * pending
-
# * failed
-
# * notify
-
#
-
# The notification type selection is based on the image option that is
-
# sent to {#notify}. Each image type has its own notification type, and
-
# notifications with custom images goes all sent as type `notify`. The
-
# `gntp` notifier is able to register these types
-
# at Growl and allows customization of each notification type.
-
#
-
# Notiffany can be configured to make use of more than one notifier at once.
-
#
-
1
def self.connect(options = {})
-
1
Notifier.new(options)
-
end
-
-
1
class Notifier
-
1
DEFAULTS = { notify: true }
-
-
1
NOTIFICATIONS_DISABLED = "Notifications disabled by GUARD_NOTIFY" +
-
" environment variable"
-
-
1
USING_NOTIFIER = "Notiffany is using %s to send notifications."
-
-
1
ONLY_NOTIFY = "Only notify() is available from a child process"
-
-
# List of available notifiers, grouped by functionality
-
1
SUPPORTED = [
-
{
-
gntp: GNTP,
-
growl: Growl,
-
terminal_notifier: TerminalNotifier,
-
libnotify: Libnotify,
-
notifysend: NotifySend,
-
notifu: Notifu
-
},
-
{ emacs: Emacs },
-
{ tmux: Tmux },
-
{ terminal_title: TerminalTitle },
-
{ file: File }
-
]
-
-
1
Env = Nenv::Builder.build do
-
3
create_method(:notify?) { |data| data != "false" }
-
4
create_method(:notify_pid) { |data| data && Integer(data) }
-
1
create_method(:notify_pid=)
-
1
create_method(:notify_active?)
-
1
create_method(:notify_active=)
-
end
-
-
1
class NotServer < RuntimeError
-
end
-
-
1
def initialize(opts)
-
1
@env_namespace = opts.fetch(:namespace, "notiffany")
-
1
@logger = opts.fetch(:logger) do
-
Logger.new($stderr).tap { |l| l.level = Logger::WARN }
-
end
-
-
-
1
@detected = Detected.new(SUPPORTED, @env_namespace, @logger)
-
1
return if _client?
-
-
1
_env.notify_pid = $$
-
-
1
fail "Already connected" if active?
-
-
1
options = DEFAULTS.merge(opts)
-
1
return unless enabled? && options[:notify]
-
-
1
notifiers = opts.fetch(:notifiers, {})
-
1
if notifiers.any?
-
notifiers.each do |name, notifier_options|
-
@detected.add(name, notifier_options)
-
end
-
else
-
1
@detected.detect
-
end
-
-
1
turn_on
-
rescue Detected::NoneAvailableError => e
-
@logger.info e.to_s
-
end
-
-
1
def disconnect
-
if _client?
-
@detected = nil
-
return
-
end
-
-
turn_off if active?
-
@detected.reset unless @detected.nil?
-
_env.notify_pid = nil
-
@detected = nil
-
end
-
-
# Turn notifications on.
-
#
-
# @param [Hash] options the turn_on options
-
# @option options [Boolean] silent disable any logging
-
#
-
1
def turn_on(options = {})
-
1
_check_server!
-
1
return unless enabled?
-
-
1
fail "Already active!" if active?
-
-
1
silent = options[:silent]
-
-
1
@detected.available.each do |obj|
-
1
@logger.debug(format(USING_NOTIFIER, obj.title)) unless silent
-
1
obj.turn_on if obj.respond_to?(:turn_on)
-
end
-
-
1
_env.notify_active = true
-
end
-
-
# Turn notifications off.
-
1
def turn_off
-
_check_server!
-
-
fail "Not active!" unless active?
-
-
@detected.available.each do |obj|
-
obj.turn_off if obj.respond_to?(:turn_off)
-
end
-
-
_env.notify_active = false
-
end
-
-
# Test if the notifications can be enabled based on ENV['GUARD_NOTIFY']
-
1
def enabled?
-
2
_env.notify?
-
end
-
-
# Test if notifiers are currently turned on
-
1
def active?
-
3
_env.notify_active?
-
end
-
-
# Show a system notification with all configured notifiers.
-
#
-
# @param [String] message the message to show
-
# @option opts [Symbol, String] image the image symbol or path to an image
-
# @option opts [String] title the notification title
-
#
-
1
def notify(message, message_opts = {})
-
1
if _client?
-
return unless enabled?
-
else
-
1
return unless active?
-
end
-
-
1
@detected.available.each do |notifier|
-
1
notifier.notify(message, message_opts.dup)
-
end
-
end
-
-
1
def available
-
@detected.available
-
end
-
-
1
private
-
-
1
def _env
-
10
@environment ||= Env.new(@env_namespace)
-
end
-
-
1
def _check_server!
-
1
_client? && fail(NotServer, ONLY_NOTIFY)
-
end
-
-
1
def _client?
-
3
(pid = _env.notify_pid) && (pid != $$)
-
end
-
end
-
end
-
1
require "rbconfig"
-
-
1
module Notiffany
-
1
class Notifier
-
1
class Base
-
1
HOSTS = {
-
darwin: "Mac OS X",
-
linux: "Linux",
-
'linux-gnu' => "Linux",
-
freebsd: "FreeBSD",
-
openbsd: "OpenBSD",
-
sunos: "SunOS",
-
solaris: "Solaris",
-
mswin: "Windows",
-
mingw: "Windows",
-
cygwin: "Windows"
-
}
-
-
1
ERROR_ADD_GEM_AND_RUN_BUNDLE = "Please add \"gem '%s'\" to your Gemfile "\
-
"and run your app with \"bundle exec\"."
-
-
1
class UnavailableError < RuntimeError
-
1
def initialize(reason)
-
9
super
-
9
@reason = reason
-
end
-
-
1
def message
-
9
@reason
-
end
-
end
-
-
1
class RequireFailed < UnavailableError
-
1
def initialize(gem_name)
-
2
super ERROR_ADD_GEM_AND_RUN_BUNDLE % gem_name
-
end
-
end
-
-
1
class UnsupportedPlatform < UnavailableError
-
1
def initialize
-
4
super "Unsupported platform #{RbConfig::CONFIG["host_os"].inspect}"
-
end
-
end
-
-
1
attr_reader :options
-
-
1
def initialize(opts = {})
-
11
options = opts.dup
-
11
options.delete(:silent)
-
11
@options =
-
{ title: "Notiffany" }.
-
merge(self.class.const_get(:DEFAULTS)).
-
merge(options).freeze
-
-
11
@images_path = Pathname.new(__FILE__).dirname + "../../../images"
-
-
11
_check_host_supported
-
7
_require_gem
-
5
_check_available(@options)
-
end
-
-
1
def title
-
1
self.class.to_s[/.+::(\w+)$/, 1]
-
end
-
-
1
def name
-
title.gsub(/([a-z])([A-Z])/, '\1_\2').downcase
-
end
-
-
1
def notify(message, opts = {})
-
1
new_opts = _notify_options(opts).freeze
-
1
_perform_notify(message, new_opts)
-
end
-
-
1
def _image_path(image)
-
1
images = [:failed, :pending, :success, :guard]
-
1
images.include?(image) ? @images_path.join("#{image}.png").to_s : image
-
end
-
-
1
private
-
-
# Override if necessary
-
1
def _gem_name
-
name
-
end
-
-
# Override if necessary
-
1
def _supported_hosts
-
5
:all
-
end
-
-
# Override
-
1
def _check_available(_options)
-
fail NotImplementedError
-
end
-
-
# Override
-
1
def _perform_notify(_message, _opts)
-
fail NotImplementedError
-
end
-
-
1
def _notification_type(image)
-
1
[:failed, :pending, :success].include?(image) ? image : :notify
-
end
-
-
1
def _notify_options(overrides = {})
-
1
opts = @options.merge(overrides)
-
1
img_type = opts.fetch(:image, :success)
-
1
opts[:type] ||= _notification_type(img_type)
-
1
opts[:image] = _image_path(img_type)
-
1
opts
-
end
-
-
1
def _check_host_supported
-
11
return if _supported_hosts == :all
-
6
expr = /#{_supported_hosts * '|'}/
-
6
fail UnsupportedPlatform unless expr.match(RbConfig::CONFIG["host_os"])
-
end
-
-
1
def _require_gem
-
7
Kernel.require _gem_name unless _gem_name.nil?
-
rescue LoadError, NameError
-
2
fail RequireFailed, _gem_name
-
end
-
end
-
end
-
end
-
1
require "nenv"
-
1
require "yaml"
-
-
1
require_relative "emacs"
-
1
require_relative "file"
-
1
require_relative "gntp"
-
1
require_relative "growl"
-
1
require_relative "libnotify"
-
1
require_relative "notifysend"
-
1
require_relative "rb_notifu"
-
1
require_relative "terminal_notifier"
-
1
require_relative "terminal_title"
-
1
require_relative "tmux"
-
-
1
module Notiffany
-
1
class Notifier
-
# @private api
-
-
# TODO: use a socket instead of passing env variables to child processes
-
# (currently probably only used by guard-cucumber anyway)
-
1
YamlEnvStorage = Nenv::Builder.build do
-
2
create_method(:notifiers=) { |data| YAML::dump(data || []) }
-
14
create_method(:notifiers) { |data| data ? YAML::load(data) : [] }
-
end
-
-
# @private api
-
1
class Detected
-
1
NO_SUPPORTED_NOTIFIERS = "Notiffany could not detect any of the"\
-
" supported notification libraries."
-
-
1
class NoneAvailableError < RuntimeError
-
end
-
-
1
class UnknownNotifier < RuntimeError
-
1
def initialize(name)
-
super
-
@name = name
-
end
-
-
1
def name
-
@name
-
end
-
-
1
def message
-
"Unknown notifier: #{@name.inspect}"
-
end
-
end
-
-
1
def initialize(supported, env_namespace, logger)
-
1
@supported = supported
-
1
@environment = YamlEnvStorage.new(env_namespace)
-
1
@logger = logger
-
end
-
-
1
def reset
-
@environment.notifiers = []
-
end
-
-
1
def detect
-
1
return unless _notifiers.empty?
-
1
@supported.each do |group|
-
5
group.detect do |name, _|
-
10
begin
-
10
add(name, {})
-
1
true
-
rescue Notifier::Base::UnavailableError => e
-
9
@logger.debug "Notiffany: #{name} not available (#{e.message})."
-
9
false
-
end
-
end
-
end
-
-
1
fail NoneAvailableError, NO_SUPPORTED_NOTIFIERS if _notifiers.empty?
-
end
-
-
1
def available
-
@available ||= _notifiers.map do |entry|
-
1
_to_module(entry[:name]).new(entry[:options])
-
2
end
-
end
-
-
1
def add(name, opts)
-
10
@available = nil
-
10
all = _notifiers
-
-
# Silently skip if it's already available, because otherwise
-
# we'd have to do :turn_off, then configure, then :turn_on
-
10
names = all.map(&:first).map(&:last)
-
10
unless names.include?(name)
-
10
fail UnknownNotifier, name unless (klass = _to_module(name))
-
-
10
klass.new(opts) # raises if unavailable
-
1
@environment.notifiers = all << { name: name, options: opts }
-
end
-
-
# Just overwrite the options (without turning the notifier off or on),
-
# so those options will be passed in next calls to notify()
-
2
all.each { |item| item[:options] = opts if item[:name] == name }
-
end
-
-
1
private
-
-
1
def _to_module(name)
-
11
@supported.each do |group|
-
88
next unless (notifier = group.detect { |n, _| n == name })
-
11
return notifier.last
-
end
-
nil
-
end
-
-
1
def _notifiers
-
13
@environment.notifiers
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
1
require "shellany/sheller"
-
-
1
module Notiffany
-
1
class Notifier
-
# Send a notification to Emacs with emacsclient
-
# (http://www.emacswiki.org/emacs/EmacsClient).
-
#
-
1
class Emacs < Base
-
1
DEFAULTS = {
-
client: "emacsclient",
-
success: "ForestGreen",
-
failed: "Firebrick",
-
default: "Black",
-
fontcolor: "White",
-
}
-
-
1
class Client
-
1
def initialize(options)
-
1
@client = options[:client]
-
end
-
-
1
def available?
-
1
emacs_eval({ 'ALTERNATE_EDITOR' =>'false' }, "'1'")
-
end
-
-
1
def notify(color, bgcolor)
-
elisp = <<-EOF.gsub(/\s+/, " ").strip
-
(set-face-attribute 'mode-line nil
-
:background "#{bgcolor}"
-
:foreground "#{color}")
-
EOF
-
emacs_eval(elisp)
-
end
-
-
1
private
-
-
1
def emacs_eval(env={}, code)
-
1
Shellany::Sheller.run(env, @client, "--eval", code)
-
end
-
end
-
-
1
private
-
-
1
def _gem_name
-
nil
-
end
-
-
1
def _check_available(options)
-
1
return if Client.new(options).available?
-
1
fail UnavailableError, "Emacs client failed"
-
end
-
-
# Shows a system notification.
-
#
-
# @param [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @param [String] title the notification title
-
# @param [String] message the notification message body
-
# @param [String] image the path to the notification image
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] success the color to use for success
-
# notifications (default is 'ForestGreen')
-
# @option opts [String] failed the color to use for failure
-
# notifications (default is 'Firebrick')
-
# @option opts [String] pending the color to use for pending
-
# notifications
-
# @option opts [String] default the default color to use (default is
-
# 'Black')
-
# @option opts [String] client the client to use for notification
-
# (default is 'emacsclient')
-
# @option opts [String, Integer] priority specify an int or named key
-
# (default is 0)
-
#
-
1
def _perform_notify(_message, opts = {})
-
color = _emacs_color(opts[:type], opts)
-
fontcolor = _emacs_color(:fontcolor, opts)
-
Client.new(opts).notify(fontcolor, color)
-
end
-
-
# Get the Emacs color for the notification type.
-
# You can configure your own color by overwrite the defaults.
-
#
-
# @param [String] type the notification type
-
# @param [Hash] options aditional notification options
-
#
-
# @option options [String] success the color to use for success
-
# notifications (default is 'ForestGreen')
-
#
-
# @option options [String] failed the color to use for failure
-
# notifications (default is 'Firebrick')
-
#
-
# @option options [String] pending the color to use for pending
-
# notifications
-
#
-
# @option options [String] default the default color to use (default is
-
# 'Black')
-
#
-
# @return [String] the name of the emacs color
-
#
-
1
def _emacs_color(type, options = {})
-
default = options.fetch(:default, DEFAULTS[:default])
-
options.fetch(type.to_sym, default)
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# Writes notifications to a file.
-
#
-
1
class File < Base
-
1
DEFAULTS = { format: "%s\n%s\n%s\n" }
-
-
1
private
-
-
# @param [Hash] opts some options
-
# @option opts [Boolean] path the path to a file where notification
-
# message will be written
-
#
-
1
def _check_available(opts = {})
-
1
fail UnavailableError, "No :path option given" unless opts[:path]
-
end
-
-
# Writes the notification to a file. By default it writes type, title,
-
# and message separated by newlines.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image
-
# @option opts [String] format printf style format for file contents
-
# @option opts [String] path the path of where to write the file
-
#
-
1
def _perform_notify(message, opts = {})
-
fail UnavailableError, "No :path option given" unless opts[:path]
-
-
format = opts[:format]
-
::File.write(opts[:path], format % [opts[:type], opts[:title], message])
-
end
-
-
1
def _gem_name
-
nil
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# System notifications using the
-
# [ruby_gntp](https://github.com/snaka/ruby_gntp) gem.
-
#
-
# This gem is available for OS X, Linux and Windows and sends system
-
# notifications to the following system notification frameworks through the
-
#
-
# [Growl Network Transport
-
# Protocol](http://www.growlforwindows.com/gfw/help/gntp.aspx):
-
#
-
# * [Growl](http://growl.info)
-
# * [Growl for Windows](http://www.growlforwindows.com)
-
# * [Growl for Linux](http://mattn.github.com/growl-for-linux)
-
# * [Snarl](https://sites.google.com/site/snarlapp)
-
1
class GNTP < Base
-
1
DEFAULTS = {
-
sticky: false
-
}
-
-
# Default options for the ruby gtnp client.
-
1
CLIENT_DEFAULTS = {
-
host: "127.0.0.1",
-
password: "",
-
port: 23053
-
}
-
-
1
def _supported_hosts
-
2
%w(darwin linux linux-gnu freebsd openbsd sunos solaris mswin mingw cygwin)
-
end
-
-
1
def _gem_name
-
3
"ruby_gntp"
-
end
-
-
1
def _check_available(_opts)
-
end
-
-
# Shows a system notification.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image
-
# @option opts [String] host the hostname or IP address to which to send
-
# a remote notification
-
# @option opts [String] password the password used for remote
-
# notifications
-
# @option opts [Integer] port the port to send a remote notification
-
# @option opts [Boolean] sticky make the notification sticky
-
#
-
1
def _perform_notify(message, opts = {})
-
opts = {
-
name: opts[:type].to_s,
-
text: message,
-
icon: opts[:image]
-
}.merge(opts)
-
-
_gntp_client(opts).notify(opts)
-
end
-
-
1
private
-
-
1
def _gntp_client(opts = {})
-
@_client ||= begin
-
gntp = ::GNTP.new(
-
"Notiffany",
-
opts.fetch(:host) { CLIENT_DEFAULTS[:host] },
-
opts.fetch(:password) { CLIENT_DEFAULTS[:password] },
-
opts.fetch(:port) { CLIENT_DEFAULTS[:port] }
-
)
-
-
gntp.register(
-
app_icon: _image_path(:guard),
-
notifications: [
-
{ name: "notify", enabled: true },
-
{ name: "failed", enabled: true },
-
{ name: "pending", enabled: true },
-
{ name: "success", enabled: true }
-
]
-
)
-
gntp
-
end
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# System notifications using the
-
# [growl](https://github.com/visionmedia/growl) gem.
-
#
-
# This gem is available for OS X and sends system notifications to
-
# [Growl](http://growl.info) through the
-
# [GrowlNotify](http://growl.info/downloads) executable.
-
#
-
# The `growlnotify` executable must be installed manually or by using
-
# [Homebrew](http://mxcl.github.com/homebrew/).
-
#
-
# Sending notifications with this notifier will not show the different
-
# notifications in the Growl preferences. Use the :gntp notifier if you
-
# want to customize each notification type in Growl.
-
#
-
# @example Install `growlnotify` with Homebrew
-
# brew install growlnotify
-
#
-
# @example Add the `growl` gem to your `Gemfile`
-
# group :development
-
# gem 'growl'
-
# end
-
#
-
# @example Add the `:growl` notifier to your `Guardfile`
-
# notification :growl
-
#
-
# @example Add the `:growl_notify` notifier with configuration options to
-
# your `Guardfile` notification :growl, sticky: true, host: '192.168.1.5',
-
# password: 'secret'
-
#
-
1
class Growl < Base
-
1
INSTALL_GROWLNOTIFY = "Please install the 'growlnotify' executable'\
-
' (available by installing the 'growl' gem)."
-
-
# Default options for the growl notifications.
-
1
DEFAULTS = {
-
sticky: false,
-
priority: 0
-
}
-
-
1
def _supported_hosts
-
2
%w(darwin)
-
end
-
-
1
def _check_available(_opts = {})
-
fail UnavailableError, INSTALL_GROWLNOTIFY unless ::Growl.installed?
-
end
-
-
# Shows a system notification.
-
#
-
# The documented options are for GrowlNotify 1.3, but the older options
-
# are also supported. Please see `growlnotify --help`.
-
#
-
# Priority can be one of the following named keys: `Very Low`,
-
# `Moderate`, `Normal`, `High`, `Emergency`. It can also be an integer
-
# between -2 and 2.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image
-
# @option opts [Boolean] sticky make the notification sticky
-
# @option opts [String, Integer] priority specify an int or named key
-
# (default is 0)
-
# @option opts [String] host the hostname or IP address to which to
-
# send a remote notification
-
# @option opts [String] password the password used for remote
-
# notifications
-
#
-
1
def _perform_notify(message, opts = {})
-
opts = { name: "Notiffany" }.merge(opts)
-
opts.select! { |k, _| ::Growl::Base.switches.include?(k) }
-
::Growl.notify(message, opts)
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# System notifications using the
-
# [libnotify](https://github.com/splattael/libnotify) gem.
-
#
-
# This gem is available for Linux, FreeBSD, OpenBSD and Solaris and sends
-
# system notifications to
-
# Gnome [libnotify](http://developer.gnome.org/libnotify):
-
#
-
1
class Libnotify < Base
-
1
DEFAULTS = {
-
transient: false,
-
append: true,
-
timeout: 3
-
}
-
-
1
private
-
-
1
def _supported_hosts
-
2
%w(linux linux-gnu freebsd openbsd sunos solaris)
-
end
-
-
1
def _check_available(_opts = {})
-
end
-
-
# Shows a system notification.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image
-
# @option opts [Boolean] transient keep the notifications around after
-
# display
-
# @option opts [Boolean] append append onto existing notification
-
# @option opts [Number, Boolean] timeout the number of seconds to display
-
# (1.5 (s), 1000 (ms), false)
-
#
-
1
def _perform_notify(message, opts = {})
-
opts = opts.merge(
-
summary: opts[:title],
-
icon_path: opts[:image],
-
body: message,
-
urgency: opts[:urgency] || (opts[:type] == "failed" ? :normal : :low)
-
)
-
-
::Libnotify.show(opts)
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
require "shellany/sheller"
-
-
1
module Notiffany
-
1
class Notifier
-
# System notifications using notify-send, a binary that ships with
-
# the libnotify-bin package on many Debian-based distributions.
-
#
-
# @example Add the `:notifysend` notifier to your `Guardfile`
-
# notification :notifysend
-
#
-
1
class NotifySend < Base
-
# Default options for the notify-send notifications.
-
1
DEFAULTS = {
-
t: 3000, # Default timeout is 3000ms
-
h: "int:transient:1" # Automatically close the notification
-
}
-
-
# Full list of options supported by notify-send.
-
1
SUPPORTED = [:u, :t, :i, :c, :h]
-
-
1
private
-
-
# notify-send has no gem, just a binary to shell out
-
1
def _gem_name
-
nil
-
end
-
-
1
def _supported_hosts
-
2
%w(linux linux-gnu freebsd openbsd sunos solaris)
-
end
-
-
1
def _check_available(_opts = {})
-
return true unless Shellany::Sheller.stdout("which notify-send").empty?
-
-
fail UnavailableError, "libnotify-bin package is not installed"
-
end
-
-
# Shows a system notification.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image
-
# @option opts [String] c the notification category
-
# @option opts [Number] t the number of milliseconds to display (1000,
-
# 3000)
-
#
-
1
def _perform_notify(message, opts = {})
-
command = [opts[:title], message]
-
opts = opts.merge(
-
i: opts[:i] || opts[:image],
-
u: opts[:u] || _notifysend_urgency(opts[:type])
-
)
-
-
Shellany::Sheller.
-
run("notify-send", *_to_arguments(command, SUPPORTED, opts))
-
end
-
-
# Converts Guards notification type to the best matching
-
# notify-send urgency.
-
#
-
# @param [String] type the Guard notification type
-
# @return [String] the notify-send urgency
-
#
-
1
def _notifysend_urgency(type)
-
{ failed: "normal", pending: "low" }.fetch(type, "low")
-
end
-
-
# Builds a shell command out of a command string and option hash.
-
#
-
# @param [String] command the command execute
-
# @param [Array] supported list of supported option flags
-
# @param [Hash] opts additional command options
-
#
-
# @return [Array<String>] the command and its options converted to a
-
# shell command.
-
#
-
1
def _to_arguments(command, supported, opts = {})
-
opts.inject(command) do |cmd, (flag, value)|
-
supported.include?(flag) ? (cmd << "-#{ flag }" << value.to_s) : cmd
-
end
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# System notifications using the
-
# [rb-notifu](https://github.com/stereobooster/rb-notifu) gem.
-
#
-
# This gem is available for Windows and sends system notifications to
-
# [Notifu](http://www.paralint.com/projects/notifu/index.html):
-
#
-
# @example Add the `rb-notifu` gem to your `Gemfile`
-
# group :development
-
# gem 'rb-notifu'
-
# end
-
#
-
1
class Notifu < Base
-
# Default options for the rb-notifu notifications.
-
1
DEFAULTS = {
-
time: 3,
-
icon: false,
-
baloon: false,
-
nosound: false,
-
noquiet: false,
-
xp: false
-
}
-
-
1
private
-
-
1
def _supported_hosts
-
2
%w(mswin mingw)
-
end
-
-
1
def _gem_name
-
3
"rb-notifu"
-
end
-
-
1
def _check_available(_opts = {})
-
end
-
-
# Shows a system notification.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image
-
# @option opts [Number] time the number of seconds to display (0 for
-
# infinit)
-
# @option opts [Boolean] icon specify an icon to use ("parent" uses the
-
# icon of the parent process)
-
# @option opts [Boolean] baloon enable ballon tips in the registry (for
-
# this user only)
-
# @option opts [Boolean] nosound do not play a sound when the tooltip is
-
# displayed
-
# @option opts [Boolean] noquiet show the tooltip even if the user is in
-
# the quiet period that follows his very first login (Windows 7 and up)
-
# @option opts [Boolean] xp use IUserNotification interface event when
-
# IUserNotification2 is available
-
#
-
1
def _perform_notify(message, opts = {})
-
options = opts.dup
-
options[:type] = _notifu_type(opts[:type])
-
options[:message] = message
-
-
# The empty block is needed until
-
# https://github.com/stereobooster/rb-notifu/pull/1 is merged
-
::Notifu.show(options) {}
-
end
-
-
# Converts generic notification type to the best matching
-
# Notifu type.
-
#
-
# @param [String] type the generic notification type
-
# @return [Symbol] the Notify notification type
-
#
-
1
def _notifu_type(type)
-
case type.to_sym
-
when :failed
-
:error
-
when :pending
-
:warn
-
else
-
:info
-
end
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# System notifications using the
-
#
-
# [terminal-notifier](https://github.com/Springest/terminal-notifier-guard)
-
#
-
# gem.
-
#
-
# This gem is available for OS X 10.8 Mountain Lion and sends notifications
-
# to the OS X notification center.
-
1
class TerminalNotifier < Base
-
1
DEFAULTS = { app_name: "Notiffany" }
-
-
1
ERROR_ONLY_OSX10 = "The :terminal_notifier only runs"\
-
" on Mac OS X 10.8 and later."
-
-
1
def _supported_hosts
-
2
%w(darwin)
-
end
-
-
1
def _gem_name
-
"terminal-notifier-guard"
-
end
-
-
1
def _check_available(_opts = {})
-
return if ::TerminalNotifier::Guard.available?
-
fail UnavailableError, ERROR_ONLY_OSX10
-
end
-
-
# Shows a system notification.
-
#
-
# @param [String] message the notification message body
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
# @option opts [String] image the path to the notification image (ignored)
-
# @option opts [String] app_name name of your app
-
# @option opts [String] execute a command
-
# @option opts [String] activate an app bundle
-
# @option opts [String] open some url or file
-
#
-
1
def _perform_notify(message, opts = {})
-
title = [opts[:app_name], opts[:type].downcase.capitalize].join(" ")
-
opts = {
-
title: title
-
}.merge(opts)
-
opts[:message] = message
-
opts[:title] ||= title
-
opts.delete(:image)
-
opts.delete(:app_name)
-
-
::TerminalNotifier::Guard.execute(false, opts)
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
-
1
module Notiffany
-
1
class Notifier
-
# Shows system notifications in the terminal title bar.
-
#
-
1
class TerminalTitle < Base
-
1
DEFAULTS = {}
-
-
# Clears the terminal title
-
1
def turn_off
-
STDOUT.puts "\e]2;\a"
-
end
-
-
1
private
-
-
1
def _gem_name
-
nil
-
end
-
-
1
def _check_available(_options)
-
end
-
-
# Shows a system notification.
-
#
-
# @param [Hash] opts additional notification library options
-
# @option opts [String] message the notification message body
-
# @option opts [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option opts [String] title the notification title
-
#
-
1
def _perform_notify(message, opts = {})
-
1
first_line = message.sub(/^\n/, "").sub(/\n.*/m, "")
-
-
1
STDOUT.puts "\e]2;[#{ opts[:title] }] #{ first_line }\a"
-
end
-
end
-
end
-
end
-
1
require "notiffany/notifier/base"
-
1
require "shellany/sheller"
-
-
# TODO: this probably deserves a gem of it's own
-
1
module Notiffany
-
1
class Notifier
-
# Changes the color of the Tmux status bar and optionally
-
# shows messages in the status bar.
-
1
class Tmux < Base
-
1
@session = nil
-
-
1
DEFAULTS = {
-
tmux_environment: "TMUX",
-
success: "green",
-
failed: "red",
-
pending: "yellow",
-
default: "green",
-
timeout: 5,
-
display_message: false,
-
default_message_format: "%s - %s",
-
default_message_color: "white",
-
display_on_all_clients: false,
-
display_title: false,
-
default_title_format: "%s - %s",
-
line_separator: " - ",
-
change_color: true,
-
color_location: "status-left-bg"
-
}
-
-
1
class Client
-
1
CLIENT = "tmux"
-
-
1
class << self
-
1
def version
-
Float(_capture("-V")[/\d+\.\d+/])
-
end
-
-
1
def _capture(*args)
-
Shellany::Sheller.stdout(([CLIENT] + args).join(" "))
-
end
-
-
1
def _run(*args)
-
Shellany::Sheller.run(([CLIENT] + args).join(" "))
-
end
-
end
-
-
1
def initialize(client)
-
@client = client
-
end
-
-
1
def clients
-
return [@client] unless @client == :all
-
ttys = _capture("list-clients", "-F", "'\#{client_tty}'")
-
ttys = ttys.split(/\n/)
-
-
# if user is running 'tmux -C' remove this client from list
-
ttys.delete("(null)")
-
ttys
-
end
-
-
1
def set(key, value)
-
clients.each do |client|
-
args = client ? ["-t", client.strip] : nil
-
_run("set", "-q", *args, key, value)
-
end
-
end
-
-
1
def display_message(message)
-
clients.each do |client|
-
args = ["-c", client.strip] if client
-
# TODO: should properly escape message here
-
_run("display", *args, "'#{message}'")
-
end
-
end
-
-
1
def unset(key, value)
-
clients.each do |client|
-
args = client ? ["-t", client.strip] : []
-
if value
-
_run("set", "-q", *args, key, value)
-
else
-
_run("set", "-q", "-u", *args, key)
-
end
-
end
-
end
-
-
1
def parse_options
-
output = _capture("show", "-t", @client)
-
Hash[output.lines.map { |line| _parse_option(line) }]
-
end
-
-
1
def message_fg=(color)
-
set("message-fg", color)
-
end
-
-
1
def message_bg=(color)
-
set("message-bg", color)
-
end
-
-
1
def display_time=(time)
-
set("display-time", time)
-
end
-
-
1
def title=(string)
-
# TODO: properly escape?
-
set("set-titles-string", "'#{string}'")
-
end
-
-
1
private
-
-
1
def _run(*args)
-
self.class._run(*args)
-
end
-
-
1
def _capture(*args)
-
self.class._capture(*args)
-
end
-
-
1
def _parse_option(line)
-
line.partition(" ").map(&:strip).reject(&:empty?)
-
end
-
end
-
-
1
class Session
-
1
def initialize
-
@options_store = {}
-
-
# NOTE: we are reading the settings of all clients
-
# - regardless of the :display_on_all_clients option
-
-
# Ideally, this should be done incrementally (e.g. if we start with
-
# "current" client and then override the :display_on_all_clients to
-
# true, only then the option store should be updated to contain
-
# settings of all clients
-
Client.new(:all).clients.each do |client|
-
@options_store[client] = {
-
"status-left-bg" => nil,
-
"status-right-bg" => nil,
-
"status-left-fg" => nil,
-
"status-right-fg" => nil,
-
"message-bg" => nil,
-
"message-fg" => nil,
-
"display-time" => nil
-
}.merge(Client.new(client).parse_options)
-
end
-
end
-
-
1
def close
-
@options_store.each do |client, options|
-
options.each do |key, value|
-
Client.new(client).unset(key, value)
-
end
-
end
-
@options_store = nil
-
end
-
end
-
-
1
class Error < RuntimeError
-
end
-
-
1
ERROR_NOT_INSIDE_TMUX = ":tmux notifier is only available inside a "\
-
"TMux session."
-
-
1
ERROR_ANCIENT_TMUX = "Your tmux version is way too old (%s)!"
-
-
# Notification starting, save the current Tmux settings
-
# and quiet the Tmux output.
-
#
-
1
def turn_on
-
self.class._start_session
-
end
-
-
# Notification stopping. Restore the previous Tmux state
-
# if available (existing options are restored, new options
-
# are unset) and unquiet the Tmux output.
-
#
-
1
def turn_off
-
self.class._end_session
-
end
-
-
1
private
-
-
1
def _gem_name
-
nil
-
end
-
-
1
def _check_available(opts = {})
-
1
@session ||= nil # to avoid unitialized error
-
1
fail "PREVIOUS TMUX SESSION NOT CLEARED!" if @session
-
-
1
var_name = opts[:tmux_environment]
-
1
fail Error, ERROR_NOT_INSIDE_TMUX unless ENV.key?(var_name)
-
-
version = Client.version
-
fail Error, format(ERROR_ANCIENT_TMUX, version) if version < 1.7
-
-
true
-
rescue Error => e
-
1
fail UnavailableError, e.message
-
end
-
-
# Shows a system notification.
-
#
-
# By default, the Tmux notifier only makes
-
# use of a color based notification, changing the background color of the
-
# `color_location` to the color defined in either the `success`,
-
# `failed`, `pending` or `default`, depending on the notification type.
-
#
-
# You may enable an extra explicit message by setting `display_message`
-
# to true, and may further disable the colorization by setting
-
# `change_color` to false.
-
#
-
# @param [String] message the notification message
-
# @param [Hash] options additional notification library options
-
# @option options [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @option options [String] message the notification message body
-
# @option options [String] image the path to the notification image
-
# @option options [Boolean] change_color whether to show a color
-
# notification
-
# @option options [String,Array] color_location the location where to draw
-
# the color notification
-
# @option options [Boolean] display_message whether to display a message
-
# or not
-
# @option options [Boolean] display_on_all_clients whether to display a
-
# message on all tmux clients or not
-
#
-
1
def _perform_notify(message, options = {})
-
change_color = options[:change_color]
-
locations = Array(options[:color_location])
-
display_the_title = options[:display_title]
-
display_message = options[:display_message]
-
type = options[:type].to_s
-
title = options[:title]
-
-
if change_color
-
color = _tmux_color(type, options)
-
locations.each do |location|
-
Client.new(client(options)).set(location, color)
-
end
-
end
-
-
_display_title(type, title, message, options) if display_the_title
-
-
return unless display_message
-
_display_message(type, title, message, options)
-
end
-
-
# Displays a message in the title bar of the terminal.
-
#
-
# @param [String] title the notification title
-
# @param [String] message the notification message body
-
# @param [Hash] options additional notification library options
-
# @option options [String] success_message_format a string to use as
-
# formatter for the success message.
-
# @option options [String] failed_message_format a string to use as
-
# formatter for the failed message.
-
# @option options [String] pending_message_format a string to use as
-
# formatter for the pending message.
-
# @option options [String] default_message_format a string to use as
-
# formatter when no format per type is defined.
-
#
-
1
def _display_title(type, title, message, options = {})
-
format = "#{type}_title_format".to_sym
-
default_title_format = options[:default_title_format]
-
title_format = options.fetch(format, default_title_format)
-
teaser_message = message.split("\n").first
-
display_title = title_format % [title, teaser_message]
-
-
Client.new(client(options)).title = display_title
-
end
-
-
# Displays a message in the status bar of tmux.
-
#
-
# @param [String] type the notification type. Either 'success',
-
# 'pending', 'failed' or 'notify'
-
# @param [String] title the notification title
-
# @param [String] message the notification message body
-
# @param [Hash] options additional notification library options
-
# @option options [Integer] timeout the amount of seconds to show the
-
# message in the status bar
-
# @option options [String] success_message_format a string to use as
-
# formatter for the success message.
-
# @option options [String] failed_message_format a string to use as
-
# formatter for the failed message.
-
# @option options [String] pending_message_format a string to use as
-
# formatter for the pending message.
-
# @option options [String] default_message_format a string to use as
-
# formatter when no format per type is defined.
-
# @option options [String] success_message_color the success notification
-
# foreground color name.
-
# @option options [String] failed_message_color the failed notification
-
# foreground color name.
-
# @option options [String] pending_message_color the pending notification
-
# foreground color name.
-
# @option options [String] default_message_color a notification
-
# foreground color to use when no color per type is defined.
-
# @option options [String] line_separator a string to use instead of a
-
# line-break.
-
#
-
1
def _display_message(type, title, message, opts = {})
-
default_format = opts[:default_message_format]
-
default_color = opts[:default_message_color]
-
display_time = opts[:timeout]
-
separator = opts[:line_separator]
-
-
format = "#{type}_message_format".to_sym
-
message_format = opts.fetch(format, default_format)
-
-
color = "#{type}_message_color".to_sym
-
message_color = opts.fetch(color, default_color)
-
-
color = _tmux_color(type, opts)
-
formatted_message = message.split("\n").join(separator)
-
msg = message_format % [title, formatted_message]
-
-
cl = Client.new(client(opts))
-
cl.display_time = display_time * 1000
-
cl.message_fg = message_color
-
cl.message_bg = color
-
cl.display_message(msg)
-
end
-
-
# Get the Tmux color for the notification type.
-
# You can configure your own color by overwriting the defaults.
-
#
-
# @param [String] type the notification type
-
# @return [String] the name of the emacs color
-
#
-
1
def _tmux_color(type, opts = {})
-
type = type.to_sym
-
opts[type] || opts[:default]
-
end
-
-
1
def self._start_session
-
fail "Already turned on!" if @session
-
@session = Session.new
-
end
-
-
1
def self._end_session
-
fail "Already turned off!" unless @session || nil
-
@session.close
-
@session = nil
-
end
-
-
1
def self._session
-
@session
-
end
-
-
1
def client(options)
-
options[:display_on_all_clients] ? :all : nil
-
end
-
end
-
end
-
end
-
1
module Rack
-
# Rack::Builder implements a small DSL to iteratively construct Rack
-
# applications.
-
#
-
# Example:
-
#
-
# require 'rack/lobster'
-
# app = Rack::Builder.new do
-
# use Rack::CommonLogger
-
# use Rack::ShowExceptions
-
# map "/lobster" do
-
# use Rack::Lint
-
# run Rack::Lobster.new
-
# end
-
# end
-
#
-
# run app
-
#
-
# Or
-
#
-
# app = Rack::Builder.app do
-
# use Rack::CommonLogger
-
# run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
-
# end
-
#
-
# run app
-
#
-
# +use+ adds middleware to the stack, +run+ dispatches to an application.
-
# You can use +map+ to construct a Rack::URLMap in a convenient way.
-
-
1
class Builder
-
1
def self.parse_file(config, opts = Server::Options.new)
-
options = {}
-
if config =~ /\.ru$/
-
cfgfile = ::File.read(config)
-
if cfgfile[/^#\\(.*)/] && opts
-
options = opts.parse! $1.split(/\s+/)
-
end
-
cfgfile.sub!(/^__END__\n.*\Z/m, '')
-
app = new_from_string cfgfile, config
-
else
-
require config
-
app = Object.const_get(::File.basename(config, '.rb').capitalize)
-
end
-
return app, options
-
end
-
-
1
def self.new_from_string(builder_script, file="(rackup)")
-
eval "Rack::Builder.new {\n" + builder_script + "\n}.to_app",
-
TOPLEVEL_BINDING, file, 0
-
end
-
-
1
def initialize(default_app = nil,&block)
-
2
@use, @map, @run, @warmup = [], nil, default_app, nil
-
2
instance_eval(&block) if block_given?
-
end
-
-
1
def self.app(default_app = nil, &block)
-
self.new(default_app, &block).to_app
-
end
-
-
# Specifies middleware to use in a stack.
-
#
-
# class Middleware
-
# def initialize(app)
-
# @app = app
-
# end
-
#
-
# def call(env)
-
# env["rack.some_header"] = "setting an example"
-
# @app.call(env)
-
# end
-
# end
-
#
-
# use Middleware
-
# run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] }
-
#
-
# All requests through to this application will first be processed by the middleware class.
-
# The +call+ method in this example sets an additional environment key which then can be
-
# referenced in the application if required.
-
1
def use(middleware, *args, &block)
-
if @map
-
mapping, @map = @map, nil
-
@use << proc { |app| generate_map app, mapping }
-
end
-
@use << proc { |app| middleware.new(app, *args, &block) }
-
end
-
-
# Takes an argument that is an object that responds to #call and returns a Rack response.
-
# The simplest form of this is a lambda object:
-
#
-
# run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] }
-
#
-
# However this could also be a class:
-
#
-
# class Heartbeat
-
# def self.call(env)
-
# [200, { "Content-Type" => "text/plain" }, ["OK"]]
-
# end
-
# end
-
#
-
# run Heartbeat
-
1
def run(app)
-
1
@run = app
-
end
-
-
# Takes a lambda or block that is used to warm-up the application.
-
#
-
# warmup do |app|
-
# client = Rack::MockRequest.new(app)
-
# client.get('/')
-
# end
-
#
-
# use SomeMiddleware
-
# run MyApp
-
1
def warmup(prc=nil, &block)
-
@warmup = prc || block
-
end
-
-
# Creates a route within the application.
-
#
-
# Rack::Builder.app do
-
# map '/' do
-
# run Heartbeat
-
# end
-
# end
-
#
-
# The +use+ method can also be used here to specify middleware to run under a specific path:
-
#
-
# Rack::Builder.app do
-
# map '/' do
-
# use Middleware
-
# run Heartbeat
-
# end
-
# end
-
#
-
# This example includes a piece of middleware which will run before requests hit +Heartbeat+.
-
#
-
1
def map(path, &block)
-
1
@map ||= {}
-
1
@map[path] = block
-
end
-
-
1
def to_app
-
2
app = @map ? generate_map(@run, @map) : @run
-
2
fail "missing run or map statement" unless app
-
2
app = @use.reverse.inject(app) { |a,e| e[a] }
-
2
@warmup.call(app) if @warmup
-
2
app
-
end
-
-
1
def call(env)
-
to_app.call(env)
-
end
-
-
1
private
-
-
1
def generate_map(default_app, mapping)
-
1
mapped = default_app ? {'/' => default_app} : {}
-
2
mapping.each { |r,b| mapped[r] = self.class.new(default_app, &b).to_app }
-
1
URLMap.new(mapped)
-
end
-
end
-
end
-
1
require 'rack/utils'
-
-
1
module Rack
-
-
# Middleware that enables conditional GET using If-None-Match and
-
# If-Modified-Since. The application should set either or both of the
-
# Last-Modified or Etag response headers according to RFC 2616. When
-
# either of the conditions is met, the response body is set to be zero
-
# length and the response status is set to 304 Not Modified.
-
#
-
# Applications that defer response body generation until the body's each
-
# message is received will avoid response body generation completely when
-
# a conditional GET matches.
-
#
-
# Adapted from Michael Klishin's Merb implementation:
-
# https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb
-
1
class ConditionalGet
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
case env[REQUEST_METHOD]
-
when "GET", "HEAD"
-
23
status, headers, body = @app.call(env)
-
23
headers = Utils::HeaderHash.new(headers)
-
23
if status == 200 && fresh?(env, headers)
-
status = 304
-
headers.delete(CONTENT_TYPE)
-
headers.delete(CONTENT_LENGTH)
-
original_body = body
-
body = Rack::BodyProxy.new([]) do
-
original_body.close if original_body.respond_to?(:close)
-
end
-
end
-
23
[status, headers, body]
-
else
-
@app.call(env)
-
end
-
end
-
-
1
private
-
-
1
def fresh?(env, headers)
-
22
modified_since = env['HTTP_IF_MODIFIED_SINCE']
-
22
none_match = env['HTTP_IF_NONE_MATCH']
-
-
22
return false unless modified_since || none_match
-
-
success = true
-
success &&= modified_since?(to_rfc2822(modified_since), headers) if modified_since
-
success &&= etag_matches?(none_match, headers) if none_match
-
success
-
end
-
-
1
def etag_matches?(none_match, headers)
-
etag = headers['ETag'] and etag == none_match
-
end
-
-
1
def modified_since?(modified_since, headers)
-
last_modified = to_rfc2822(headers['Last-Modified']) and
-
modified_since and
-
modified_since >= last_modified
-
end
-
-
1
def to_rfc2822(since)
-
# shortest possible valid date is the obsolete: 1 Nov 97 09:55 A
-
# anything shorter is invalid, this avoids exceptions for common cases
-
# most common being the empty string
-
if since && since.length >= 16
-
# NOTE: there is no trivial way to write this in a non execption way
-
# _rfc2822 returns a hash but is not that usable
-
Time.rfc2822(since) rescue nil
-
else
-
nil
-
end
-
end
-
end
-
end
-
1
require 'digest/md5'
-
-
1
module Rack
-
# Automatically sets the ETag header on all String bodies.
-
#
-
# The ETag header is skipped if ETag or Last-Modified headers are sent or if
-
# a sendfile body (body.responds_to :to_path) is given (since such cases
-
# should be handled by apache/nginx).
-
#
-
# On initialization, you can pass two parameters: a Cache-Control directive
-
# used when Etag is absent and a directive when it is present. The first
-
# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate"
-
1
class ETag
-
1
ETAG_STRING = 'ETag'.freeze
-
1
DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate".freeze
-
-
1
def initialize(app, no_cache_control = nil, cache_control = DEFAULT_CACHE_CONTROL)
-
1
@app = app
-
1
@cache_control = cache_control
-
1
@no_cache_control = no_cache_control
-
end
-
-
1
def call(env)
-
23
status, headers, body = @app.call(env)
-
-
23
if etag_status?(status) && etag_body?(body) && !skip_caching?(headers)
-
22
original_body = body
-
22
digest, new_body = digest_body(body)
-
22
body = Rack::BodyProxy.new(new_body) do
-
22
original_body.close if original_body.respond_to?(:close)
-
end
-
22
headers[ETAG_STRING] = %(W/"#{digest}") if digest
-
end
-
-
23
unless headers[CACHE_CONTROL]
-
23
if digest
-
22
headers[CACHE_CONTROL] = @cache_control if @cache_control
-
else
-
1
headers[CACHE_CONTROL] = @no_cache_control if @no_cache_control
-
end
-
end
-
-
23
[status, headers, body]
-
end
-
-
1
private
-
-
1
def etag_status?(status)
-
23
status == 200 || status == 201
-
end
-
-
1
def etag_body?(body)
-
22
!body.respond_to?(:to_path)
-
end
-
-
1
def skip_caching?(headers)
-
22
(headers[CACHE_CONTROL] && headers[CACHE_CONTROL].include?('no-cache')) ||
-
22
headers.key?(ETAG_STRING) || headers.key?('Last-Modified')
-
end
-
-
1
def digest_body(body)
-
22
parts = []
-
22
digest = nil
-
-
22
body.each do |part|
-
22
parts << part
-
22
(digest ||= Digest::MD5.new) << part unless part.empty?
-
end
-
-
22
[digest && digest.hexdigest, parts]
-
end
-
end
-
end
-
1
require 'time'
-
1
require 'rack/utils'
-
1
require 'rack/mime'
-
-
1
module Rack
-
# Rack::File serves files below the +root+ directory given, according to the
-
# path info of the Rack request.
-
# e.g. when Rack::File.new("/etc") is used, you can access 'passwd' file
-
# as http://localhost:9292/passwd
-
#
-
# Handlers can detect if bodies are a Rack::File, and use mechanisms
-
# like sendfile on the +path+.
-
-
1
class File
-
1
ALLOWED_VERBS = %w[GET HEAD OPTIONS]
-
1
ALLOW_HEADER = ALLOWED_VERBS.join(', ')
-
-
1
attr_accessor :root
-
1
attr_accessor :path
-
1
attr_accessor :cache_control
-
-
1
alias :to_path :path
-
-
1
def initialize(root, headers={}, default_mime = 'text/plain')
-
4
@root = root
-
4
@headers = headers
-
4
@default_mime = default_mime
-
end
-
-
1
def call(env)
-
dup._call(env)
-
end
-
-
1
F = ::File
-
-
1
def _call(env)
-
unless ALLOWED_VERBS.include? env[REQUEST_METHOD]
-
return fail(405, "Method Not Allowed", {'Allow' => ALLOW_HEADER})
-
end
-
-
path_info = Utils.unescape(env[PATH_INFO])
-
clean_path_info = Utils.clean_path_info(path_info)
-
-
@path = F.join(@root, clean_path_info)
-
-
available = begin
-
F.file?(@path) && F.readable?(@path)
-
rescue SystemCallError
-
false
-
end
-
-
if available
-
serving(env)
-
else
-
fail(404, "File not found: #{path_info}")
-
end
-
end
-
-
1
def serving(env)
-
if env["REQUEST_METHOD"] == "OPTIONS"
-
return [200, {'Allow' => ALLOW_HEADER, CONTENT_LENGTH => '0'}, []]
-
end
-
last_modified = F.mtime(@path).httpdate
-
return [304, {}, []] if env['HTTP_IF_MODIFIED_SINCE'] == last_modified
-
-
headers = { "Last-Modified" => last_modified }
-
headers[CONTENT_TYPE] = mime_type if mime_type
-
-
# Set custom headers
-
@headers.each { |field, content| headers[field] = content } if @headers
-
-
response = [ 200, headers, env[REQUEST_METHOD] == "HEAD" ? [] : self ]
-
-
size = filesize
-
-
ranges = Rack::Utils.byte_ranges(env, size)
-
if ranges.nil? || ranges.length > 1
-
# No ranges, or multiple ranges (which we don't support):
-
# TODO: Support multiple byte-ranges
-
response[0] = 200
-
@range = 0..size-1
-
elsif ranges.empty?
-
# Unsatisfiable. Return error, and file size:
-
response = fail(416, "Byte range unsatisfiable")
-
response[1]["Content-Range"] = "bytes */#{size}"
-
return response
-
else
-
# Partial content:
-
@range = ranges[0]
-
response[0] = 206
-
response[1]["Content-Range"] = "bytes #{@range.begin}-#{@range.end}/#{size}"
-
size = @range.end - @range.begin + 1
-
end
-
-
response[2] = [response_body] unless response_body.nil?
-
-
response[1][CONTENT_LENGTH] = size.to_s
-
response
-
end
-
-
1
def each
-
F.open(@path, "rb") do |file|
-
file.seek(@range.begin)
-
remaining_len = @range.end-@range.begin+1
-
while remaining_len > 0
-
part = file.read([8192, remaining_len].min)
-
break unless part
-
remaining_len -= part.length
-
-
yield part
-
end
-
end
-
end
-
-
1
private
-
-
1
def fail(status, body, headers = {})
-
body += "\n"
-
[
-
status,
-
{
-
CONTENT_TYPE => "text/plain",
-
CONTENT_LENGTH => body.size.to_s,
-
"X-Cascade" => "pass"
-
}.merge!(headers),
-
[body]
-
]
-
end
-
-
# The MIME type for the contents of the file located at @path
-
1
def mime_type
-
Mime.mime_type(F.extname(@path), @default_mime)
-
end
-
-
1
def filesize
-
# If response_body is present, use its size.
-
return Rack::Utils.bytesize(response_body) if response_body
-
-
# We check via File::size? whether this file provides size info
-
# via stat (e.g. /proc files often don't), otherwise we have to
-
# figure it out by reading the whole file into memory.
-
F.size?(@path) || Utils.bytesize(F.read(@path))
-
end
-
-
# By default, the response body for file requests is nil.
-
# In this case, the response body will be generated later
-
# from the file at @path
-
1
def response_body
-
nil
-
end
-
end
-
end
-
1
require 'rack/body_proxy'
-
-
1
module Rack
-
-
1
class Head
-
# Rack::Head returns an empty body for all HEAD requests. It leaves
-
# all other requests unchanged.
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
status, headers, body = @app.call(env)
-
-
23
if env[REQUEST_METHOD] == HEAD
-
[
-
status, headers, Rack::BodyProxy.new([]) do
-
body.close if body.respond_to? :close
-
end
-
]
-
else
-
23
[status, headers, body]
-
end
-
end
-
end
-
-
end
-
1
require 'rack/utils'
-
1
require 'forwardable'
-
-
1
module Rack
-
# Rack::Lint validates your application and the requests and
-
# responses according to the Rack spec.
-
-
1
class Lint
-
1
def initialize(app)
-
@app = app
-
@content_length = nil
-
end
-
-
# :stopdoc:
-
-
1
class LintError < RuntimeError; end
-
1
module Assertion
-
1
def assert(message, &block)
-
unless block.call
-
raise LintError, message
-
end
-
end
-
end
-
1
include Assertion
-
-
## This specification aims to formalize the Rack protocol. You
-
## can (and should) use Rack::Lint to enforce it.
-
##
-
## When you develop middleware, be sure to add a Lint before and
-
## after to catch all mistakes.
-
-
## = Rack applications
-
-
## A Rack application is a Ruby object (not a class) that
-
## responds to +call+.
-
1
def call(env=nil)
-
dup._call(env)
-
end
-
-
1
def _call(env)
-
## It takes exactly one argument, the *environment*
-
assert("No env given") { env }
-
check_env env
-
-
env['rack.input'] = InputWrapper.new(env['rack.input'])
-
env['rack.errors'] = ErrorWrapper.new(env['rack.errors'])
-
-
## and returns an Array of exactly three values:
-
status, headers, @body = @app.call(env)
-
## The *status*,
-
check_status status
-
## the *headers*,
-
check_headers headers
-
-
check_hijack_response headers, env
-
-
## and the *body*.
-
check_content_type status, headers
-
check_content_length status, headers
-
@head_request = env[REQUEST_METHOD] == "HEAD"
-
[status, headers, self]
-
end
-
-
## == The Environment
-
1
def check_env(env)
-
## The environment must be an instance of Hash that includes
-
## CGI-like headers. The application is free to modify the
-
## environment.
-
assert("env #{env.inspect} is not a Hash, but #{env.class}") {
-
env.kind_of? Hash
-
}
-
-
##
-
## The environment is required to include these variables
-
## (adopted from PEP333), except when they'd be empty, but see
-
## below.
-
-
## <tt>REQUEST_METHOD</tt>:: The HTTP request method, such as
-
## "GET" or "POST". This cannot ever
-
## be an empty string, and so is
-
## always required.
-
-
## <tt>SCRIPT_NAME</tt>:: The initial portion of the request
-
## URL's "path" that corresponds to the
-
## application object, so that the
-
## application knows its virtual
-
## "location". This may be an empty
-
## string, if the application corresponds
-
## to the "root" of the server.
-
-
## <tt>PATH_INFO</tt>:: The remainder of the request URL's
-
## "path", designating the virtual
-
## "location" of the request's target
-
## within the application. This may be an
-
## empty string, if the request URL targets
-
## the application root and does not have a
-
## trailing slash. This value may be
-
## percent-encoded when I originating from
-
## a URL.
-
-
## <tt>QUERY_STRING</tt>:: The portion of the request URL that
-
## follows the <tt>?</tt>, if any. May be
-
## empty, but is always required!
-
-
## <tt>SERVER_NAME</tt>, <tt>SERVER_PORT</tt>::
-
## When combined with <tt>SCRIPT_NAME</tt> and
-
## <tt>PATH_INFO</tt>, these variables can be
-
## used to complete the URL. Note, however,
-
## that <tt>HTTP_HOST</tt>, if present,
-
## should be used in preference to
-
## <tt>SERVER_NAME</tt> for reconstructing
-
## the request URL.
-
## <tt>SERVER_NAME</tt> and <tt>SERVER_PORT</tt>
-
## can never be empty strings, and so
-
## are always required.
-
-
## <tt>HTTP_</tt> Variables:: Variables corresponding to the
-
## client-supplied HTTP request
-
## headers (i.e., variables whose
-
## names begin with <tt>HTTP_</tt>). The
-
## presence or absence of these
-
## variables should correspond with
-
## the presence or absence of the
-
## appropriate HTTP header in the
-
## request. See
-
## <a href="https://tools.ietf.org/html/rfc3875#section-4.1.18">
-
## RFC3875 section 4.1.18</a> for
-
## specific behavior.
-
-
## In addition to this, the Rack environment must include these
-
## Rack-specific variables:
-
-
## <tt>rack.version</tt>:: The Array representing this version of Rack
-
## See Rack::VERSION, that corresponds to
-
## the version of this SPEC.
-
-
## <tt>rack.url_scheme</tt>:: +http+ or +https+, depending on the
-
## request URL.
-
-
## <tt>rack.input</tt>:: See below, the input stream.
-
-
## <tt>rack.errors</tt>:: See below, the error stream.
-
-
## <tt>rack.multithread</tt>:: true if the application object may be
-
## simultaneously invoked by another thread
-
## in the same process, false otherwise.
-
-
## <tt>rack.multiprocess</tt>:: true if an equivalent application object
-
## may be simultaneously invoked by another
-
## process, false otherwise.
-
-
## <tt>rack.run_once</tt>:: true if the server expects
-
## (but does not guarantee!) that the
-
## application will only be invoked this one
-
## time during the life of its containing
-
## process. Normally, this will only be true
-
## for a server based on CGI
-
## (or something similar).
-
-
## <tt>rack.hijack?</tt>:: present and true if the server supports
-
## connection hijacking. See below, hijacking.
-
-
## <tt>rack.hijack</tt>:: an object responding to #call that must be
-
## called at least once before using
-
## rack.hijack_io.
-
## It is recommended #call return rack.hijack_io
-
## as well as setting it in env if necessary.
-
-
## <tt>rack.hijack_io</tt>:: if rack.hijack? is true, and rack.hijack
-
## has received #call, this will contain
-
## an object resembling an IO. See hijacking.
-
-
## Additional environment specifications have approved to
-
## standardized middleware APIs. None of these are required to
-
## be implemented by the server.
-
-
## <tt>rack.session</tt>:: A hash like interface for storing
-
## request session data.
-
## The store must implement:
-
if session = env['rack.session']
-
## store(key, value) (aliased as []=);
-
assert("session #{session.inspect} must respond to store and []=") {
-
session.respond_to?(:store) && session.respond_to?(:[]=)
-
}
-
-
## fetch(key, default = nil) (aliased as []);
-
assert("session #{session.inspect} must respond to fetch and []") {
-
session.respond_to?(:fetch) && session.respond_to?(:[])
-
}
-
-
## delete(key);
-
assert("session #{session.inspect} must respond to delete") {
-
session.respond_to?(:delete)
-
}
-
-
## clear;
-
assert("session #{session.inspect} must respond to clear") {
-
session.respond_to?(:clear)
-
}
-
end
-
-
## <tt>rack.logger</tt>:: A common object interface for logging messages.
-
## The object must implement:
-
if logger = env['rack.logger']
-
## info(message, &block)
-
assert("logger #{logger.inspect} must respond to info") {
-
logger.respond_to?(:info)
-
}
-
-
## debug(message, &block)
-
assert("logger #{logger.inspect} must respond to debug") {
-
logger.respond_to?(:debug)
-
}
-
-
## warn(message, &block)
-
assert("logger #{logger.inspect} must respond to warn") {
-
logger.respond_to?(:warn)
-
}
-
-
## error(message, &block)
-
assert("logger #{logger.inspect} must respond to error") {
-
logger.respond_to?(:error)
-
}
-
-
## fatal(message, &block)
-
assert("logger #{logger.inspect} must respond to fatal") {
-
logger.respond_to?(:fatal)
-
}
-
end
-
-
## <tt>rack.multipart.buffer_size</tt>:: An Integer hint to the multipart parser as to what chunk size to use for reads and writes.
-
if bufsize = env['rack.multipart.buffer_size']
-
assert("rack.multipart.buffer_size must be an Integer > 0 if specified") {
-
bufsize.is_a?(Integer) && bufsize > 0
-
}
-
end
-
-
## <tt>rack.multipart.tempfile_factory</tt>:: An object responding to #call with two arguments, the filename and content_type given for the multipart form field, and returning an IO-like object that responds to #<< and optionally #rewind. This factory will be used to instantiate the tempfile for each multipart form file upload field, rather than the default class of Tempfile.
-
if tempfile_factory = env['rack.multipart.tempfile_factory']
-
assert("rack.multipart.tempfile_factory must respond to #call") { tempfile_factory.respond_to?(:call) }
-
env['rack.multipart.tempfile_factory'] = lambda do |filename, content_type|
-
io = tempfile_factory.call(filename, content_type)
-
assert("rack.multipart.tempfile_factory return value must respond to #<<") { io.respond_to?(:<<) }
-
io
-
end
-
end
-
-
## The server or the application can store their own data in the
-
## environment, too. The keys must contain at least one dot,
-
## and should be prefixed uniquely. The prefix <tt>rack.</tt>
-
## is reserved for use with the Rack core distribution and other
-
## accepted specifications and must not be used otherwise.
-
##
-
-
%w[REQUEST_METHOD SERVER_NAME SERVER_PORT
-
QUERY_STRING
-
rack.version rack.input rack.errors
-
rack.multithread rack.multiprocess rack.run_once].each { |header|
-
assert("env missing required key #{header}") { env.include? header }
-
}
-
-
## The environment must not contain the keys
-
## <tt>HTTP_CONTENT_TYPE</tt> or <tt>HTTP_CONTENT_LENGTH</tt>
-
## (use the versions without <tt>HTTP_</tt>).
-
%w[HTTP_CONTENT_TYPE HTTP_CONTENT_LENGTH].each { |header|
-
assert("env contains #{header}, must use #{header[5,-1]}") {
-
not env.include? header
-
}
-
}
-
-
## The CGI keys (named without a period) must have String values.
-
env.each { |key, value|
-
next if key.include? "." # Skip extensions
-
assert("env variable #{key} has non-string value #{value.inspect}") {
-
value.kind_of? String
-
}
-
}
-
-
## There are the following restrictions:
-
-
## * <tt>rack.version</tt> must be an array of Integers.
-
assert("rack.version must be an Array, was #{env["rack.version"].class}") {
-
env["rack.version"].kind_of? Array
-
}
-
## * <tt>rack.url_scheme</tt> must either be +http+ or +https+.
-
assert("rack.url_scheme unknown: #{env["rack.url_scheme"].inspect}") {
-
%w[http https].include? env["rack.url_scheme"]
-
}
-
-
## * There must be a valid input stream in <tt>rack.input</tt>.
-
check_input env["rack.input"]
-
## * There must be a valid error stream in <tt>rack.errors</tt>.
-
check_error env["rack.errors"]
-
## * There may be a valid hijack stream in <tt>rack.hijack_io</tt>
-
check_hijack env
-
-
## * The <tt>REQUEST_METHOD</tt> must be a valid token.
-
assert("REQUEST_METHOD unknown: #{env[REQUEST_METHOD]}") {
-
env["REQUEST_METHOD"] =~ /\A[0-9A-Za-z!\#$%&'*+.^_`|~-]+\z/
-
}
-
-
## * The <tt>SCRIPT_NAME</tt>, if non-empty, must start with <tt>/</tt>
-
assert("SCRIPT_NAME must start with /") {
-
!env.include?("SCRIPT_NAME") ||
-
env["SCRIPT_NAME"] == "" ||
-
env["SCRIPT_NAME"] =~ /\A\//
-
}
-
## * The <tt>PATH_INFO</tt>, if non-empty, must start with <tt>/</tt>
-
assert("PATH_INFO must start with /") {
-
!env.include?("PATH_INFO") ||
-
env["PATH_INFO"] == "" ||
-
env["PATH_INFO"] =~ /\A\//
-
}
-
## * The <tt>CONTENT_LENGTH</tt>, if given, must consist of digits only.
-
assert("Invalid CONTENT_LENGTH: #{env["CONTENT_LENGTH"]}") {
-
!env.include?("CONTENT_LENGTH") || env["CONTENT_LENGTH"] =~ /\A\d+\z/
-
}
-
-
## * One of <tt>SCRIPT_NAME</tt> or <tt>PATH_INFO</tt> must be
-
## set. <tt>PATH_INFO</tt> should be <tt>/</tt> if
-
## <tt>SCRIPT_NAME</tt> is empty.
-
assert("One of SCRIPT_NAME or PATH_INFO must be set (make PATH_INFO '/' if SCRIPT_NAME is empty)") {
-
env["SCRIPT_NAME"] || env["PATH_INFO"]
-
}
-
## <tt>SCRIPT_NAME</tt> never should be <tt>/</tt>, but instead be empty.
-
assert("SCRIPT_NAME cannot be '/', make it '' and PATH_INFO '/'") {
-
env["SCRIPT_NAME"] != "/"
-
}
-
end
-
-
## === The Input Stream
-
##
-
## The input stream is an IO-like object which contains the raw HTTP
-
## POST data.
-
1
def check_input(input)
-
## When applicable, its external encoding must be "ASCII-8BIT" and it
-
## must be opened in binary mode, for Ruby 1.9 compatibility.
-
assert("rack.input #{input} does not have ASCII-8BIT as its external encoding") {
-
input.external_encoding.name == "ASCII-8BIT"
-
} if input.respond_to?(:external_encoding)
-
assert("rack.input #{input} is not opened in binary mode") {
-
input.binmode?
-
} if input.respond_to?(:binmode?)
-
-
## The input stream must respond to +gets+, +each+, +read+ and +rewind+.
-
[:gets, :each, :read, :rewind].each { |method|
-
assert("rack.input #{input} does not respond to ##{method}") {
-
input.respond_to? method
-
}
-
}
-
end
-
-
1
class InputWrapper
-
1
include Assertion
-
-
1
def initialize(input)
-
@input = input
-
end
-
-
## * +gets+ must be called without arguments and return a string,
-
## or +nil+ on EOF.
-
1
def gets(*args)
-
assert("rack.input#gets called with arguments") { args.size == 0 }
-
v = @input.gets
-
assert("rack.input#gets didn't return a String") {
-
v.nil? or v.kind_of? String
-
}
-
v
-
end
-
-
## * +read+ behaves like IO#read.
-
## Its signature is <tt>read([length, [buffer]])</tt>.
-
##
-
## If given, +length+ must be a non-negative Integer (>= 0) or +nil+,
-
## and +buffer+ must be a String and may not be nil.
-
##
-
## If +length+ is given and not nil, then this method reads at most
-
## +length+ bytes from the input stream.
-
##
-
## If +length+ is not given or nil, then this method reads
-
## all data until EOF.
-
##
-
## When EOF is reached, this method returns nil if +length+ is given
-
## and not nil, or "" if +length+ is not given or is nil.
-
##
-
## If +buffer+ is given, then the read data will be placed
-
## into +buffer+ instead of a newly created String object.
-
1
def read(*args)
-
assert("rack.input#read called with too many arguments") {
-
args.size <= 2
-
}
-
if args.size >= 1
-
assert("rack.input#read called with non-integer and non-nil length") {
-
args.first.kind_of?(Integer) || args.first.nil?
-
}
-
assert("rack.input#read called with a negative length") {
-
args.first.nil? || args.first >= 0
-
}
-
end
-
if args.size >= 2
-
assert("rack.input#read called with non-String buffer") {
-
args[1].kind_of?(String)
-
}
-
end
-
-
v = @input.read(*args)
-
-
assert("rack.input#read didn't return nil or a String") {
-
v.nil? or v.kind_of? String
-
}
-
if args[0].nil?
-
assert("rack.input#read(nil) returned nil on EOF") {
-
!v.nil?
-
}
-
end
-
-
v
-
end
-
-
## * +each+ must be called without arguments and only yield Strings.
-
1
def each(*args)
-
assert("rack.input#each called with arguments") { args.size == 0 }
-
@input.each { |line|
-
assert("rack.input#each didn't yield a String") {
-
line.kind_of? String
-
}
-
yield line
-
}
-
end
-
-
## * +rewind+ must be called without arguments. It rewinds the input
-
## stream back to the beginning. It must not raise Errno::ESPIPE:
-
## that is, it may not be a pipe or a socket. Therefore, handler
-
## developers must buffer the input data into some rewindable object
-
## if the underlying input stream is not rewindable.
-
1
def rewind(*args)
-
assert("rack.input#rewind called with arguments") { args.size == 0 }
-
assert("rack.input#rewind raised Errno::ESPIPE") {
-
begin
-
@input.rewind
-
true
-
rescue Errno::ESPIPE
-
false
-
end
-
}
-
end
-
-
## * +close+ must never be called on the input stream.
-
1
def close(*args)
-
assert("rack.input#close must not be called") { false }
-
end
-
end
-
-
## === The Error Stream
-
1
def check_error(error)
-
## The error stream must respond to +puts+, +write+ and +flush+.
-
[:puts, :write, :flush].each { |method|
-
assert("rack.error #{error} does not respond to ##{method}") {
-
error.respond_to? method
-
}
-
}
-
end
-
-
1
class ErrorWrapper
-
1
include Assertion
-
-
1
def initialize(error)
-
@error = error
-
end
-
-
## * +puts+ must be called with a single argument that responds to +to_s+.
-
1
def puts(str)
-
@error.puts str
-
end
-
-
## * +write+ must be called with a single argument that is a String.
-
1
def write(str)
-
assert("rack.errors#write not called with a String") { str.kind_of? String }
-
@error.write str
-
end
-
-
## * +flush+ must be called without arguments and must be called
-
## in order to make the error appear for sure.
-
1
def flush
-
@error.flush
-
end
-
-
## * +close+ must never be called on the error stream.
-
1
def close(*args)
-
assert("rack.errors#close must not be called") { false }
-
end
-
end
-
-
1
class HijackWrapper
-
1
include Assertion
-
1
extend Forwardable
-
-
1
REQUIRED_METHODS = [
-
:read, :write, :read_nonblock, :write_nonblock, :flush, :close,
-
:close_read, :close_write, :closed?
-
]
-
-
1
def_delegators :@io, *REQUIRED_METHODS
-
-
1
def initialize(io)
-
@io = io
-
REQUIRED_METHODS.each do |meth|
-
assert("rack.hijack_io must respond to #{meth}") { io.respond_to? meth }
-
end
-
end
-
end
-
-
## === Hijacking
-
#
-
# AUTHORS: n.b. The trailing whitespace between paragraphs is important and
-
# should not be removed. The whitespace creates paragraphs in the RDoc
-
# output.
-
#
-
## ==== Request (before status)
-
1
def check_hijack(env)
-
if env['rack.hijack?']
-
## If rack.hijack? is true then rack.hijack must respond to #call.
-
original_hijack = env['rack.hijack']
-
assert("rack.hijack must respond to call") { original_hijack.respond_to?(:call) }
-
env['rack.hijack'] = proc do
-
## rack.hijack must return the io that will also be assigned (or is
-
## already present, in rack.hijack_io.
-
io = original_hijack.call
-
HijackWrapper.new(io)
-
##
-
## rack.hijack_io must respond to:
-
## <tt>read, write, read_nonblock, write_nonblock, flush, close,
-
## close_read, close_write, closed?</tt>
-
##
-
## The semantics of these IO methods must be a best effort match to
-
## those of a normal ruby IO or Socket object, using standard
-
## arguments and raising standard exceptions. Servers are encouraged
-
## to simply pass on real IO objects, although it is recognized that
-
## this approach is not directly compatible with SPDY and HTTP 2.0.
-
##
-
## IO provided in rack.hijack_io should preference the
-
## IO::WaitReadable and IO::WaitWritable APIs wherever supported.
-
##
-
## There is a deliberate lack of full specification around
-
## rack.hijack_io, as semantics will change from server to server.
-
## Users are encouraged to utilize this API with a knowledge of their
-
## server choice, and servers may extend the functionality of
-
## hijack_io to provide additional features to users. The purpose of
-
## rack.hijack is for Rack to "get out of the way", as such, Rack only
-
## provides the minimum of specification and support.
-
env['rack.hijack_io'] = HijackWrapper.new(env['rack.hijack_io'])
-
io
-
end
-
else
-
##
-
## If rack.hijack? is false, then rack.hijack should not be set.
-
assert("rack.hijack? is false, but rack.hijack is present") { env['rack.hijack'].nil? }
-
##
-
## If rack.hijack? is false, then rack.hijack_io should not be set.
-
assert("rack.hijack? is false, but rack.hijack_io is present") { env['rack.hijack_io'].nil? }
-
end
-
end
-
-
## ==== Response (after headers)
-
## It is also possible to hijack a response after the status and headers
-
## have been sent.
-
1
def check_hijack_response(headers, env)
-
-
# this check uses headers like a hash, but the spec only requires
-
# headers respond to #each
-
headers = Rack::Utils::HeaderHash.new(headers)
-
-
## In order to do this, an application may set the special header
-
## <tt>rack.hijack</tt> to an object that responds to <tt>call</tt>
-
## accepting an argument that conforms to the <tt>rack.hijack_io</tt>
-
## protocol.
-
##
-
## After the headers have been sent, and this hijack callback has been
-
## called, the application is now responsible for the remaining lifecycle
-
## of the IO. The application is also responsible for maintaining HTTP
-
## semantics. Of specific note, in almost all cases in the current SPEC,
-
## applications will have wanted to specify the header Connection:close in
-
## HTTP/1.1, and not Connection:keep-alive, as there is no protocol for
-
## returning hijacked sockets to the web server. For that purpose, use the
-
## body streaming API instead (progressively yielding strings via each).
-
##
-
## Servers must ignore the <tt>body</tt> part of the response tuple when
-
## the <tt>rack.hijack</tt> response API is in use.
-
-
if env['rack.hijack?'] && headers['rack.hijack']
-
assert('rack.hijack header must respond to #call') {
-
headers['rack.hijack'].respond_to? :call
-
}
-
original_hijack = headers['rack.hijack']
-
headers['rack.hijack'] = proc do |io|
-
original_hijack.call HijackWrapper.new(io)
-
end
-
else
-
##
-
## The special response header <tt>rack.hijack</tt> must only be set
-
## if the request env has <tt>rack.hijack?</tt> <tt>true</tt>.
-
assert('rack.hijack header must not be present if server does not support hijacking') {
-
headers['rack.hijack'].nil?
-
}
-
end
-
end
-
## ==== Conventions
-
## * Middleware should not use hijack unless it is handling the whole
-
## response.
-
## * Middleware may wrap the IO object for the response pattern.
-
## * Middleware should not wrap the IO object for the request pattern. The
-
## request pattern is intended to provide the hijacker with "raw tcp".
-
-
## == The Response
-
-
## === The Status
-
1
def check_status(status)
-
## This is an HTTP status. When parsed as integer (+to_i+), it must be
-
## greater than or equal to 100.
-
assert("Status must be >=100 seen as integer") { status.to_i >= 100 }
-
end
-
-
## === The Headers
-
1
def check_headers(header)
-
## The header must respond to +each+, and yield values of key and value.
-
assert("headers object should respond to #each, but doesn't (got #{header.class} as headers)") {
-
header.respond_to? :each
-
}
-
header.each { |key, value|
-
## Special headers starting "rack." are for communicating with the
-
## server, and must not be sent back to the client.
-
next if key =~ /^rack\..+$/
-
-
## The header keys must be Strings.
-
assert("header key must be a string, was #{key.class}") {
-
key.kind_of? String
-
}
-
## The header must not contain a +Status+ key.
-
assert("header must not contain Status") { key.downcase != "status" }
-
## The header must conform to RFC7230 token specification, i.e. cannot
-
## contain non-printable ASCII, DQUOTE or "(),/:;<=>?@[\]{}".
-
assert("invalid header name: #{key}") { key !~ /[\(\),\/:;<=>\?@\[\\\]{}[:cntrl:]]/ }
-
-
## The values of the header must be Strings,
-
assert("a header value must be a String, but the value of " +
-
"'#{key}' is a #{value.class}") { value.kind_of? String }
-
## consisting of lines (for multiple header values, e.g. multiple
-
## <tt>Set-Cookie</tt> values) separated by "\\n".
-
value.split("\n").each { |item|
-
## The lines must not contain characters below 037.
-
assert("invalid header value #{key}: #{item.inspect}") {
-
item !~ /[\000-\037]/
-
}
-
}
-
}
-
end
-
-
## === The Content-Type
-
1
def check_content_type(status, headers)
-
headers.each { |key, value|
-
## There must not be a <tt>Content-Type</tt>, when the +Status+ is 1xx,
-
## 204, 205 or 304.
-
if key.downcase == "content-type"
-
assert("Content-Type header found in #{status} response, not allowed") {
-
not Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.include? status.to_i
-
}
-
return
-
end
-
}
-
end
-
-
## === The Content-Length
-
1
def check_content_length(status, headers)
-
headers.each { |key, value|
-
if key.downcase == 'content-length'
-
## There must not be a <tt>Content-Length</tt> header when the
-
## +Status+ is 1xx, 204, 205 or 304.
-
assert("Content-Length header found in #{status} response, not allowed") {
-
not Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.include? status.to_i
-
}
-
@content_length = value
-
end
-
}
-
end
-
-
1
def verify_content_length(bytes)
-
if @head_request
-
assert("Response body was given for HEAD request, but should be empty") {
-
bytes == 0
-
}
-
elsif @content_length
-
assert("Content-Length header was #{@content_length}, but should be #{bytes}") {
-
@content_length == bytes.to_s
-
}
-
end
-
end
-
-
## === The Body
-
1
def each
-
@closed = false
-
bytes = 0
-
-
## The Body must respond to +each+
-
assert("Response body must respond to each") do
-
@body.respond_to?(:each)
-
end
-
-
@body.each { |part|
-
## and must only yield String values.
-
assert("Body yielded non-string value #{part.inspect}") {
-
part.kind_of? String
-
}
-
bytes += Rack::Utils.bytesize(part)
-
yield part
-
}
-
verify_content_length(bytes)
-
-
##
-
## The Body itself should not be an instance of String, as this will
-
## break in Ruby 1.9.
-
##
-
## If the Body responds to +close+, it will be called after iteration. If
-
## the body is replaced by a middleware after action, the original body
-
## must be closed first, if it responds to close.
-
# XXX howto: assert("Body has not been closed") { @closed }
-
-
-
##
-
## If the Body responds to +to_path+, it must return a String
-
## identifying the location of a file whose contents are identical
-
## to that produced by calling +each+; this may be used by the
-
## server as an alternative, possibly more efficient way to
-
## transport the response.
-
-
if @body.respond_to?(:to_path)
-
assert("The file identified by body.to_path does not exist") {
-
::File.exist? @body.to_path
-
}
-
end
-
-
##
-
## The Body commonly is an Array of Strings, the application
-
## instance itself, or a File-like object.
-
end
-
-
1
def close
-
@closed = true
-
@body.close if @body.respond_to?(:close)
-
end
-
-
# :startdoc:
-
-
end
-
end
-
-
## == Thanks
-
## Some parts of this specification are adopted from PEP333: Python
-
## Web Server Gateway Interface
-
## v1.0 (http://www.python.org/dev/peps/pep-0333/). I'd like to thank
-
## everyone involved in that effort.
-
1
require 'thread'
-
1
require 'rack/body_proxy'
-
-
1
module Rack
-
# Rack::Lock locks every request inside a mutex, so that every request
-
# will effectively be executed synchronously.
-
1
class Lock
-
1
FLAG = 'rack.multithread'.freeze
-
-
1
def initialize(app, mutex = Mutex.new)
-
1
@app, @mutex = app, mutex
-
end
-
-
1
def call(env)
-
23
old, env[FLAG] = env[FLAG], false
-
23
@mutex.lock
-
23
response = @app.call(env)
-
46
body = BodyProxy.new(response[2]) { @mutex.unlock }
-
23
response[2] = body
-
23
response
-
ensure
-
23
@mutex.unlock unless body
-
23
env[FLAG] = old
-
end
-
end
-
end
-
1
module Rack
-
1
class MethodOverride
-
1
HTTP_METHODS = %w(GET HEAD PUT POST DELETE OPTIONS PATCH LINK UNLINK)
-
-
1
METHOD_OVERRIDE_PARAM_KEY = "_method".freeze
-
1
HTTP_METHOD_OVERRIDE_HEADER = "HTTP_X_HTTP_METHOD_OVERRIDE".freeze
-
1
ALLOWED_METHODS = ["POST"]
-
-
1
def initialize(app)
-
1
@app = app
-
end
-
-
1
def call(env)
-
23
if allowed_methods.include?(env[REQUEST_METHOD])
-
method = method_override(env)
-
if HTTP_METHODS.include?(method)
-
env["rack.methodoverride.original_method"] = env[REQUEST_METHOD]
-
env[REQUEST_METHOD] = method
-
end
-
end
-
-
23
@app.call(env)
-
end
-
-
1
def method_override(env)
-
req = Request.new(env)
-
method = method_override_param(req) ||
-
env[HTTP_METHOD_OVERRIDE_HEADER]
-
method.to_s.upcase
-
end
-
-
1
private
-
-
1
def allowed_methods
-
23
ALLOWED_METHODS
-
end
-
-
1
def method_override_param(req)
-
req.POST[METHOD_OVERRIDE_PARAM_KEY]
-
rescue Utils::InvalidParameterError, Utils::ParameterTypeError
-
end
-
end
-
end
-
1
module Rack
-
1
module Mime
-
# Returns String with mime type if found, otherwise use +fallback+.
-
# +ext+ should be filename extension in the '.ext' format that
-
# File.extname(file) returns.
-
# +fallback+ may be any object
-
#
-
# Also see the documentation for MIME_TYPES
-
#
-
# Usage:
-
# Rack::Mime.mime_type('.foo')
-
#
-
# This is a shortcut for:
-
# Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream')
-
-
1
def mime_type(ext, fallback='application/octet-stream')
-
MIME_TYPES.fetch(ext.to_s.downcase, fallback)
-
end
-
1
module_function :mime_type
-
-
# Returns true if the given value is a mime match for the given mime match
-
# specification, false otherwise.
-
#
-
# Rack::Mime.match?('text/html', 'text/*') => true
-
# Rack::Mime.match?('text/plain', '*') => true
-
# Rack::Mime.match?('text/html', 'application/json') => false
-
-
1
def match?(value, matcher)
-
v1, v2 = value.split('/', 2)
-
m1, m2 = matcher.split('/', 2)
-
-
(m1 == '*' || v1 == m1) && (m2.nil? || m2 == '*' || m2 == v2)
-
end
-
1
module_function :match?
-
-
# List of most common mime-types, selected various sources
-
# according to their usefulness in a webserving scope for Ruby
-
# users.
-
#
-
# To amend this list with your local mime.types list you can use:
-
#
-
# require 'webrick/httputils'
-
# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types')
-
# Rack::Mime::MIME_TYPES.merge!(list)
-
#
-
# N.B. On Ubuntu the mime.types file does not include the leading period, so
-
# users may need to modify the data before merging into the hash.
-
#
-
# To add the list mongrel provides, use:
-
#
-
# require 'mongrel/handlers'
-
# Rack::Mime::MIME_TYPES.merge!(Mongrel::DirHandler::MIME_TYPES)
-
-
1
MIME_TYPES = {
-
".123" => "application/vnd.lotus-1-2-3",
-
".3dml" => "text/vnd.in3d.3dml",
-
".3g2" => "video/3gpp2",
-
".3gp" => "video/3gpp",
-
".a" => "application/octet-stream",
-
".acc" => "application/vnd.americandynamics.acc",
-
".ace" => "application/x-ace-compressed",
-
".acu" => "application/vnd.acucobol",
-
".aep" => "application/vnd.audiograph",
-
".afp" => "application/vnd.ibm.modcap",
-
".ai" => "application/postscript",
-
".aif" => "audio/x-aiff",
-
".aiff" => "audio/x-aiff",
-
".ami" => "application/vnd.amiga.ami",
-
".appcache" => "text/cache-manifest",
-
".apr" => "application/vnd.lotus-approach",
-
".asc" => "application/pgp-signature",
-
".asf" => "video/x-ms-asf",
-
".asm" => "text/x-asm",
-
".aso" => "application/vnd.accpac.simply.aso",
-
".asx" => "video/x-ms-asf",
-
".atc" => "application/vnd.acucorp",
-
".atom" => "application/atom+xml",
-
".atomcat" => "application/atomcat+xml",
-
".atomsvc" => "application/atomsvc+xml",
-
".atx" => "application/vnd.antix.game-component",
-
".au" => "audio/basic",
-
".avi" => "video/x-msvideo",
-
".bat" => "application/x-msdownload",
-
".bcpio" => "application/x-bcpio",
-
".bdm" => "application/vnd.syncml.dm+wbxml",
-
".bh2" => "application/vnd.fujitsu.oasysprs",
-
".bin" => "application/octet-stream",
-
".bmi" => "application/vnd.bmi",
-
".bmp" => "image/bmp",
-
".box" => "application/vnd.previewsystems.box",
-
".btif" => "image/prs.btif",
-
".bz" => "application/x-bzip",
-
".bz2" => "application/x-bzip2",
-
".c" => "text/x-c",
-
".c4g" => "application/vnd.clonk.c4group",
-
".cab" => "application/vnd.ms-cab-compressed",
-
".cc" => "text/x-c",
-
".ccxml" => "application/ccxml+xml",
-
".cdbcmsg" => "application/vnd.contact.cmsg",
-
".cdkey" => "application/vnd.mediastation.cdkey",
-
".cdx" => "chemical/x-cdx",
-
".cdxml" => "application/vnd.chemdraw+xml",
-
".cdy" => "application/vnd.cinderella",
-
".cer" => "application/pkix-cert",
-
".cgm" => "image/cgm",
-
".chat" => "application/x-chat",
-
".chm" => "application/vnd.ms-htmlhelp",
-
".chrt" => "application/vnd.kde.kchart",
-
".cif" => "chemical/x-cif",
-
".cii" => "application/vnd.anser-web-certificate-issue-initiation",
-
".cil" => "application/vnd.ms-artgalry",
-
".cla" => "application/vnd.claymore",
-
".class" => "application/octet-stream",
-
".clkk" => "application/vnd.crick.clicker.keyboard",
-
".clkp" => "application/vnd.crick.clicker.palette",
-
".clkt" => "application/vnd.crick.clicker.template",
-
".clkw" => "application/vnd.crick.clicker.wordbank",
-
".clkx" => "application/vnd.crick.clicker",
-
".clp" => "application/x-msclip",
-
".cmc" => "application/vnd.cosmocaller",
-
".cmdf" => "chemical/x-cmdf",
-
".cml" => "chemical/x-cml",
-
".cmp" => "application/vnd.yellowriver-custom-menu",
-
".cmx" => "image/x-cmx",
-
".com" => "application/x-msdownload",
-
".conf" => "text/plain",
-
".cpio" => "application/x-cpio",
-
".cpp" => "text/x-c",
-
".cpt" => "application/mac-compactpro",
-
".crd" => "application/x-mscardfile",
-
".crl" => "application/pkix-crl",
-
".crt" => "application/x-x509-ca-cert",
-
".csh" => "application/x-csh",
-
".csml" => "chemical/x-csml",
-
".csp" => "application/vnd.commonspace",
-
".css" => "text/css",
-
".csv" => "text/csv",
-
".curl" => "application/vnd.curl",
-
".cww" => "application/prs.cww",
-
".cxx" => "text/x-c",
-
".daf" => "application/vnd.mobius.daf",
-
".davmount" => "application/davmount+xml",
-
".dcr" => "application/x-director",
-
".dd2" => "application/vnd.oma.dd2+xml",
-
".ddd" => "application/vnd.fujixerox.ddd",
-
".deb" => "application/x-debian-package",
-
".der" => "application/x-x509-ca-cert",
-
".dfac" => "application/vnd.dreamfactory",
-
".diff" => "text/x-diff",
-
".dis" => "application/vnd.mobius.dis",
-
".djv" => "image/vnd.djvu",
-
".djvu" => "image/vnd.djvu",
-
".dll" => "application/x-msdownload",
-
".dmg" => "application/octet-stream",
-
".dna" => "application/vnd.dna",
-
".doc" => "application/msword",
-
".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
-
".dot" => "application/msword",
-
".dp" => "application/vnd.osgi.dp",
-
".dpg" => "application/vnd.dpgraph",
-
".dsc" => "text/prs.lines.tag",
-
".dtd" => "application/xml-dtd",
-
".dts" => "audio/vnd.dts",
-
".dtshd" => "audio/vnd.dts.hd",
-
".dv" => "video/x-dv",
-
".dvi" => "application/x-dvi",
-
".dwf" => "model/vnd.dwf",
-
".dwg" => "image/vnd.dwg",
-
".dxf" => "image/vnd.dxf",
-
".dxp" => "application/vnd.spotfire.dxp",
-
".ear" => "application/java-archive",
-
".ecelp4800" => "audio/vnd.nuera.ecelp4800",
-
".ecelp7470" => "audio/vnd.nuera.ecelp7470",
-
".ecelp9600" => "audio/vnd.nuera.ecelp9600",
-
".ecma" => "application/ecmascript",
-
".edm" => "application/vnd.novadigm.edm",
-
".edx" => "application/vnd.novadigm.edx",
-
".efif" => "application/vnd.picsel",
-
".ei6" => "application/vnd.pg.osasli",
-
".eml" => "message/rfc822",
-
".eol" => "audio/vnd.digital-winds",
-
".eot" => "application/vnd.ms-fontobject",
-
".eps" => "application/postscript",
-
".es3" => "application/vnd.eszigno3+xml",
-
".esf" => "application/vnd.epson.esf",
-
".etx" => "text/x-setext",
-
".exe" => "application/x-msdownload",
-
".ext" => "application/vnd.novadigm.ext",
-
".ez" => "application/andrew-inset",
-
".ez2" => "application/vnd.ezpix-album",
-
".ez3" => "application/vnd.ezpix-package",
-
".f" => "text/x-fortran",
-
".f77" => "text/x-fortran",
-
".f90" => "text/x-fortran",
-
".fbs" => "image/vnd.fastbidsheet",
-
".fdf" => "application/vnd.fdf",
-
".fe_launch" => "application/vnd.denovo.fcselayout-link",
-
".fg5" => "application/vnd.fujitsu.oasysgp",
-
".fli" => "video/x-fli",
-
".flo" => "application/vnd.micrografx.flo",
-
".flv" => "video/x-flv",
-
".flw" => "application/vnd.kde.kivio",
-
".flx" => "text/vnd.fmi.flexstor",
-
".fly" => "text/vnd.fly",
-
".fm" => "application/vnd.framemaker",
-
".fnc" => "application/vnd.frogans.fnc",
-
".for" => "text/x-fortran",
-
".fpx" => "image/vnd.fpx",
-
".fsc" => "application/vnd.fsc.weblaunch",
-
".fst" => "image/vnd.fst",
-
".ftc" => "application/vnd.fluxtime.clip",
-
".fti" => "application/vnd.anser-web-funds-transfer-initiation",
-
".fvt" => "video/vnd.fvt",
-
".fzs" => "application/vnd.fuzzysheet",
-
".g3" => "image/g3fax",
-
".gac" => "application/vnd.groove-account",
-
".gdl" => "model/vnd.gdl",
-
".gem" => "application/octet-stream",
-
".gemspec" => "text/x-script.ruby",
-
".ghf" => "application/vnd.groove-help",
-
".gif" => "image/gif",
-
".gim" => "application/vnd.groove-identity-message",
-
".gmx" => "application/vnd.gmx",
-
".gph" => "application/vnd.flographit",
-
".gqf" => "application/vnd.grafeq",
-
".gram" => "application/srgs",
-
".grv" => "application/vnd.groove-injector",
-
".grxml" => "application/srgs+xml",
-
".gtar" => "application/x-gtar",
-
".gtm" => "application/vnd.groove-tool-message",
-
".gtw" => "model/vnd.gtw",
-
".gv" => "text/vnd.graphviz",
-
".gz" => "application/x-gzip",
-
".h" => "text/x-c",
-
".h261" => "video/h261",
-
".h263" => "video/h263",
-
".h264" => "video/h264",
-
".hbci" => "application/vnd.hbci",
-
".hdf" => "application/x-hdf",
-
".hh" => "text/x-c",
-
".hlp" => "application/winhlp",
-
".hpgl" => "application/vnd.hp-hpgl",
-
".hpid" => "application/vnd.hp-hpid",
-
".hps" => "application/vnd.hp-hps",
-
".hqx" => "application/mac-binhex40",
-
".htc" => "text/x-component",
-
".htke" => "application/vnd.kenameaapp",
-
".htm" => "text/html",
-
".html" => "text/html",
-
".hvd" => "application/vnd.yamaha.hv-dic",
-
".hvp" => "application/vnd.yamaha.hv-voice",
-
".hvs" => "application/vnd.yamaha.hv-script",
-
".icc" => "application/vnd.iccprofile",
-
".ice" => "x-conference/x-cooltalk",
-
".ico" => "image/vnd.microsoft.icon",
-
".ics" => "text/calendar",
-
".ief" => "image/ief",
-
".ifb" => "text/calendar",
-
".ifm" => "application/vnd.shana.informed.formdata",
-
".igl" => "application/vnd.igloader",
-
".igs" => "model/iges",
-
".igx" => "application/vnd.micrografx.igx",
-
".iif" => "application/vnd.shana.informed.interchange",
-
".imp" => "application/vnd.accpac.simply.imp",
-
".ims" => "application/vnd.ms-ims",
-
".ipk" => "application/vnd.shana.informed.package",
-
".irm" => "application/vnd.ibm.rights-management",
-
".irp" => "application/vnd.irepository.package+xml",
-
".iso" => "application/octet-stream",
-
".itp" => "application/vnd.shana.informed.formtemplate",
-
".ivp" => "application/vnd.immervision-ivp",
-
".ivu" => "application/vnd.immervision-ivu",
-
".jad" => "text/vnd.sun.j2me.app-descriptor",
-
".jam" => "application/vnd.jam",
-
".jar" => "application/java-archive",
-
".java" => "text/x-java-source",
-
".jisp" => "application/vnd.jisp",
-
".jlt" => "application/vnd.hp-jlyt",
-
".jnlp" => "application/x-java-jnlp-file",
-
".joda" => "application/vnd.joost.joda-archive",
-
".jp2" => "image/jp2",
-
".jpeg" => "image/jpeg",
-
".jpg" => "image/jpeg",
-
".jpgv" => "video/jpeg",
-
".jpm" => "video/jpm",
-
".js" => "application/javascript",
-
".json" => "application/json",
-
".karbon" => "application/vnd.kde.karbon",
-
".kfo" => "application/vnd.kde.kformula",
-
".kia" => "application/vnd.kidspiration",
-
".kml" => "application/vnd.google-earth.kml+xml",
-
".kmz" => "application/vnd.google-earth.kmz",
-
".kne" => "application/vnd.kinar",
-
".kon" => "application/vnd.kde.kontour",
-
".kpr" => "application/vnd.kde.kpresenter",
-
".ksp" => "application/vnd.kde.kspread",
-
".ktz" => "application/vnd.kahootz",
-
".kwd" => "application/vnd.kde.kword",
-
".latex" => "application/x-latex",
-
".lbd" => "application/vnd.llamagraphics.life-balance.desktop",
-
".lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
-
".les" => "application/vnd.hhe.lesson-player",
-
".link66" => "application/vnd.route66.link66+xml",
-
".log" => "text/plain",
-
".lostxml" => "application/lost+xml",
-
".lrm" => "application/vnd.ms-lrm",
-
".ltf" => "application/vnd.frogans.ltf",
-
".lvp" => "audio/vnd.lucent.voice",
-
".lwp" => "application/vnd.lotus-wordpro",
-
".m3u" => "audio/x-mpegurl",
-
".m4a" => "audio/mp4a-latm",
-
".m4v" => "video/mp4",
-
".ma" => "application/mathematica",
-
".mag" => "application/vnd.ecowin.chart",
-
".man" => "text/troff",
-
".manifest" => "text/cache-manifest",
-
".mathml" => "application/mathml+xml",
-
".mbk" => "application/vnd.mobius.mbk",
-
".mbox" => "application/mbox",
-
".mc1" => "application/vnd.medcalcdata",
-
".mcd" => "application/vnd.mcd",
-
".mdb" => "application/x-msaccess",
-
".mdi" => "image/vnd.ms-modi",
-
".mdoc" => "text/troff",
-
".me" => "text/troff",
-
".mfm" => "application/vnd.mfmp",
-
".mgz" => "application/vnd.proteus.magazine",
-
".mid" => "audio/midi",
-
".midi" => "audio/midi",
-
".mif" => "application/vnd.mif",
-
".mime" => "message/rfc822",
-
".mj2" => "video/mj2",
-
".mlp" => "application/vnd.dolby.mlp",
-
".mmd" => "application/vnd.chipnuts.karaoke-mmd",
-
".mmf" => "application/vnd.smaf",
-
".mml" => "application/mathml+xml",
-
".mmr" => "image/vnd.fujixerox.edmics-mmr",
-
".mng" => "video/x-mng",
-
".mny" => "application/x-msmoney",
-
".mov" => "video/quicktime",
-
".movie" => "video/x-sgi-movie",
-
".mp3" => "audio/mpeg",
-
".mp4" => "video/mp4",
-
".mp4a" => "audio/mp4",
-
".mp4s" => "application/mp4",
-
".mp4v" => "video/mp4",
-
".mpc" => "application/vnd.mophun.certificate",
-
".mpeg" => "video/mpeg",
-
".mpg" => "video/mpeg",
-
".mpga" => "audio/mpeg",
-
".mpkg" => "application/vnd.apple.installer+xml",
-
".mpm" => "application/vnd.blueice.multipass",
-
".mpn" => "application/vnd.mophun.application",
-
".mpp" => "application/vnd.ms-project",
-
".mpy" => "application/vnd.ibm.minipay",
-
".mqy" => "application/vnd.mobius.mqy",
-
".mrc" => "application/marc",
-
".ms" => "text/troff",
-
".mscml" => "application/mediaservercontrol+xml",
-
".mseq" => "application/vnd.mseq",
-
".msf" => "application/vnd.epson.msf",
-
".msh" => "model/mesh",
-
".msi" => "application/x-msdownload",
-
".msl" => "application/vnd.mobius.msl",
-
".msty" => "application/vnd.muvee.style",
-
".mts" => "model/vnd.mts",
-
".mus" => "application/vnd.musician",
-
".mvb" => "application/x-msmediaview",
-
".mwf" => "application/vnd.mfer",
-
".mxf" => "application/mxf",
-
".mxl" => "application/vnd.recordare.musicxml",
-
".mxml" => "application/xv+xml",
-
".mxs" => "application/vnd.triscape.mxs",
-
".mxu" => "video/vnd.mpegurl",
-
".n" => "application/vnd.nokia.n-gage.symbian.install",
-
".nc" => "application/x-netcdf",
-
".ngdat" => "application/vnd.nokia.n-gage.data",
-
".nlu" => "application/vnd.neurolanguage.nlu",
-
".nml" => "application/vnd.enliven",
-
".nnd" => "application/vnd.noblenet-directory",
-
".nns" => "application/vnd.noblenet-sealer",
-
".nnw" => "application/vnd.noblenet-web",
-
".npx" => "image/vnd.net-fpx",
-
".nsf" => "application/vnd.lotus-notes",
-
".oa2" => "application/vnd.fujitsu.oasys2",
-
".oa3" => "application/vnd.fujitsu.oasys3",
-
".oas" => "application/vnd.fujitsu.oasys",
-
".obd" => "application/x-msbinder",
-
".oda" => "application/oda",
-
".odc" => "application/vnd.oasis.opendocument.chart",
-
".odf" => "application/vnd.oasis.opendocument.formula",
-
".odg" => "application/vnd.oasis.opendocument.graphics",
-
".odi" => "application/vnd.oasis.opendocument.image",
-
".odp" => "application/vnd.oasis.opendocument.presentation",
-
".ods" => "application/vnd.oasis.opendocument.spreadsheet",
-
".odt" => "application/vnd.oasis.opendocument.text",
-
".oga" => "audio/ogg",
-
".ogg" => "application/ogg",
-
".ogv" => "video/ogg",
-
".ogx" => "application/ogg",
-
".org" => "application/vnd.lotus-organizer",
-
".otc" => "application/vnd.oasis.opendocument.chart-template",
-
".otf" => "application/vnd.oasis.opendocument.formula-template",
-
".otg" => "application/vnd.oasis.opendocument.graphics-template",
-
".oth" => "application/vnd.oasis.opendocument.text-web",
-
".oti" => "application/vnd.oasis.opendocument.image-template",
-
".otm" => "application/vnd.oasis.opendocument.text-master",
-
".ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
-
".ott" => "application/vnd.oasis.opendocument.text-template",
-
".oxt" => "application/vnd.openofficeorg.extension",
-
".p" => "text/x-pascal",
-
".p10" => "application/pkcs10",
-
".p12" => "application/x-pkcs12",
-
".p7b" => "application/x-pkcs7-certificates",
-
".p7m" => "application/pkcs7-mime",
-
".p7r" => "application/x-pkcs7-certreqresp",
-
".p7s" => "application/pkcs7-signature",
-
".pas" => "text/x-pascal",
-
".pbd" => "application/vnd.powerbuilder6",
-
".pbm" => "image/x-portable-bitmap",
-
".pcl" => "application/vnd.hp-pcl",
-
".pclxl" => "application/vnd.hp-pclxl",
-
".pcx" => "image/x-pcx",
-
".pdb" => "chemical/x-pdb",
-
".pdf" => "application/pdf",
-
".pem" => "application/x-x509-ca-cert",
-
".pfr" => "application/font-tdpfr",
-
".pgm" => "image/x-portable-graymap",
-
".pgn" => "application/x-chess-pgn",
-
".pgp" => "application/pgp-encrypted",
-
".pic" => "image/x-pict",
-
".pict" => "image/pict",
-
".pkg" => "application/octet-stream",
-
".pki" => "application/pkixcmp",
-
".pkipath" => "application/pkix-pkipath",
-
".pl" => "text/x-script.perl",
-
".plb" => "application/vnd.3gpp.pic-bw-large",
-
".plc" => "application/vnd.mobius.plc",
-
".plf" => "application/vnd.pocketlearn",
-
".pls" => "application/pls+xml",
-
".pm" => "text/x-script.perl-module",
-
".pml" => "application/vnd.ctc-posml",
-
".png" => "image/png",
-
".pnm" => "image/x-portable-anymap",
-
".pntg" => "image/x-macpaint",
-
".portpkg" => "application/vnd.macports.portpkg",
-
".ppd" => "application/vnd.cups-ppd",
-
".ppm" => "image/x-portable-pixmap",
-
".pps" => "application/vnd.ms-powerpoint",
-
".ppt" => "application/vnd.ms-powerpoint",
-
".prc" => "application/vnd.palm",
-
".pre" => "application/vnd.lotus-freelance",
-
".prf" => "application/pics-rules",
-
".ps" => "application/postscript",
-
".psb" => "application/vnd.3gpp.pic-bw-small",
-
".psd" => "image/vnd.adobe.photoshop",
-
".ptid" => "application/vnd.pvi.ptid1",
-
".pub" => "application/x-mspublisher",
-
".pvb" => "application/vnd.3gpp.pic-bw-var",
-
".pwn" => "application/vnd.3m.post-it-notes",
-
".py" => "text/x-script.python",
-
".pya" => "audio/vnd.ms-playready.media.pya",
-
".pyv" => "video/vnd.ms-playready.media.pyv",
-
".qam" => "application/vnd.epson.quickanime",
-
".qbo" => "application/vnd.intu.qbo",
-
".qfx" => "application/vnd.intu.qfx",
-
".qps" => "application/vnd.publishare-delta-tree",
-
".qt" => "video/quicktime",
-
".qtif" => "image/x-quicktime",
-
".qxd" => "application/vnd.quark.quarkxpress",
-
".ra" => "audio/x-pn-realaudio",
-
".rake" => "text/x-script.ruby",
-
".ram" => "audio/x-pn-realaudio",
-
".rar" => "application/x-rar-compressed",
-
".ras" => "image/x-cmu-raster",
-
".rb" => "text/x-script.ruby",
-
".rcprofile" => "application/vnd.ipunplugged.rcprofile",
-
".rdf" => "application/rdf+xml",
-
".rdz" => "application/vnd.data-vision.rdz",
-
".rep" => "application/vnd.businessobjects",
-
".rgb" => "image/x-rgb",
-
".rif" => "application/reginfo+xml",
-
".rl" => "application/resource-lists+xml",
-
".rlc" => "image/vnd.fujixerox.edmics-rlc",
-
".rld" => "application/resource-lists-diff+xml",
-
".rm" => "application/vnd.rn-realmedia",
-
".rmp" => "audio/x-pn-realaudio-plugin",
-
".rms" => "application/vnd.jcp.javame.midlet-rms",
-
".rnc" => "application/relax-ng-compact-syntax",
-
".roff" => "text/troff",
-
".rpm" => "application/x-redhat-package-manager",
-
".rpss" => "application/vnd.nokia.radio-presets",
-
".rpst" => "application/vnd.nokia.radio-preset",
-
".rq" => "application/sparql-query",
-
".rs" => "application/rls-services+xml",
-
".rsd" => "application/rsd+xml",
-
".rss" => "application/rss+xml",
-
".rtf" => "application/rtf",
-
".rtx" => "text/richtext",
-
".ru" => "text/x-script.ruby",
-
".s" => "text/x-asm",
-
".saf" => "application/vnd.yamaha.smaf-audio",
-
".sbml" => "application/sbml+xml",
-
".sc" => "application/vnd.ibm.secure-container",
-
".scd" => "application/x-msschedule",
-
".scm" => "application/vnd.lotus-screencam",
-
".scq" => "application/scvp-cv-request",
-
".scs" => "application/scvp-cv-response",
-
".sdkm" => "application/vnd.solent.sdkm+xml",
-
".sdp" => "application/sdp",
-
".see" => "application/vnd.seemail",
-
".sema" => "application/vnd.sema",
-
".semd" => "application/vnd.semd",
-
".semf" => "application/vnd.semf",
-
".setpay" => "application/set-payment-initiation",
-
".setreg" => "application/set-registration-initiation",
-
".sfd" => "application/vnd.hydrostatix.sof-data",
-
".sfs" => "application/vnd.spotfire.sfs",
-
".sgm" => "text/sgml",
-
".sgml" => "text/sgml",
-
".sh" => "application/x-sh",
-
".shar" => "application/x-shar",
-
".shf" => "application/shf+xml",
-
".sig" => "application/pgp-signature",
-
".sit" => "application/x-stuffit",
-
".sitx" => "application/x-stuffitx",
-
".skp" => "application/vnd.koan",
-
".slt" => "application/vnd.epson.salt",
-
".smi" => "application/smil+xml",
-
".snd" => "audio/basic",
-
".so" => "application/octet-stream",
-
".spf" => "application/vnd.yamaha.smaf-phrase",
-
".spl" => "application/x-futuresplash",
-
".spot" => "text/vnd.in3d.spot",
-
".spp" => "application/scvp-vp-response",
-
".spq" => "application/scvp-vp-request",
-
".src" => "application/x-wais-source",
-
".srx" => "application/sparql-results+xml",
-
".sse" => "application/vnd.kodak-descriptor",
-
".ssf" => "application/vnd.epson.ssf",
-
".ssml" => "application/ssml+xml",
-
".stf" => "application/vnd.wt.stf",
-
".stk" => "application/hyperstudio",
-
".str" => "application/vnd.pg.format",
-
".sus" => "application/vnd.sus-calendar",
-
".sv4cpio" => "application/x-sv4cpio",
-
".sv4crc" => "application/x-sv4crc",
-
".svd" => "application/vnd.svd",
-
".svg" => "image/svg+xml",
-
".svgz" => "image/svg+xml",
-
".swf" => "application/x-shockwave-flash",
-
".swi" => "application/vnd.arastra.swi",
-
".t" => "text/troff",
-
".tao" => "application/vnd.tao.intent-module-archive",
-
".tar" => "application/x-tar",
-
".tbz" => "application/x-bzip-compressed-tar",
-
".tcap" => "application/vnd.3gpp2.tcap",
-
".tcl" => "application/x-tcl",
-
".tex" => "application/x-tex",
-
".texi" => "application/x-texinfo",
-
".texinfo" => "application/x-texinfo",
-
".text" => "text/plain",
-
".tif" => "image/tiff",
-
".tiff" => "image/tiff",
-
".tmo" => "application/vnd.tmobile-livetv",
-
".torrent" => "application/x-bittorrent",
-
".tpl" => "application/vnd.groove-tool-template",
-
".tpt" => "application/vnd.trid.tpt",
-
".tr" => "text/troff",
-
".tra" => "application/vnd.trueapp",
-
".trm" => "application/x-msterminal",
-
".tsv" => "text/tab-separated-values",
-
".ttf" => "application/octet-stream",
-
".twd" => "application/vnd.simtech-mindmapper",
-
".txd" => "application/vnd.genomatix.tuxedo",
-
".txf" => "application/vnd.mobius.txf",
-
".txt" => "text/plain",
-
".ufd" => "application/vnd.ufdl",
-
".umj" => "application/vnd.umajin",
-
".unityweb" => "application/vnd.unity",
-
".uoml" => "application/vnd.uoml+xml",
-
".uri" => "text/uri-list",
-
".ustar" => "application/x-ustar",
-
".utz" => "application/vnd.uiq.theme",
-
".uu" => "text/x-uuencode",
-
".vcd" => "application/x-cdlink",
-
".vcf" => "text/x-vcard",
-
".vcg" => "application/vnd.groove-vcard",
-
".vcs" => "text/x-vcalendar",
-
".vcx" => "application/vnd.vcx",
-
".vis" => "application/vnd.visionary",
-
".viv" => "video/vnd.vivo",
-
".vrml" => "model/vrml",
-
".vsd" => "application/vnd.visio",
-
".vsf" => "application/vnd.vsf",
-
".vtu" => "model/vnd.vtu",
-
".vxml" => "application/voicexml+xml",
-
".war" => "application/java-archive",
-
".wav" => "audio/x-wav",
-
".wax" => "audio/x-ms-wax",
-
".wbmp" => "image/vnd.wap.wbmp",
-
".wbs" => "application/vnd.criticaltools.wbs+xml",
-
".wbxml" => "application/vnd.wap.wbxml",
-
".webm" => "video/webm",
-
".wm" => "video/x-ms-wm",
-
".wma" => "audio/x-ms-wma",
-
".wmd" => "application/x-ms-wmd",
-
".wmf" => "application/x-msmetafile",
-
".wml" => "text/vnd.wap.wml",
-
".wmlc" => "application/vnd.wap.wmlc",
-
".wmls" => "text/vnd.wap.wmlscript",
-
".wmlsc" => "application/vnd.wap.wmlscriptc",
-
".wmv" => "video/x-ms-wmv",
-
".wmx" => "video/x-ms-wmx",
-
".wmz" => "application/x-ms-wmz",
-
".woff" => "application/font-woff",
-
".woff2" => "application/font-woff2",
-
".wpd" => "application/vnd.wordperfect",
-
".wpl" => "application/vnd.ms-wpl",
-
".wps" => "application/vnd.ms-works",
-
".wqd" => "application/vnd.wqd",
-
".wri" => "application/x-mswrite",
-
".wrl" => "model/vrml",
-
".wsdl" => "application/wsdl+xml",
-
".wspolicy" => "application/wspolicy+xml",
-
".wtb" => "application/vnd.webturbo",
-
".wvx" => "video/x-ms-wvx",
-
".x3d" => "application/vnd.hzn-3d-crossword",
-
".xar" => "application/vnd.xara",
-
".xbd" => "application/vnd.fujixerox.docuworks.binder",
-
".xbm" => "image/x-xbitmap",
-
".xdm" => "application/vnd.syncml.dm+xml",
-
".xdp" => "application/vnd.adobe.xdp+xml",
-
".xdw" => "application/vnd.fujixerox.docuworks",
-
".xenc" => "application/xenc+xml",
-
".xer" => "application/patch-ops-error+xml",
-
".xfdf" => "application/vnd.adobe.xfdf",
-
".xfdl" => "application/vnd.xfdl",
-
".xhtml" => "application/xhtml+xml",
-
".xif" => "image/vnd.xiff",
-
".xls" => "application/vnd.ms-excel",
-
".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
-
".xml" => "application/xml",
-
".xo" => "application/vnd.olpc-sugar",
-
".xop" => "application/xop+xml",
-
".xpm" => "image/x-xpixmap",
-
".xpr" => "application/vnd.is-xpr",
-
".xps" => "application/vnd.ms-xpsdocument",
-
".xpw" => "application/vnd.intercon.formnet",
-
".xsl" => "application/xml",
-
".xslt" => "application/xslt+xml",
-
".xsm" => "application/vnd.syncml+xml",
-
".xspf" => "application/xspf+xml",
-
".xul" => "application/vnd.mozilla.xul+xml",
-
".xwd" => "image/x-xwindowdump",
-
".xyz" => "chemical/x-xyz",
-
".yaml" => "text/yaml",
-
".yml" => "text/yaml",
-
".zaz" => "application/vnd.zzazz.deck+xml",
-
".zip" => "application/zip",
-
".zmm" => "application/vnd.handheld-entertainment+xml",
-
}
-
end
-
end
-
1
require 'uri'
-
1
require 'stringio'
-
1
require 'rack'
-
1
require 'rack/lint'
-
1
require 'rack/utils'
-
1
require 'rack/response'
-
-
1
module Rack
-
# Rack::MockRequest helps testing your Rack application without
-
# actually using HTTP.
-
#
-
# After performing a request on a URL with get/post/put/patch/delete, it
-
# returns a MockResponse with useful helper methods for effective
-
# testing.
-
#
-
# You can pass a hash with additional configuration to the
-
# get/post/put/patch/delete.
-
# <tt>:input</tt>:: A String or IO-like to be used as rack.input.
-
# <tt>:fatal</tt>:: Raise a FatalWarning if the app writes to rack.errors.
-
# <tt>:lint</tt>:: If true, wrap the application in a Rack::Lint.
-
-
1
class MockRequest
-
1
class FatalWarning < RuntimeError
-
end
-
-
1
class FatalWarner
-
1
def puts(warning)
-
raise FatalWarning, warning
-
end
-
-
1
def write(warning)
-
raise FatalWarning, warning
-
end
-
-
1
def flush
-
end
-
-
1
def string
-
""
-
end
-
end
-
-
1
DEFAULT_ENV = {
-
"rack.version" => Rack::VERSION,
-
"rack.input" => StringIO.new,
-
"rack.errors" => StringIO.new,
-
"rack.multithread" => true,
-
"rack.multiprocess" => true,
-
"rack.run_once" => false,
-
}
-
-
1
def initialize(app)
-
@app = app
-
end
-
-
1
def get(uri, opts={}) request("GET", uri, opts) end
-
1
def post(uri, opts={}) request("POST", uri, opts) end
-
1
def put(uri, opts={}) request("PUT", uri, opts) end
-
1
def patch(uri, opts={}) request("PATCH", uri, opts) end
-
1
def delete(uri, opts={}) request("DELETE", uri, opts) end
-
1
def head(uri, opts={}) request("HEAD", uri, opts) end
-
1
def options(uri, opts={}) request("OPTIONS", uri, opts) end
-
-
1
def request(method="GET", uri="", opts={})
-
env = self.class.env_for(uri, opts.merge(:method => method))
-
-
if opts[:lint]
-
app = Rack::Lint.new(@app)
-
else
-
app = @app
-
end
-
-
errors = env["rack.errors"]
-
status, headers, body = app.call(env)
-
MockResponse.new(status, headers, body, errors)
-
ensure
-
body.close if body.respond_to?(:close)
-
end
-
-
# For historical reasons, we're pinning to RFC 2396. It's easier for users
-
# and we get support from ruby 1.8 to 2.2 using this method.
-
1
def self.parse_uri_rfc2396(uri)
-
33
@parser ||= defined?(URI::RFC2396_Parser) ? URI::RFC2396_Parser.new : URI
-
33
@parser.parse(uri)
-
end
-
-
# Return the Rack environment used for a request to +uri+.
-
1
def self.env_for(uri="", opts={})
-
33
uri = parse_uri_rfc2396(uri)
-
33
uri.path = "/#{uri.path}" unless uri.path[0] == ?/
-
-
33
env = DEFAULT_ENV.dup
-
-
33
env[REQUEST_METHOD] = opts[:method] ? opts[:method].to_s.upcase : "GET"
-
33
env["SERVER_NAME"] = uri.host || "example.org"
-
33
env["SERVER_PORT"] = uri.port ? uri.port.to_s : "80"
-
33
env[QUERY_STRING] = uri.query.to_s
-
33
env[PATH_INFO] = (!uri.path || uri.path.empty?) ? "/" : uri.path
-
33
env["rack.url_scheme"] = uri.scheme || "http"
-
33
env["HTTPS"] = env["rack.url_scheme"] == "https" ? "on" : "off"
-
-
33
env[SCRIPT_NAME] = opts[:script_name] || ""
-
-
33
if opts[:fatal]
-
env["rack.errors"] = FatalWarner.new
-
else
-
33
env["rack.errors"] = StringIO.new
-
end
-
-
33
if params = opts[:params]
-
if env[REQUEST_METHOD] == "GET"
-
params = Utils.parse_nested_query(params) if params.is_a?(String)
-
params.update(Utils.parse_nested_query(env[QUERY_STRING]))
-
env[QUERY_STRING] = Utils.build_nested_query(params)
-
elsif !opts.has_key?(:input)
-
opts["CONTENT_TYPE"] = "application/x-www-form-urlencoded"
-
if params.is_a?(Hash)
-
if data = Utils::Multipart.build_multipart(params)
-
opts[:input] = data
-
opts["CONTENT_LENGTH"] ||= data.length.to_s
-
opts["CONTENT_TYPE"] = "multipart/form-data; boundary=#{Utils::Multipart::MULTIPART_BOUNDARY}"
-
else
-
opts[:input] = Utils.build_nested_query(params)
-
end
-
else
-
opts[:input] = params
-
end
-
end
-
end
-
-
33
empty_str = ""
-
33
empty_str.force_encoding("ASCII-8BIT") if empty_str.respond_to? :force_encoding
-
33
opts[:input] ||= empty_str
-
33
if String === opts[:input]
-
33
rack_input = StringIO.new(opts[:input])
-
else
-
rack_input = opts[:input]
-
end
-
-
33
rack_input.set_encoding(Encoding::BINARY) if rack_input.respond_to?(:set_encoding)
-
33
env['rack.input'] = rack_input
-
-
33
env["CONTENT_LENGTH"] ||= env["rack.input"].length.to_s
-
-
33
opts.each { |field, value|
-
160
env[field] = value if String === field
-
}
-
-
33
env
-
end
-
end
-
-
# Rack::MockResponse provides useful helpers for testing your apps.
-
# Usually, you don't create the MockResponse on your own, but use
-
# MockRequest.
-
-
1
class MockResponse < Rack::Response
-
# Headers
-
1
attr_reader :original_headers
-
-
# Errors
-
1
attr_accessor :errors
-
-
1
def initialize(status, headers, body, errors=StringIO.new(""))
-
23
@original_headers = headers
-
23
@errors = errors.string if errors.respond_to?(:string)
-
23
@body_string = nil
-
-
23
super(body, status, headers)
-
end
-
-
1
def =~(other)
-
body =~ other
-
end
-
-
1
def match(other)
-
body.match other
-
end
-
-
1
def body
-
# FIXME: apparently users of MockResponse expect the return value of
-
# MockResponse#body to be a string. However, the real response object
-
# returns the body as a list.
-
#
-
# See spec_showstatus.rb:
-
#
-
# should "not replace existing messages" do
-
# ...
-
# res.body.should == "foo!"
-
# end
-
21
super.join
-
end
-
-
1
def empty?
-
[201, 204, 205, 304].include? status
-
end
-
end
-
end
-
1
module Rack
-
# Sets an "X-Runtime" response header, indicating the response
-
# time of the request, in seconds
-
#
-
# You can put it right before the application to see the processing
-
# time, or before all the other middlewares to include time for them,
-
# too.
-
1
class Runtime
-
1
def initialize(app, name = nil)
-
1
@app = app
-
1
@header_name = "X-Runtime"
-
1
@header_name << "-#{name}" if name
-
end
-
-
1
FORMAT_STRING = "%0.6f"
-
1
def call(env)
-
23
start_time = clock_time
-
23
status, headers, body = @app.call(env)
-
23
request_time = clock_time - start_time
-
-
23
if !headers.has_key?(@header_name)
-
23
headers[@header_name] = FORMAT_STRING % request_time
-
end
-
-
23
[status, headers, body]
-
end
-
-
1
private
-
-
1
if defined?(Process::CLOCK_MONOTONIC)
-
1
def clock_time
-
46
Process.clock_gettime(Process::CLOCK_MONOTONIC)
-
end
-
else
-
def clock_time
-
Time.now.to_f
-
end
-
end
-
end
-
end
-
1
require 'rack/file'
-
1
require 'rack/body_proxy'
-
-
1
module Rack
-
-
# = Sendfile
-
#
-
# The Sendfile middleware intercepts responses whose body is being
-
# served from a file and replaces it with a server specific X-Sendfile
-
# header. The web server is then responsible for writing the file contents
-
# to the client. This can dramatically reduce the amount of work required
-
# by the Ruby backend and takes advantage of the web server's optimized file
-
# delivery code.
-
#
-
# In order to take advantage of this middleware, the response body must
-
# respond to +to_path+ and the request must include an X-Sendfile-Type
-
# header. Rack::File and other components implement +to_path+ so there's
-
# rarely anything you need to do in your application. The X-Sendfile-Type
-
# header is typically set in your web servers configuration. The following
-
# sections attempt to document
-
#
-
# === Nginx
-
#
-
# Nginx supports the X-Accel-Redirect header. This is similar to X-Sendfile
-
# but requires parts of the filesystem to be mapped into a private URL
-
# hierarchy.
-
#
-
# The following example shows the Nginx configuration required to create
-
# a private "/files/" area, enable X-Accel-Redirect, and pass the special
-
# X-Sendfile-Type and X-Accel-Mapping headers to the backend:
-
#
-
# location ~ /files/(.*) {
-
# internal;
-
# alias /var/www/$1;
-
# }
-
#
-
# location / {
-
# proxy_redirect off;
-
#
-
# proxy_set_header Host $host;
-
# proxy_set_header X-Real-IP $remote_addr;
-
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
#
-
# proxy_set_header X-Sendfile-Type X-Accel-Redirect;
-
# proxy_set_header X-Accel-Mapping /var/www/=/files/;
-
#
-
# proxy_pass http://127.0.0.1:8080/;
-
# }
-
#
-
# Note that the X-Sendfile-Type header must be set exactly as shown above.
-
# The X-Accel-Mapping header should specify the location on the file system,
-
# followed by an equals sign (=), followed name of the private URL pattern
-
# that it maps to. The middleware performs a simple substitution on the
-
# resulting path.
-
#
-
# See Also: http://wiki.codemongers.com/NginxXSendfile
-
#
-
# === lighttpd
-
#
-
# Lighttpd has supported some variation of the X-Sendfile header for some
-
# time, although only recent version support X-Sendfile in a reverse proxy
-
# configuration.
-
#
-
# $HTTP["host"] == "example.com" {
-
# proxy-core.protocol = "http"
-
# proxy-core.balancer = "round-robin"
-
# proxy-core.backends = (
-
# "127.0.0.1:8000",
-
# "127.0.0.1:8001",
-
# ...
-
# )
-
#
-
# proxy-core.allow-x-sendfile = "enable"
-
# proxy-core.rewrite-request = (
-
# "X-Sendfile-Type" => (".*" => "X-Sendfile")
-
# )
-
# }
-
#
-
# See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore
-
#
-
# === Apache
-
#
-
# X-Sendfile is supported under Apache 2.x using a separate module:
-
#
-
# https://tn123.org/mod_xsendfile/
-
#
-
# Once the module is compiled and installed, you can enable it using
-
# XSendFile config directive:
-
#
-
# RequestHeader Set X-Sendfile-Type X-Sendfile
-
# ProxyPassReverse / http://localhost:8001/
-
# XSendFile on
-
#
-
# === Mapping parameter
-
#
-
# The third parameter allows for an overriding extension of the
-
# X-Accel-Mapping header. Mappings should be provided in tuples of internal to
-
# external. The internal values may contain regular expression syntax, they
-
# will be matched with case indifference.
-
-
1
class Sendfile
-
1
F = ::File
-
-
1
def initialize(app, variation=nil, mappings=[])
-
1
@app = app
-
1
@variation = variation
-
1
@mappings = mappings.map do |internal, external|
-
[/^#{internal}/i, external]
-
end
-
end
-
-
1
def call(env)
-
23
status, headers, body = @app.call(env)
-
23
if body.respond_to?(:to_path)
-
case type = variation(env)
-
when 'X-Accel-Redirect'
-
path = F.expand_path(body.to_path)
-
if url = map_accel_path(env, path)
-
headers[CONTENT_LENGTH] = '0'
-
headers[type] = url
-
obody = body
-
body = Rack::BodyProxy.new([]) do
-
obody.close if obody.respond_to?(:close)
-
end
-
else
-
env['rack.errors'].puts "X-Accel-Mapping header missing"
-
end
-
when 'X-Sendfile', 'X-Lighttpd-Send-File'
-
path = F.expand_path(body.to_path)
-
headers[CONTENT_LENGTH] = '0'
-
headers[type] = path
-
obody = body
-
body = Rack::BodyProxy.new([]) do
-
obody.close if obody.respond_to?(:close)
-
end
-
when '', nil
-
else
-
env['rack.errors'].puts "Unknown x-sendfile variation: '#{type}'.\n"
-
end
-
end
-
23
[status, headers, body]
-
end
-
-
1
private
-
1
def variation(env)
-
@variation ||
-
env['sendfile.type'] ||
-
env['HTTP_X_SENDFILE_TYPE']
-
end
-
-
1
def map_accel_path(env, path)
-
if mapping = @mappings.find { |internal,_| internal =~ path }
-
path.sub(*mapping)
-
elsif mapping = env['HTTP_X_ACCEL_MAPPING']
-
internal, external = mapping.split('=', 2).map{ |p| p.strip }
-
path.sub(/^#{internal}/i, external)
-
end
-
end
-
end
-
end
-
1
require 'openssl'
-
1
require 'zlib'
-
1
require 'rack/request'
-
1
require 'rack/response'
-
1
require 'rack/session/abstract/id'
-
-
1
module Rack
-
-
1
module Session
-
-
# Rack::Session::Cookie provides simple cookie based session management.
-
# By default, the session is a Ruby Hash stored as base64 encoded marshalled
-
# data set to :key (default: rack.session). The object that encodes the
-
# session data is configurable and must respond to +encode+ and +decode+.
-
# Both methods must take a string and return a string.
-
#
-
# When the secret key is set, cookie data is checked for data integrity.
-
# The old secret key is also accepted and allows graceful secret rotation.
-
#
-
# Example:
-
#
-
# use Rack::Session::Cookie, :key => 'rack.session',
-
# :domain => 'foo.com',
-
# :path => '/',
-
# :expire_after => 2592000,
-
# :secret => 'change_me',
-
# :old_secret => 'also_change_me'
-
#
-
# All parameters are optional.
-
#
-
# Example of a cookie with no encoding:
-
#
-
# Rack::Session::Cookie.new(application, {
-
# :coder => Rack::Session::Cookie::Identity.new
-
# })
-
#
-
# Example of a cookie with custom encoding:
-
#
-
# Rack::Session::Cookie.new(application, {
-
# :coder => Class.new {
-
# def encode(str); str.reverse; end
-
# def decode(str); str.reverse; end
-
# }.new
-
# })
-
#
-
-
1
class Cookie < Abstract::ID
-
# Encode session cookies as Base64
-
1
class Base64
-
1
def encode(str)
-
[str].pack('m')
-
end
-
-
1
def decode(str)
-
str.unpack('m').first
-
end
-
-
# Encode session cookies as Marshaled Base64 data
-
1
class Marshal < Base64
-
1
def encode(str)
-
super(::Marshal.dump(str))
-
end
-
-
1
def decode(str)
-
return unless str
-
::Marshal.load(super(str)) rescue nil
-
end
-
end
-
-
# N.B. Unlike other encoding methods, the contained objects must be a
-
# valid JSON composite type, either a Hash or an Array.
-
1
class JSON < Base64
-
1
def encode(obj)
-
super(::Rack::Utils::OkJson.encode(obj))
-
end
-
-
1
def decode(str)
-
return unless str
-
::Rack::Utils::OkJson.decode(super(str)) rescue nil
-
end
-
end
-
-
1
class ZipJSON < Base64
-
1
def encode(obj)
-
super(Zlib::Deflate.deflate(::Rack::Utils::OkJson.encode(obj)))
-
end
-
-
1
def decode(str)
-
return unless str
-
::Rack::Utils::OkJson.decode(Zlib::Inflate.inflate(super(str)))
-
rescue
-
nil
-
end
-
end
-
end
-
-
# Use no encoding for session cookies
-
1
class Identity
-
1
def encode(str); str; end
-
1
def decode(str); str; end
-
end
-
-
1
attr_reader :coder
-
-
1
def initialize(app, options={})
-
@secrets = options.values_at(:secret, :old_secret).compact
-
warn <<-MSG unless @secrets.size >= 1
-
SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
-
This poses a security threat. It is strongly recommended that you
-
provide a secret to prevent exploits that may be possible from crafted
-
cookies. This will not be supported in future versions of Rack, and
-
future versions will even invalidate your existing user cookies.
-
-
Called from: #{caller[0]}.
-
MSG
-
@coder = options[:coder] ||= Base64::Marshal.new
-
super(app, options.merge!(:cookie_only => true))
-
end
-
-
1
private
-
-
1
def get_session(env, sid)
-
data = unpacked_cookie_data(env)
-
data = persistent_session_id!(data)
-
[data["session_id"], data]
-
end
-
-
1
def extract_session_id(env)
-
unpacked_cookie_data(env)["session_id"]
-
end
-
-
1
def unpacked_cookie_data(env)
-
env["rack.session.unpacked_cookie_data"] ||= begin
-
request = Rack::Request.new(env)
-
session_data = request.cookies[@key]
-
-
if @secrets.size > 0 && session_data
-
digest, session_data = session_data.reverse.split("--", 2)
-
digest.reverse! if digest
-
session_data.reverse! if session_data
-
session_data = nil unless digest_match?(session_data, digest)
-
end
-
-
coder.decode(session_data) || {}
-
end
-
end
-
-
1
def persistent_session_id!(data, sid=nil)
-
data ||= {}
-
data["session_id"] ||= sid || generate_sid
-
data
-
end
-
-
1
def set_session(env, session_id, session, options)
-
session = session.merge("session_id" => session_id)
-
session_data = coder.encode(session)
-
-
if @secrets.first
-
session_data << "--#{generate_hmac(session_data, @secrets.first)}"
-
end
-
-
if session_data.size > (4096 - @key.size)
-
env["rack.errors"].puts("Warning! Rack::Session::Cookie data size exceeds 4K.")
-
nil
-
else
-
session_data
-
end
-
end
-
-
1
def destroy_session(env, session_id, options)
-
# Nothing to do here, data is in the client
-
generate_sid unless options[:drop]
-
end
-
-
1
def digest_match?(data, digest)
-
return unless data && digest
-
@secrets.any? do |secret|
-
Rack::Utils.secure_compare(digest, generate_hmac(data, secret))
-
end
-
end
-
-
1
def generate_hmac(data, secret)
-
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA1.new, secret, data)
-
end
-
-
end
-
end
-
end
-
1
module Rack
-
# Rack::URLMap takes a hash mapping urls or paths to apps, and
-
# dispatches accordingly. Support for HTTP/1.1 host names exists if
-
# the URLs start with <tt>http://</tt> or <tt>https://</tt>.
-
#
-
# URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part
-
# relevant for dispatch is in the SCRIPT_NAME, and the rest in the
-
# PATH_INFO. This should be taken care of when you need to
-
# reconstruct the URL in order to create links.
-
#
-
# URLMap dispatches in such a way that the longest paths are tried
-
# first, since they are most specific.
-
-
1
class URLMap
-
1
NEGATIVE_INFINITY = -1.0 / 0.0
-
1
INFINITY = 1.0 / 0.0
-
-
1
def initialize(map = {})
-
1
remap(map)
-
end
-
-
1
def remap(map)
-
1
@mapping = map.map { |location, app|
-
1
if location =~ %r{\Ahttps?://(.*?)(/.*)}
-
host, location = $1, $2
-
else
-
1
host = nil
-
end
-
-
1
unless location[0] == ?/
-
raise ArgumentError, "paths need to start with /"
-
end
-
-
1
location = location.chomp('/')
-
1
match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", nil, 'n')
-
-
1
[host, location, match, app]
-
}.sort_by do |(host, location, _, _)|
-
1
[host ? -host.size : INFINITY, -location.size]
-
end
-
end
-
-
1
def call(env)
-
23
path = env[PATH_INFO]
-
23
script_name = env['SCRIPT_NAME']
-
23
hHost = env['HTTP_HOST']
-
23
sName = env['SERVER_NAME']
-
23
sPort = env['SERVER_PORT']
-
-
23
@mapping.each do |host, location, match, app|
-
unless casecmp?(hHost, host) \
-
|| casecmp?(sName, host) \
-
23
|| (!host && (casecmp?(hHost, sName) ||
-
casecmp?(hHost, sName+':'+sPort)))
-
next
-
end
-
-
23
next unless m = match.match(path.to_s)
-
-
23
rest = m[1]
-
23
next unless !rest || rest.empty? || rest[0] == ?/
-
-
23
env['SCRIPT_NAME'] = (script_name + location)
-
23
env['PATH_INFO'] = rest
-
-
23
return app.call(env)
-
end
-
-
[404, {CONTENT_TYPE => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]]
-
-
ensure
-
23
env['PATH_INFO'] = path
-
23
env['SCRIPT_NAME'] = script_name
-
end
-
-
1
private
-
1
def casecmp?(v1, v2)
-
# if both nil, or they're the same string
-
69
return true if v1 == v2
-
-
# if either are nil... (but they're not the same)
-
46
return false if v1.nil?
-
46
return false if v2.nil?
-
-
# otherwise check they're not case-insensitive the same
-
v1.casecmp(v2).zero?
-
end
-
end
-
end
-
-
1
require 'active_support/dependencies/autoload'
-
1
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/html-scanner"
-
-
1
module HTML
-
1
extend ActiveSupport::Autoload
-
-
1
eager_autoload do
-
1
autoload :CDATA, 'html/node'
-
1
autoload :Document, 'html/document'
-
1
autoload :FullSanitizer, 'html/sanitizer'
-
1
autoload :LinkSanitizer, 'html/sanitizer'
-
1
autoload :Node, 'html/node'
-
1
autoload :Sanitizer, 'html/sanitizer'
-
1
autoload :Selector, 'html/selector'
-
1
autoload :Tag, 'html/node'
-
1
autoload :Text, 'html/node'
-
1
autoload :Tokenizer, 'html/tokenizer'
-
1
autoload :Version, 'html/version'
-
1
autoload :WhiteListSanitizer, 'html/sanitizer'
-
end
-
end
-
1
require 'rails/dom/testing/assertions'
-
1
require 'active_support/concern'
-
1
require 'nokogiri'
-
-
1
module Rails
-
1
module Dom
-
1
module Testing
-
1
module Assertions
-
1
autoload :DomAssertions, 'rails/dom/testing/assertions/dom_assertions'
-
1
autoload :SelectorAssertions, 'rails/dom/testing/assertions/selector_assertions'
-
1
autoload :TagAssertions, 'rails/dom/testing/assertions/tag_assertions'
-
-
1
extend ActiveSupport::Concern
-
-
1
include DomAssertions
-
1
include SelectorAssertions
-
1
include TagAssertions
-
end
-
end
-
end
-
end
-
1
module Rails
-
1
module Dom
-
1
module Testing
-
1
module Assertions
-
1
module DomAssertions
-
# \Test two HTML strings for equivalency (e.g., equal even when attributes are in another order)
-
#
-
# # assert that the referenced method generates the appropriate HTML string
-
# assert_dom_equal '<a href="http://www.example.com">Apples</a>', link_to("Apples", "http://www.example.com")
-
1
def assert_dom_equal(expected, actual, message = nil)
-
expected_dom, actual_dom = fragment(expected), fragment(actual)
-
message ||= "Expected: #{expected}\nActual: #{actual}"
-
assert compare_doms(expected_dom, actual_dom), message
-
end
-
-
# The negated form of +assert_dom_equal+.
-
#
-
# # assert that the referenced method does not generate the specified HTML string
-
# assert_dom_not_equal '<a href="http://www.example.com">Apples</a>', link_to("Oranges", "http://www.example.com")
-
1
def assert_dom_not_equal(expected, actual, message = nil)
-
expected_dom, actual_dom = fragment(expected), fragment(actual)
-
message ||= "Expected: #{expected}\nActual: #{actual}"
-
assert_not compare_doms(expected_dom, actual_dom), message
-
end
-
-
1
protected
-
-
1
def compare_doms(expected, actual)
-
return false unless expected.children.size == actual.children.size
-
-
expected.children.each_with_index do |child, i|
-
return false unless equal_children?(child, actual.children[i])
-
end
-
-
true
-
end
-
-
1
def equal_children?(child, other_child)
-
return false unless child.type == other_child.type
-
-
if child.element?
-
child.name == other_child.name &&
-
equal_attribute_nodes?(child.attribute_nodes, other_child.attribute_nodes) &&
-
compare_doms(child, other_child)
-
else
-
child.to_s == other_child.to_s
-
end
-
end
-
-
1
def equal_attribute_nodes?(nodes, other_nodes)
-
return false unless nodes.size == other_nodes.size
-
-
nodes = nodes.sort_by(&:name)
-
other_nodes = other_nodes.sort_by(&:name)
-
-
nodes.each_with_index do |attr, i|
-
return false unless equal_attribute?(attr, other_nodes[i])
-
end
-
-
true
-
end
-
-
1
def equal_attribute?(attr, other_attr)
-
attr.name == other_attr.name && attr.value == other_attr.value
-
end
-
-
1
private
-
-
1
def fragment(text)
-
Nokogiri::HTML::DocumentFragment.parse(text)
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/deprecation'
-
1
require 'rails/deprecated_sanitizer/html-scanner'
-
-
1
module Rails
-
1
module Dom
-
1
module Testing
-
1
module Assertions
-
# Pair of assertions to testing elements in the HTML output of the response.
-
1
module TagAssertions
-
# Asserts that there is a tag/node/element in the body of the response
-
# that meets all of the given conditions. The +conditions+ parameter must
-
# be a hash of any of the following keys (all are optional):
-
#
-
# * <tt>:tag</tt>: the node type must match the corresponding value
-
# * <tt>:attributes</tt>: a hash. The node's attributes must match the
-
# corresponding values in the hash.
-
# * <tt>:parent</tt>: a hash. The node's parent must match the
-
# corresponding hash.
-
# * <tt>:child</tt>: a hash. At least one of the node's immediate children
-
# must meet the criteria described by the hash.
-
# * <tt>:ancestor</tt>: a hash. At least one of the node's ancestors must
-
# meet the criteria described by the hash.
-
# * <tt>:descendant</tt>: a hash. At least one of the node's descendants
-
# must meet the criteria described by the hash.
-
# * <tt>:sibling</tt>: a hash. At least one of the node's siblings must
-
# meet the criteria described by the hash.
-
# * <tt>:after</tt>: a hash. The node must be after any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:before</tt>: a hash. The node must be before any sibling meeting
-
# the criteria described by the hash, and at least one sibling must match.
-
# * <tt>:children</tt>: a hash, for counting children of a node. Accepts
-
# the keys:
-
# * <tt>:count</tt>: either a number or a range which must equal (or
-
# include) the number of children that match.
-
# * <tt>:less_than</tt>: the number of matching children must be less
-
# than this number.
-
# * <tt>:greater_than</tt>: the number of matching children must be
-
# greater than this number.
-
# * <tt>:only</tt>: another hash consisting of the keys to use
-
# to match on the children, and only matching children will be
-
# counted.
-
# * <tt>:content</tt>: the textual content of the node must match the
-
# given value. This will not match HTML tags in the body of a
-
# tag--only text.
-
#
-
# Conditions are matched using the following algorithm:
-
#
-
# * if the condition is a string, it must be a substring of the value.
-
# * if the condition is a regexp, it must match the value.
-
# * if the condition is a number, the value must match number.to_s.
-
# * if the condition is +true+, the value must not be +nil+.
-
# * if the condition is +false+ or +nil+, the value must be +nil+.
-
#
-
# # Assert that there is a "span" tag
-
# assert_tag tag: "span"
-
#
-
# # Assert that there is a "span" tag with id="x"
-
# assert_tag tag: "span", attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" tag using the short-hand
-
# assert_tag :span
-
#
-
# # Assert that there is a "span" tag with id="x" using the short-hand
-
# assert_tag :span, attributes: { id: "x" }
-
#
-
# # Assert that there is a "span" inside of a "div"
-
# assert_tag tag: "span", parent: { tag: "div" }
-
#
-
# # Assert that there is a "span" somewhere inside a table
-
# assert_tag tag: "span", ancestor: { tag: "table" }
-
#
-
# # Assert that there is a "span" with at least one "em" child
-
# assert_tag tag: "span", child: { tag: "em" }
-
#
-
# # Assert that there is a "span" containing a (possibly nested)
-
# # "strong" tag.
-
# assert_tag tag: "span", descendant: { tag: "strong" }
-
#
-
# # Assert that there is a "span" containing between 2 and 4 "em" tags
-
# # as immediate children
-
# assert_tag tag: "span",
-
# children: { count: 2..4, only: { tag: "em" } }
-
#
-
# # Get funky: assert that there is a "div", with an "ul" ancestor
-
# # and an "li" parent (with "class" = "enum"), and containing a
-
# # "span" descendant that contains text matching /hello world/
-
# assert_tag tag: "div",
-
# ancestor: { tag: "ul" },
-
# parent: { tag: "li",
-
# attributes: { class: "enum" } },
-
# descendant: { tag: "span",
-
# child: /hello world/ }
-
#
-
# <b>Please note</b>: +assert_tag+ and +assert_no_tag+ only work
-
# with well-formed XHTML. They recognize a few tags as implicitly self-closing
-
# (like br and hr and such) but will not work correctly with tags
-
# that allow optional closing tags (p, li, td). <em>You must explicitly
-
# close all of your tags to use these assertions.</em>
-
1
def assert_tag(*opts)
-
ActiveSupport::Deprecation.warn("assert_tag is deprecated and will be removed at Rails 5. Use assert_select to get the same feature.")
-
-
opts = opts.size > 1 ? opts.last.merge({ tag: opts.first.to_s }) : opts.first
-
tag = _find_tag(opts)
-
-
assert tag, "expected tag, but no tag found matching #{opts.inspect} in:\n#{@response.body.inspect}"
-
end
-
-
# Identical to +assert_tag+, but asserts that a matching tag does _not_
-
# exist. (See +assert_tag+ for a full discussion of the syntax.)
-
#
-
# # Assert that there is not a "div" containing a "p"
-
# assert_no_tag tag: "div", descendant: { tag: "p" }
-
#
-
# # Assert that an unordered list is empty
-
# assert_no_tag tag: "ul", descendant: { tag: "li" }
-
#
-
# # Assert that there is not a "p" tag with between 1 to 3 "img" tags
-
# # as immediate children
-
# assert_no_tag tag: "p",
-
# children: { count: 1..3, only: { tag: "img" } }
-
1
def assert_no_tag(*opts)
-
ActiveSupport::Deprecation.warn("assert_no_tag is deprecated and will be removed at Rails 5. Use assert_select to get the same feature.")
-
-
opts = opts.size > 1 ? opts.last.merge({ tag: opts.first.to_s }) : opts.first
-
tag = _find_tag(opts)
-
-
assert !tag, "expected no tag, but found tag matching #{opts.inspect} in:\n#{@response.body.inspect}"
-
end
-
-
1
def find_tag(conditions)
-
ActiveSupport::Deprecation.warn("find_tag is deprecated and will be removed at Rails 5 without replacement.")
-
-
_find_tag(conditions)
-
end
-
-
1
def find_all_tag(conditions)
-
ActiveSupport::Deprecation.warn("find_all_tag is deprecated and will be removed at Rails 5 without replacement. Use assert_select to get the same feature.")
-
-
html_scanner_document.find_all(conditions)
-
end
-
-
1
private
-
1
def _find_tag(conditions)
-
html_scanner_document.find(conditions)
-
end
-
-
1
def html_scanner_document
-
xml = @response.content_type =~ /xml$/
-
@html_scanner_document ||= HTML::Document.new(@response.body, false, xml)
-
end
-
end
-
end
-
end
-
end
-
end
-
1
require "active_support/notifications"
-
1
require "active_support/dependencies"
-
1
require "active_support/deprecation"
-
1
require "active_support/descendants_tracker"
-
-
1
module Rails
-
1
class Application
-
1
module Bootstrap
-
1
include Initializable
-
-
1
initializer :load_environment_hook, group: :all do end
-
-
1
initializer :load_active_support, group: :all do
-
1
require "active_support/all" unless config.active_support.bare
-
end
-
-
1
initializer :set_eager_load, group: :all do
-
1
if config.eager_load.nil?
-
warn <<-INFO
-
config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
-
-
* development - set it to false
-
* test - set it to false (unless you use a tool that preloads your test environment)
-
* production - set it to true
-
-
INFO
-
config.eager_load = config.cache_classes
-
end
-
end
-
-
# Initialize the logger early in the stack in case we need to log some deprecation.
-
1
initializer :initialize_logger, group: :all do
-
1
Rails.logger ||= config.logger || begin
-
1
path = config.paths["log"].first
-
1
unless File.exist? File.dirname path
-
FileUtils.mkdir_p File.dirname path
-
end
-
-
1
f = File.open path, 'a'
-
1
f.binmode
-
1
f.sync = config.autoflush_log # if true make sure every write flushes
-
-
1
logger = ActiveSupport::Logger.new f
-
1
logger.formatter = config.log_formatter
-
1
logger = ActiveSupport::TaggedLogging.new(logger)
-
1
logger
-
rescue StandardError
-
logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDERR))
-
logger.level = ActiveSupport::Logger::WARN
-
logger.warn(
-
"Rails Error: Unable to access log file. Please ensure that #{path} exists and is writable " +
-
"(ie, make it writable for user and group: chmod 0664 #{path}). " +
-
"The log level has been raised to WARN and the output directed to STDERR until the problem is fixed."
-
)
-
logger
-
end
-
-
1
if Rails.env.production? && !config.has_explicit_log_level?
-
ActiveSupport::Deprecation.warn \
-
"You did not specify a `log_level` in `production.rb`. Currently, " \
-
"the default value for `log_level` is `:info` for the production " \
-
"environment and `:debug` in all other environments. In Rails 5 " \
-
"the default value will be unified to `:debug` across all " \
-
"environments. To preserve the current setting, add the following " \
-
"line to your `production.rb`:\n" \
-
"\n" \
-
" config.log_level = :info\n\n"
-
end
-
-
1
Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
-
end
-
-
# Initialize cache early in the stack so railties can make use of it.
-
1
initializer :initialize_cache, group: :all do
-
1
unless Rails.cache
-
1
Rails.cache = ActiveSupport::Cache.lookup_store(config.cache_store)
-
-
1
if Rails.cache.respond_to?(:middleware)
-
1
config.middleware.insert_before("Rack::Runtime", Rails.cache.middleware)
-
end
-
end
-
end
-
-
# Sets the dependency loading mechanism.
-
1
initializer :initialize_dependency_mechanism, group: :all do
-
1
ActiveSupport::Dependencies.mechanism = config.cache_classes ? :require : :load
-
end
-
-
1
initializer :bootstrap_hook, group: :all do |app|
-
1
ActiveSupport.run_load_hooks(:before_initialize, app)
-
end
-
end
-
end
-
end
-
1
module Rails
-
1
class Application
-
1
class DefaultMiddlewareStack
-
1
attr_reader :config, :paths, :app
-
-
1
def initialize(app, config, paths)
-
1
@app = app
-
1
@config = config
-
1
@paths = paths
-
end
-
-
1
def build_stack
-
1
ActionDispatch::MiddlewareStack.new.tap do |middleware|
-
1
if config.force_ssl
-
middleware.use ::ActionDispatch::SSL, config.ssl_options
-
end
-
-
1
middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
-
-
1
if config.serve_static_files
-
1
middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control
-
end
-
-
1
if rack_cache = load_rack_cache
-
require "action_dispatch/http/rack_cache"
-
middleware.use ::Rack::Cache, rack_cache
-
end
-
-
1
middleware.use ::Rack::Lock unless allow_concurrency?
-
1
middleware.use ::Rack::Runtime
-
1
middleware.use ::Rack::MethodOverride
-
1
middleware.use ::ActionDispatch::RequestId
-
-
# Must come after Rack::MethodOverride to properly log overridden methods
-
1
middleware.use ::Rails::Rack::Logger, config.log_tags
-
1
middleware.use ::ActionDispatch::ShowExceptions, show_exceptions_app
-
1
middleware.use ::ActionDispatch::DebugExceptions, app
-
1
middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies
-
-
1
unless config.cache_classes
-
middleware.use ::ActionDispatch::Reloader, lambda { reload_dependencies? }
-
end
-
-
1
middleware.use ::ActionDispatch::Callbacks
-
1
middleware.use ::ActionDispatch::Cookies
-
-
1
if config.session_store
-
1
if config.force_ssl && !config.session_options.key?(:secure)
-
config.session_options[:secure] = true
-
end
-
1
middleware.use config.session_store, config.session_options
-
1
middleware.use ::ActionDispatch::Flash
-
end
-
-
1
middleware.use ::ActionDispatch::ParamsParser
-
1
middleware.use ::Rack::Head
-
1
middleware.use ::Rack::ConditionalGet
-
1
middleware.use ::Rack::ETag, "no-cache"
-
end
-
end
-
-
1
private
-
-
1
def reload_dependencies?
-
config.reload_classes_only_on_change != true || app.reloaders.map(&:updated?).any?
-
end
-
-
1
def allow_concurrency?
-
1
if config.allow_concurrency.nil?
-
1
config.cache_classes && config.eager_load
-
else
-
config.allow_concurrency
-
end
-
end
-
-
1
def load_rack_cache
-
1
rack_cache = config.action_dispatch.rack_cache
-
1
return unless rack_cache
-
-
begin
-
require 'rack/cache'
-
rescue LoadError => error
-
error.message << ' Be sure to add rack-cache to your Gemfile'
-
raise
-
end
-
-
if rack_cache == true
-
{
-
metastore: "rails:/",
-
entitystore: "rails:/",
-
verbose: false
-
}
-
else
-
rack_cache
-
end
-
end
-
-
1
def show_exceptions_app
-
1
config.exceptions_app || ActionDispatch::PublicExceptions.new(Rails.public_path)
-
end
-
end
-
end
-
end
-
1
module Rails
-
1
class Application
-
1
module Finisher
-
1
include Initializable
-
-
1
initializer :add_generator_templates do
-
1
config.generators.templates.unshift(*paths["lib/templates"].existent)
-
end
-
-
1
initializer :ensure_autoload_once_paths_as_subset do
-
1
extra = ActiveSupport::Dependencies.autoload_once_paths -
-
ActiveSupport::Dependencies.autoload_paths
-
-
1
unless extra.empty?
-
abort <<-end_error
-
autoload_once_paths must be a subset of the autoload_paths.
-
Extra items in autoload_once_paths: #{extra * ','}
-
end_error
-
end
-
end
-
-
1
initializer :add_builtin_route do |app|
-
1
if Rails.env.development?
-
app.routes.append do
-
get '/rails/info/properties' => "rails/info#properties"
-
get '/rails/info/routes' => "rails/info#routes"
-
get '/rails/info' => "rails/info#index"
-
get '/' => "rails/welcome#index"
-
end
-
end
-
end
-
-
1
initializer :build_middleware_stack do
-
1
build_middleware_stack
-
end
-
-
1
initializer :define_main_app_helper do |app|
-
1
app.routes.define_mounted_helper(:main_app)
-
end
-
-
1
initializer :add_to_prepare_blocks do
-
1
config.to_prepare_blocks.each do |block|
-
ActionDispatch::Reloader.to_prepare(&block)
-
end
-
end
-
-
# This needs to happen before eager load so it happens
-
# in exactly the same point regardless of config.cache_classes
-
1
initializer :run_prepare_callbacks do
-
1
ActionDispatch::Reloader.prepare!
-
end
-
-
1
initializer :eager_load! do
-
1
if config.eager_load
-
ActiveSupport.run_load_hooks(:before_eager_load, self)
-
config.eager_load_namespaces.each(&:eager_load!)
-
end
-
end
-
-
# All initialization is done, including eager loading in production
-
1
initializer :finisher_hook do
-
1
ActiveSupport.run_load_hooks(:after_initialize, self)
-
end
-
-
# Set routes reload after the finisher hook to ensure routes added in
-
# the hook are taken into account.
-
1
initializer :set_routes_reloader_hook do
-
1
reloader = routes_reloader
-
1
reloader.execute_if_updated
-
1
self.reloaders << reloader
-
1
ActionDispatch::Reloader.to_prepare do
-
# We configure #execute rather than #execute_if_updated because if
-
# autoloaded constants are cleared we need to reload routes also in
-
# case any was used there, as in
-
#
-
# mount MailPreview => 'mail_view'
-
#
-
# This means routes are also reloaded if i18n is updated, which
-
# might not be necessary, but in order to be more precise we need
-
# some sort of reloaders dependency support, to be added.
-
reloader.execute
-
end
-
end
-
-
# Set clearing dependencies after the finisher hook to ensure paths
-
# added in the hook are taken into account.
-
1
initializer :set_clear_dependencies_hook, group: :all do
-
1
callback = lambda do
-
ActiveSupport::DescendantsTracker.clear
-
ActiveSupport::Dependencies.clear
-
end
-
-
1
if config.reload_classes_only_on_change
-
1
reloader = config.file_watcher.new(*watchable_args, &callback)
-
1
self.reloaders << reloader
-
-
# Prepend this callback to have autoloaded constants cleared before
-
# any other possible reloading, in case they need to autoload fresh
-
# constants.
-
1
ActionDispatch::Reloader.to_prepare(prepend: true) do
-
# In addition to changes detected by the file watcher, if routes
-
# or i18n have been updated we also need to clear constants,
-
# that's why we run #execute rather than #execute_if_updated, this
-
# callback has to clear autoloaded constants after any update.
-
reloader.execute
-
end
-
else
-
ActionDispatch::Reloader.to_cleanup(&callback)
-
end
-
end
-
end
-
end
-
end
-
1
require "active_support/core_ext/module/delegation"
-
-
1
module Rails
-
1
class Application
-
1
class RoutesReloader
-
1
attr_reader :route_sets, :paths
-
1
delegate :execute_if_updated, :execute, :updated?, to: :updater
-
-
1
def initialize
-
1
@paths = []
-
1
@route_sets = []
-
end
-
-
1
def reload!
-
1
clear!
-
1
load_paths
-
1
finalize!
-
ensure
-
1
revert
-
end
-
-
1
private
-
-
1
def updater
-
@updater ||= begin
-
2
updater = ActiveSupport::FileUpdateChecker.new(paths) { reload! }
-
1
updater.execute
-
1
updater
-
1
end
-
end
-
-
1
def clear!
-
1
route_sets.each do |routes|
-
2
routes.disable_clear_and_finalize = true
-
2
routes.clear!
-
end
-
end
-
-
1
def load_paths
-
3
paths.each { |path| load(path) }
-
end
-
-
1
def finalize!
-
1
route_sets.each do |routes|
-
2
routes.finalize!
-
end
-
end
-
-
1
def revert
-
1
route_sets.each do |routes|
-
2
routes.disable_clear_and_finalize = false
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/backtrace_cleaner'
-
-
1
module Rails
-
1
class BacktraceCleaner < ActiveSupport::BacktraceCleaner
-
1
APP_DIRS_PATTERN = /^\/?(app|config|lib|test)/
-
1
RENDER_TEMPLATE_PATTERN = /:in `_render_template_\w*'/
-
1
EMPTY_STRING = ''.freeze
-
1
SLASH = '/'.freeze
-
1
DOT_SLASH = './'.freeze
-
-
1
def initialize
-
1
super
-
1
@root = "#{Rails.root}/".freeze
-
1697
add_filter { |line| line.sub(@root, EMPTY_STRING) }
-
1697
add_filter { |line| line.sub(RENDER_TEMPLATE_PATTERN, EMPTY_STRING) }
-
1697
add_filter { |line| line.sub(DOT_SLASH, SLASH) } # for tests
-
-
1
add_gem_filters
-
1697
add_silencer { |line| line !~ APP_DIRS_PATTERN }
-
end
-
-
1
private
-
1
def add_gem_filters
-
3
gems_paths = (Gem.path | [Gem.default_dir]).map { |p| Regexp.escape(p) }
-
1
return if gems_paths.empty?
-
-
1
gems_regexp = %r{(#{gems_paths.join('|')})/gems/([^/]+)-([\w.]+)/(.*)}
-
1
gems_result = '\2 (\3) \4'.freeze
-
1697
add_filter { |line| line.sub(gems_regexp, gems_result) }
-
end
-
end
-
end
-
1
activesupport_path = File.expand_path('../../../../activesupport/lib', __FILE__)
-
1
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
-
-
1
require 'thor/group'
-
-
1
require 'active_support'
-
1
require 'active_support/core_ext/object/blank'
-
1
require 'active_support/core_ext/kernel/singleton_class'
-
1
require 'active_support/core_ext/array/extract_options'
-
1
require 'active_support/core_ext/hash/deep_merge'
-
1
require 'active_support/core_ext/module/attribute_accessors'
-
1
require 'active_support/core_ext/string/inflections'
-
-
1
module Rails
-
1
module Generators
-
1
autoload :Actions, 'rails/generators/actions'
-
1
autoload :ActiveModel, 'rails/generators/active_model'
-
1
autoload :Base, 'rails/generators/base'
-
1
autoload :Migration, 'rails/generators/migration'
-
1
autoload :NamedBase, 'rails/generators/named_base'
-
1
autoload :ResourceHelpers, 'rails/generators/resource_helpers'
-
1
autoload :TestCase, 'rails/generators/test_case'
-
-
1
mattr_accessor :namespace
-
-
1
DEFAULT_ALIASES = {
-
rails: {
-
actions: '-a',
-
orm: '-o',
-
javascripts: '-j',
-
javascript_engine: '-je',
-
resource_controller: '-c',
-
scaffold_controller: '-c',
-
stylesheets: '-y',
-
stylesheet_engine: '-se',
-
template_engine: '-e',
-
test_framework: '-t'
-
},
-
-
test_unit: {
-
fixture_replacement: '-r',
-
}
-
}
-
-
1
DEFAULT_OPTIONS = {
-
rails: {
-
assets: true,
-
force_plural: false,
-
helper: true,
-
integration_tool: nil,
-
javascripts: true,
-
javascript_engine: :js,
-
orm: false,
-
resource_controller: :controller,
-
resource_route: true,
-
scaffold_controller: :scaffold_controller,
-
stylesheets: true,
-
stylesheet_engine: :css,
-
test_framework: false,
-
template_engine: :erb
-
}
-
}
-
-
1
def self.configure!(config) #:nodoc:
-
no_color! unless config.colorize_logging
-
aliases.deep_merge! config.aliases
-
options.deep_merge! config.options
-
fallbacks.merge! config.fallbacks
-
templates_path.concat config.templates
-
templates_path.uniq!
-
hide_namespaces(*config.hidden_namespaces)
-
end
-
-
1
def self.templates_path #:nodoc:
-
@templates_path ||= []
-
end
-
-
1
def self.aliases #:nodoc:
-
@aliases ||= DEFAULT_ALIASES.dup
-
end
-
-
1
def self.options #:nodoc:
-
@options ||= DEFAULT_OPTIONS.dup
-
end
-
-
# Hold configured generators fallbacks. If a plugin developer wants a
-
# generator group to fallback to another group in case of missing generators,
-
# they can add a fallback.
-
#
-
# For example, shoulda is considered a test_framework and is an extension
-
# of test_unit. However, most part of shoulda generators are similar to
-
# test_unit ones.
-
#
-
# Shoulda then can tell generators to search for test_unit generators when
-
# some of them are not available by adding a fallback:
-
#
-
# Rails::Generators.fallbacks[:shoulda] = :test_unit
-
1
def self.fallbacks
-
@fallbacks ||= {}
-
end
-
-
# Remove the color from output.
-
1
def self.no_color!
-
1
Thor::Base.shell = Thor::Shell::Basic
-
end
-
-
# Track all generators subclasses.
-
1
def self.subclasses
-
@subclasses ||= []
-
end
-
-
# Rails finds namespaces similar to thor, it only adds one rule:
-
#
-
# Generators names must end with "_generator.rb". This is required because Rails
-
# looks in load paths and loads the generator just before it's going to be used.
-
#
-
# find_by_namespace :webrat, :rails, :integration
-
#
-
# Will search for the following generators:
-
#
-
# "rails:webrat", "webrat:integration", "webrat"
-
#
-
# Notice that "rails:generators:webrat" could be loaded as well, what
-
# Rails looks for is the first and last parts of the namespace.
-
1
def self.find_by_namespace(name, base=nil, context=nil) #:nodoc:
-
lookups = []
-
lookups << "#{base}:#{name}" if base
-
lookups << "#{name}:#{context}" if context
-
-
unless base || context
-
unless name.to_s.include?(?:)
-
lookups << "#{name}:#{name}"
-
lookups << "rails:#{name}"
-
end
-
lookups << "#{name}"
-
end
-
-
lookup(lookups)
-
-
namespaces = Hash[subclasses.map { |klass| [klass.namespace, klass] }]
-
-
lookups.each do |namespace|
-
klass = namespaces[namespace]
-
return klass if klass
-
end
-
-
invoke_fallbacks_for(name, base) || invoke_fallbacks_for(context, name)
-
end
-
-
# Receives a namespace, arguments and the behavior to invoke the generator.
-
# It's used as the default entry point for generate, destroy and update
-
# commands.
-
1
def self.invoke(namespace, args=ARGV, config={})
-
names = namespace.to_s.split(':')
-
if klass = find_by_namespace(names.pop, names.any? && names.join(':'))
-
args << "--help" if args.empty? && klass.arguments.any? { |a| a.required? }
-
klass.start(args, config)
-
else
-
options = sorted_groups.map(&:last).flatten
-
suggestions = options.sort_by {|suggested| levenshtein_distance(namespace.to_s, suggested) }.first(3)
-
msg = "Could not find generator '#{namespace}'. "
-
msg << "Maybe you meant #{ suggestions.map {|s| "'#{s}'"}.to_sentence(last_word_connector: " or ") }\n"
-
msg << "Run `rails generate --help` for more options."
-
puts msg
-
end
-
end
-
-
# Returns an array of generator namespaces that are hidden.
-
# Generator namespaces may be hidden for a variety of reasons.
-
# Some are aliased such as "rails:migration" and can be
-
# invoked with the shorter "migration", others are private to other generators
-
# such as "css:scaffold".
-
1
def self.hidden_namespaces
-
@hidden_namespaces ||= begin
-
orm = options[:rails][:orm]
-
test = options[:rails][:test_framework]
-
template = options[:rails][:template_engine]
-
css = options[:rails][:stylesheet_engine]
-
-
[
-
"rails",
-
"resource_route",
-
"#{orm}:migration",
-
"#{orm}:model",
-
"#{test}:controller",
-
"#{test}:helper",
-
"#{test}:integration",
-
"#{test}:mailer",
-
"#{test}:model",
-
"#{test}:scaffold",
-
"#{test}:view",
-
"#{template}:controller",
-
"#{template}:scaffold",
-
"#{template}:mailer",
-
"#{css}:scaffold",
-
"#{css}:assets",
-
"css:assets",
-
"css:scaffold"
-
]
-
end
-
end
-
-
1
class << self
-
1
def hide_namespaces(*namespaces)
-
hidden_namespaces.concat(namespaces)
-
end
-
1
alias hide_namespace hide_namespaces
-
end
-
-
# Show help message with available generators.
-
1
def self.help(command = 'generate')
-
puts "Usage: rails #{command} GENERATOR [args] [options]"
-
puts
-
puts "General options:"
-
puts " -h, [--help] # Print generator's options and usage"
-
puts " -p, [--pretend] # Run but do not make any changes"
-
puts " -f, [--force] # Overwrite files that already exist"
-
puts " -s, [--skip] # Skip files that already exist"
-
puts " -q, [--quiet] # Suppress status output"
-
puts
-
puts "Please choose a generator below."
-
puts
-
-
print_generators
-
end
-
-
1
def self.public_namespaces
-
lookup!
-
subclasses.map { |k| k.namespace }
-
end
-
-
1
def self.print_generators
-
sorted_groups.each { |b, n| print_list(b, n) }
-
end
-
-
1
def self.sorted_groups
-
namespaces = public_namespaces
-
namespaces.sort!
-
groups = Hash.new { |h,k| h[k] = [] }
-
namespaces.each do |namespace|
-
base = namespace.split(':').first
-
groups[base] << namespace
-
end
-
rails = groups.delete("rails")
-
rails.map! { |n| n.sub(/^rails:/, '') }
-
rails.delete("app")
-
rails.delete("plugin")
-
-
hidden_namespaces.each { |n| groups.delete(n.to_s) }
-
-
[["rails", rails]] + groups.sort.to_a
-
end
-
-
1
protected
-
-
# This code is based directly on the Text gem implementation
-
# Returns a value representing the "cost" of transforming str1 into str2
-
1
def self.levenshtein_distance str1, str2
-
s = str1
-
t = str2
-
n = s.length
-
m = t.length
-
-
return m if (0 == n)
-
return n if (0 == m)
-
-
d = (0..m).to_a
-
x = nil
-
-
str1.each_char.each_with_index do |char1,i|
-
e = i+1
-
-
str2.each_char.each_with_index do |char2,j|
-
cost = (char1 == char2) ? 0 : 1
-
x = [
-
d[j+1] + 1, # insertion
-
e + 1, # deletion
-
d[j] + cost # substitution
-
].min
-
d[j] = e
-
e = x
-
end
-
-
d[m] = x
-
end
-
-
return x
-
end
-
-
# Prints a list of generators.
-
1
def self.print_list(base, namespaces) #:nodoc:
-
namespaces = namespaces.reject do |n|
-
hidden_namespaces.include?(n)
-
end
-
-
return if namespaces.empty?
-
puts "#{base.camelize}:"
-
-
namespaces.each do |namespace|
-
puts(" #{namespace}")
-
end
-
-
puts
-
end
-
-
# Try fallbacks for the given base.
-
1
def self.invoke_fallbacks_for(name, base) #:nodoc:
-
return nil unless base && fallbacks[base.to_sym]
-
invoked_fallbacks = []
-
-
Array(fallbacks[base.to_sym]).each do |fallback|
-
next if invoked_fallbacks.include?(fallback)
-
invoked_fallbacks << fallback
-
-
klass = find_by_namespace(name, fallback)
-
return klass if klass
-
end
-
-
nil
-
end
-
-
# Receives namespaces in an array and tries to find matching generators
-
# in the load path.
-
1
def self.lookup(namespaces) #:nodoc:
-
paths = namespaces_to_paths(namespaces)
-
-
paths.each do |raw_path|
-
["rails/generators", "generators"].each do |base|
-
path = "#{base}/#{raw_path}_generator"
-
-
begin
-
require path
-
return
-
rescue LoadError => e
-
raise unless e.message =~ /#{Regexp.escape(path)}$/
-
rescue Exception => e
-
warn "[WARNING] Could not load generator #{path.inspect}. Error: #{e.message}.\n#{e.backtrace.join("\n")}"
-
end
-
end
-
end
-
end
-
-
# This will try to load any generator in the load path to show in help.
-
1
def self.lookup! #:nodoc:
-
$LOAD_PATH.each do |base|
-
Dir[File.join(base, "{rails/generators,generators}", "**", "*_generator.rb")].each do |path|
-
begin
-
path = path.sub("#{base}/", "")
-
require path
-
rescue Exception
-
# No problem
-
end
-
end
-
end
-
end
-
-
# Convert namespaces to paths by replacing ":" for "/" and adding
-
# an extra lookup. For example, "rails:model" should be searched
-
# in both: "rails/model/model_generator" and "rails/model_generator".
-
1
def self.namespaces_to_paths(namespaces) #:nodoc:
-
paths = []
-
namespaces.each do |namespace|
-
pieces = namespace.split(":")
-
paths << pieces.dup.push(pieces.last).join("/")
-
paths << pieces.join("/")
-
end
-
paths.uniq!
-
paths
-
end
-
end
-
end
-
1
require 'rails/generators'
-
1
require 'rails/generators/testing/behaviour'
-
1
require 'rails/generators/testing/setup_and_teardown'
-
1
require 'rails/generators/testing/assertions'
-
1
require 'fileutils'
-
-
1
module Rails
-
1
module Generators
-
# Disable color in output. Easier to debug.
-
1
no_color!
-
-
# This class provides a TestCase for testing generators. To setup, you need
-
# just to configure the destination and set which generator is being tested:
-
#
-
# class AppGeneratorTest < Rails::Generators::TestCase
-
# tests AppGenerator
-
# destination File.expand_path("../tmp", File.dirname(__FILE__))
-
# end
-
#
-
# If you want to ensure your destination root is clean before running each test,
-
# you can set a setup callback:
-
#
-
# class AppGeneratorTest < Rails::Generators::TestCase
-
# tests AppGenerator
-
# destination File.expand_path("../tmp", File.dirname(__FILE__))
-
# setup :prepare_destination
-
# end
-
1
class TestCase < ActiveSupport::TestCase
-
1
include Rails::Generators::Testing::Behaviour
-
1
include Rails::Generators::Testing::SetupAndTeardown
-
1
include Rails::Generators::Testing::Assertions
-
1
include FileUtils
-
-
end
-
end
-
end
-
1
require 'shellwords'
-
-
1
module Rails
-
1
module Generators
-
1
module Testing
-
1
module Assertions
-
# Asserts a given file exists. You need to supply an absolute path or a path relative
-
# to the configured destination:
-
#
-
# assert_file "config/environment.rb"
-
#
-
# You can also give extra arguments. If the argument is a regexp, it will check if the
-
# regular expression matches the given file content. If it's a string, it compares the
-
# file with the given string:
-
#
-
# assert_file "config/environment.rb", /initialize/
-
#
-
# Finally, when a block is given, it yields the file content:
-
#
-
# assert_file "app/controllers/products_controller.rb" do |controller|
-
# assert_instance_method :index, controller do |index|
-
# assert_match(/Product\.all/, index)
-
# end
-
# end
-
1
def assert_file(relative, *contents)
-
absolute = File.expand_path(relative, destination_root)
-
assert File.exist?(absolute), "Expected file #{relative.inspect} to exist, but does not"
-
-
read = File.read(absolute) if block_given? || !contents.empty?
-
yield read if block_given?
-
-
contents.each do |content|
-
case content
-
when String
-
assert_equal content, read
-
when Regexp
-
assert_match content, read
-
end
-
end
-
end
-
1
alias :assert_directory :assert_file
-
-
# Asserts a given file does not exist. You need to supply an absolute path or a
-
# path relative to the configured destination:
-
#
-
# assert_no_file "config/random.rb"
-
1
def assert_no_file(relative)
-
absolute = File.expand_path(relative, destination_root)
-
assert !File.exist?(absolute), "Expected file #{relative.inspect} to not exist, but does"
-
end
-
1
alias :assert_no_directory :assert_no_file
-
-
# Asserts a given migration exists. You need to supply an absolute path or a
-
# path relative to the configured destination:
-
#
-
# assert_migration "db/migrate/create_products.rb"
-
#
-
# This method manipulates the given path and tries to find any migration which
-
# matches the migration name. For example, the call above is converted to:
-
#
-
# assert_file "db/migrate/003_create_products.rb"
-
#
-
# Consequently, assert_migration accepts the same arguments has assert_file.
-
1
def assert_migration(relative, *contents, &block)
-
file_name = migration_file_name(relative)
-
assert file_name, "Expected migration #{relative} to exist, but was not found"
-
assert_file file_name, *contents, &block
-
end
-
-
# Asserts a given migration does not exist. You need to supply an absolute path or a
-
# path relative to the configured destination:
-
#
-
# assert_no_migration "db/migrate/create_products.rb"
-
1
def assert_no_migration(relative)
-
file_name = migration_file_name(relative)
-
assert_nil file_name, "Expected migration #{relative} to not exist, but found #{file_name}"
-
end
-
-
# Asserts the given class method exists in the given content. This method does not detect
-
# class methods inside (class << self), only class methods which starts with "self.".
-
# When a block is given, it yields the content of the method.
-
#
-
# assert_migration "db/migrate/create_products.rb" do |migration|
-
# assert_class_method :up, migration do |up|
-
# assert_match(/create_table/, up)
-
# end
-
# end
-
1
def assert_class_method(method, content, &block)
-
assert_instance_method "self.#{method}", content, &block
-
end
-
-
# Asserts the given method exists in the given content. When a block is given,
-
# it yields the content of the method.
-
#
-
# assert_file "app/controllers/products_controller.rb" do |controller|
-
# assert_instance_method :index, controller do |index|
-
# assert_match(/Product\.all/, index)
-
# end
-
# end
-
1
def assert_instance_method(method, content)
-
assert content =~ /(\s+)def #{method}(\(.+\))?(.*?)\n\1end/m, "Expected to have method #{method}"
-
yield $3.strip if block_given?
-
end
-
1
alias :assert_method :assert_instance_method
-
-
# Asserts the given attribute type gets translated to a field type
-
# properly:
-
#
-
# assert_field_type :date, :date_select
-
1
def assert_field_type(attribute_type, field_type)
-
assert_equal(field_type, create_generated_attribute(attribute_type).field_type)
-
end
-
-
# Asserts the given attribute type gets a proper default value:
-
#
-
# assert_field_default_value :string, "MyString"
-
1
def assert_field_default_value(attribute_type, value)
-
assert_equal(value, create_generated_attribute(attribute_type).default)
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/class/attribute'
-
1
require 'active_support/core_ext/module/delegation'
-
1
require 'active_support/core_ext/hash/reverse_merge'
-
1
require 'active_support/core_ext/kernel/reporting'
-
1
require 'active_support/concern'
-
1
require 'rails/generators'
-
-
1
module Rails
-
1
module Generators
-
1
module Testing
-
1
module Behaviour
-
1
extend ActiveSupport::Concern
-
-
1
included do
-
1
class_attribute :destination_root, :current_path, :generator_class, :default_arguments
-
-
# Generators frequently change the current path using +FileUtils.cd+.
-
# So we need to store the path at file load and revert back to it after each test.
-
1
self.current_path = File.expand_path(Dir.pwd)
-
1
self.default_arguments = []
-
end
-
-
1
module ClassMethods
-
# Sets which generator should be tested:
-
#
-
# tests AppGenerator
-
1
def tests(klass)
-
self.generator_class = klass
-
end
-
-
# Sets default arguments on generator invocation. This can be overwritten when
-
# invoking it.
-
#
-
# arguments %w(app_name --skip-active-record)
-
1
def arguments(array)
-
self.default_arguments = array
-
end
-
-
# Sets the destination of generator files:
-
#
-
# destination File.expand_path("../tmp", File.dirname(__FILE__))
-
1
def destination(path)
-
self.destination_root = path
-
end
-
end
-
-
# Runs the generator configured for this class. The first argument is an array like
-
# command line arguments:
-
#
-
# class AppGeneratorTest < Rails::Generators::TestCase
-
# tests AppGenerator
-
# destination File.expand_path("../tmp", File.dirname(__FILE__))
-
# setup :prepare_destination
-
#
-
# test "database.yml is not created when skipping Active Record" do
-
# run_generator %w(myapp --skip-active-record)
-
# assert_no_file "config/database.yml"
-
# end
-
# end
-
#
-
# You can provide a configuration hash as second argument. This method returns the output
-
# printed by the generator.
-
1
def run_generator(args=self.default_arguments, config={})
-
capture(:stdout) do
-
args += ['--skip-bundle'] unless args.include? '--dev'
-
self.generator_class.start(args, config.reverse_merge(destination_root: destination_root))
-
end
-
end
-
-
# Instantiate the generator.
-
1
def generator(args=self.default_arguments, options={}, config={})
-
@generator ||= self.generator_class.new(args, options, config.reverse_merge(destination_root: destination_root))
-
end
-
-
# Create a Rails::Generators::GeneratedAttribute by supplying the
-
# attribute type and, optionally, the attribute name:
-
#
-
# create_generated_attribute(:string, 'name')
-
1
def create_generated_attribute(attribute_type, name = 'test', index = nil)
-
Rails::Generators::GeneratedAttribute.parse([name, attribute_type, index].compact.join(':'))
-
end
-
-
1
protected
-
-
1
def destination_root_is_set? # :nodoc:
-
raise "You need to configure your Rails::Generators::TestCase destination root." unless destination_root
-
end
-
-
1
def ensure_current_path # :nodoc:
-
cd current_path
-
end
-
-
1
def prepare_destination # :nodoc:
-
rm_rf(destination_root)
-
mkdir_p(destination_root)
-
end
-
-
1
def migration_file_name(relative) # :nodoc:
-
absolute = File.expand_path(relative, destination_root)
-
dirname, file_name = File.dirname(absolute), File.basename(absolute).sub(/\.rb$/, '')
-
Dir.glob("#{dirname}/[0-9]*_*.rb").grep(/\d+_#{file_name}.rb$/).first
-
end
-
-
1
def capture(stream)
-
stream = stream.to_s
-
captured_stream = Tempfile.new(stream)
-
stream_io = eval("$#{stream}")
-
origin_stream = stream_io.dup
-
stream_io.reopen(captured_stream)
-
-
yield
-
-
stream_io.rewind
-
return captured_stream.read
-
ensure
-
captured_stream.close
-
captured_stream.unlink
-
stream_io.reopen(origin_stream)
-
end
-
end
-
end
-
end
-
end
-
1
module Rails
-
1
module Generators
-
1
module Testing
-
1
module SetupAndTeardown
-
1
def setup # :nodoc:
-
destination_root_is_set?
-
ensure_current_path
-
super
-
end
-
-
1
def teardown # :nodoc:
-
ensure_current_path
-
super
-
end
-
end
-
end
-
end
-
end
-
1
require 'active_support/core_ext/time/conversions'
-
1
require 'active_support/core_ext/object/blank'
-
1
require 'active_support/log_subscriber'
-
1
require 'action_dispatch/http/request'
-
1
require 'rack/body_proxy'
-
-
1
module Rails
-
1
module Rack
-
# Sets log tags, logs the request, calls the app, and flushes the logs.
-
1
class Logger < ActiveSupport::LogSubscriber
-
1
def initialize(app, taggers = nil)
-
1
@app = app
-
1
@taggers = taggers || []
-
end
-
-
1
def call(env)
-
23
request = ActionDispatch::Request.new(env)
-
-
23
if logger.respond_to?(:tagged)
-
46
logger.tagged(compute_tags(request)) { call_app(request, env) }
-
else
-
call_app(request, env)
-
end
-
end
-
-
1
protected
-
-
1
def call_app(request, env)
-
# Put some space between requests in development logs.
-
23
if development?
-
logger.debug ''
-
logger.debug ''
-
end
-
-
23
instrumenter = ActiveSupport::Notifications.instrumenter
-
23
instrumenter.start 'request.action_dispatch', request: request
-
46
logger.info { started_request_message(request) }
-
23
resp = @app.call(env)
-
46
resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
-
23
resp
-
rescue Exception
-
finish(request)
-
raise
-
ensure
-
23
ActiveSupport::LogSubscriber.flush_all!
-
end
-
-
# Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700
-
1
def started_request_message(request)
-
'Started %s "%s" for %s at %s' % [
-
request.request_method,
-
request.filtered_path,
-
request.ip,
-
23
Time.now.to_default_s ]
-
end
-
-
1
def compute_tags(request)
-
23
@taggers.collect do |tag|
-
case tag
-
when Proc
-
tag.call(request)
-
when Symbol
-
request.send(tag)
-
else
-
tag
-
end
-
end
-
end
-
-
1
private
-
-
1
def finish(request)
-
23
instrumenter = ActiveSupport::Notifications.instrumenter
-
23
instrumenter.finish 'request.action_dispatch', request: request
-
end
-
-
1
def development?
-
23
Rails.env.development?
-
end
-
-
1
def logger
-
69
Rails.logger
-
end
-
end
-
end
-
end
-
# Make double-sure the RAILS_ENV is not set to production,
-
# so fixtures aren't loaded into that environment
-
1
abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production?
-
-
1
require 'active_support/testing/autorun'
-
1
require 'active_support/test_case'
-
1
require 'action_controller'
-
1
require 'action_controller/test_case'
-
1
require 'action_dispatch/testing/integration'
-
1
require 'rails/generators/test_case'
-
-
# Config Rails backtrace in tests.
-
1
require 'rails/backtrace_cleaner'
-
1
if ENV["BACKTRACE"].nil?
-
1
Minitest.backtrace_filter = Rails.backtrace_cleaner
-
end
-
-
1
if defined?(ActiveRecord::Base)
-
1
ActiveRecord::Migration.maintain_test_schema!
-
-
1
class ActiveSupport::TestCase
-
1
include ActiveRecord::TestFixtures
-
1
self.fixture_path = "#{Rails.root}/test/fixtures/"
-
end
-
-
1
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
-
-
1
def create_fixtures(*fixture_set_names, &block)
-
FixtureSet.create_fixtures(ActiveSupport::TestCase.fixture_path, fixture_set_names, {}, &block)
-
end
-
end
-
-
1
class ActionController::TestCase
-
1
setup do
-
63
@routes = Rails.application.routes
-
end
-
end
-
-
1
class ActionDispatch::IntegrationTest
-
1
setup do
-
8
@routes = Rails.application.routes
-
end
-
end
-
1
module Responders
-
# Responder to automatically set flash messages based on I18n API. It checks for
-
# message based on the current action, but also allows defaults to be set, using
-
# the following order:
-
#
-
# flash.controller_name.action_name.status
-
# flash.actions.action_name.status
-
#
-
# So, if you have a CarsController, create action, it will check for:
-
#
-
# flash.cars.create.status
-
# flash.actions.create.status
-
#
-
# The statuses by default are :notice (when the object can be created, updated
-
# or destroyed with success) and :alert (when the object cannot be created
-
# or updated).
-
#
-
# On I18n, the resource_name given is available as interpolation option,
-
# this means you can set:
-
#
-
# flash:
-
# actions:
-
# create:
-
# notice: "Hooray! %{resource_name} was successfully created!"
-
#
-
# But sometimes, flash messages are not that simple. Going back
-
# to cars example, you might want to say the brand of the car when it's
-
# updated. Well, that's easy also:
-
#
-
# flash:
-
# cars:
-
# update:
-
# notice: "Hooray! You just tuned your %{car_brand}!"
-
#
-
# Since :car_name is not available for interpolation by default, you have
-
# to overwrite interpolation_options in your controller.
-
#
-
# def interpolation_options
-
# { :car_brand => @car.brand }
-
# end
-
#
-
# Then you will finally have:
-
#
-
# 'Hooray! You just tuned your Aston Martin!'
-
#
-
# If your controller is namespaced, for example Admin::CarsController,
-
# the messages will be checked in the following order:
-
#
-
# flash.admin.cars.create.status
-
# flash.admin.actions.create.status
-
# flash.cars.create.status
-
# flash.actions.create.status
-
#
-
# You can also have flash messages with embedded HTML. Just create a scope that
-
# ends with <tt>_html</tt> as the scopes below:
-
#
-
# flash.actions.create.notice_html
-
# flash.cars.create.notice_html
-
#
-
# == Options
-
#
-
# FlashResponder also accepts some options through respond_with API.
-
#
-
# * :flash - When set to false, no flash message is set.
-
#
-
# respond_with(@user, :flash => true)
-
#
-
# * :notice - Supply the message to be set if the record has no errors.
-
# * :alert - Supply the message to be set if the record has errors.
-
#
-
# respond_with(@user, :notice => "Hooray! Welcome!", :alert => "Woot! You failed.")
-
#
-
# * :flash_now - Sets the flash message using flash.now. Accepts true, :on_failure or :on_sucess.
-
#
-
# == Configure status keys
-
#
-
# As said previously, FlashResponder by default use :notice and :alert
-
# keys. You can change that by setting the status_keys:
-
#
-
# Responders::FlashResponder.flash_keys = [ :success, :failure ]
-
#
-
# However, the options :notice and :alert to respond_with are kept :notice
-
# and :alert.
-
#
-
1
module FlashResponder
-
1
class << self
-
1
attr_accessor :flash_keys, :namespace_lookup, :helper
-
end
-
-
1
self.flash_keys = [ :notice, :alert ]
-
1
self.namespace_lookup = false
-
1
self.helper = Object.new.extend(
-
ActionView::Helpers::TranslationHelper,
-
ActionView::Helpers::TagHelper
-
)
-
-
1
def initialize(controller, resources, options={})
-
super
-
@flash = options.delete(:flash)
-
@notice = options.delete(:notice)
-
@alert = options.delete(:alert)
-
@flash_now = options.delete(:flash_now) { :on_failure }
-
end
-
-
1
def to_html
-
set_flash_message! if set_flash_message?
-
super
-
end
-
-
1
def to_js
-
set_flash_message! if set_flash_message?
-
defined?(super) ? super : to_format
-
end
-
-
1
protected
-
-
1
def set_flash_message!
-
if has_errors?
-
status = Responders::FlashResponder.flash_keys.last
-
set_flash(status, @alert)
-
else
-
status = Responders::FlashResponder.flash_keys.first
-
set_flash(status, @notice)
-
end
-
-
return if controller.flash[status].present?
-
-
options = mount_i18n_options(status)
-
message = Responders::FlashResponder.helper.t options[:default].shift, options
-
set_flash(status, message)
-
end
-
-
1
def set_flash(key, value)
-
return if value.blank?
-
flash = controller.flash
-
flash = flash.now if set_flash_now?
-
flash[key] ||= value
-
end
-
-
1
def set_flash_now?
-
@flash_now == true || format == :js ||
-
(default_action && (has_errors? ? @flash_now == :on_failure : @flash_now == :on_success))
-
end
-
-
1
def set_flash_message? #:nodoc:
-
!get? && @flash != false
-
end
-
-
1
def mount_i18n_options(status) #:nodoc:
-
resource_name = if resource.class.respond_to?(:model_name)
-
resource.class.model_name.human
-
else
-
resource.class.name.underscore.humanize
-
end
-
-
options = {
-
:default => flash_defaults_by_namespace(status),
-
:resource_name => resource_name,
-
:downcase_resource_name => resource_name.downcase
-
}
-
-
if controller.respond_to?(:interpolation_options, true)
-
options.merge!(controller.send(:interpolation_options))
-
end
-
-
options
-
end
-
-
1
def flash_defaults_by_namespace(status) #:nodoc:
-
defaults = []
-
slices = controller.controller_path.split('/')
-
lookup = Responders::FlashResponder.namespace_lookup
-
-
begin
-
controller_scope = :"flash.#{slices.fill(controller.controller_name, -1).join('.')}.#{controller.action_name}.#{status}"
-
-
actions_scope = lookup ? slices.fill('actions', -1).join('.') : :actions
-
actions_scope = :"flash.#{actions_scope}.#{controller.action_name}.#{status}"
-
-
defaults << :"#{controller_scope}_html"
-
defaults << controller_scope
-
-
defaults << :"#{actions_scope}_html"
-
defaults << actions_scope
-
-
slices.shift
-
end while slices.size > 0 && lookup
-
-
defaults << ""
-
end
-
end
-
end
-
1
require 'ruby-progressbar/output'
-
1
require 'ruby-progressbar/outputs/tty'
-
1
require 'ruby-progressbar/outputs/non_tty'
-
1
require 'ruby-progressbar/timer'
-
1
require 'ruby-progressbar/progress'
-
1
require 'ruby-progressbar/throttle'
-
1
require 'ruby-progressbar/calculators/length'
-
1
require 'ruby-progressbar/calculators/running_average'
-
1
require 'ruby-progressbar/components'
-
1
require 'ruby-progressbar/format'
-
1
require 'ruby-progressbar/base'
-
-
1
class ProgressBar
-
1
def self.create(*args)
-
1
ProgressBar::Base.new(*args)
-
end
-
end
-
1
require 'forwardable'
-
-
1
class ProgressBar
-
1
class Base
-
1
extend Forwardable
-
-
1
def_delegators :output,
-
:clear,
-
:log,
-
:refresh
-
-
1
def_delegators :progressable,
-
:progress,
-
:total
-
-
1
def initialize(options = {})
-
1
self.autostart = options.fetch(:autostart, true)
-
1
self.autofinish = options.fetch(:autofinish, true)
-
1
self.finished = false
-
-
1
self.timer = Timer.new(options)
-
1
self.progressable = Progress.new(options)
-
-
1
options = options.merge(:timer => timer,
-
:progress => progressable)
-
-
1
self.title_comp = Components::Title.new(options)
-
1
self.bar = Components::Bar.new(options)
-
1
self.percentage = Components::Percentage.new(options)
-
1
self.rate = Components::Rate.new(options)
-
1
self.time = Components::Time.new(options)
-
-
1
self.output = Output.detect(options.merge(:bar => self))
-
1
@format = Format::String.new(output.resolve_format(options[:format]))
-
-
1
start :at => options[:starting_at] if autostart
-
end
-
-
1
def start(options = {})
-
1
clear
-
-
1
timer.start
-
1
update_progress(:start, options)
-
end
-
-
1
def finish
-
output.with_refresh do
-
self.finished = true
-
progressable.finish
-
timer.stop
-
1
end unless finished?
-
end
-
-
1
def pause
-
output.with_refresh { timer.pause } unless paused?
-
end
-
-
1
def stop
-
output.with_refresh { timer.stop } unless stopped?
-
end
-
-
1
def resume
-
output.with_refresh { timer.resume } if stopped?
-
end
-
-
1
def reset
-
output.with_refresh do
-
self.finished = false
-
progressable.reset
-
timer.reset
-
end
-
end
-
-
1
def stopped?
-
968
timer.stopped? || finished?
-
end
-
-
1
alias paused? stopped?
-
-
1
def finished?
-
1459
finished || (autofinish && progressable.finished?)
-
end
-
-
1
def started?
-
timer.started?
-
end
-
-
1
def decrement
-
update_progress(:decrement)
-
end
-
-
1
def increment
-
490
update_progress(:increment)
-
end
-
-
1
def progress=(new_progress)
-
update_progress(:progress=, new_progress)
-
end
-
-
1
def total=(new_total)
-
1
update_progress(:total=, new_total)
-
end
-
-
1
def progress_mark=(mark)
-
136
output.refresh_with_format_change { bar.progress_mark = mark }
-
end
-
-
1
def remainder_mark=(mark)
-
output.refresh_with_format_change { bar.remainder_mark = mark }
-
end
-
-
1
def title
-
title_comp.title
-
end
-
-
1
def title=(title)
-
output.refresh_with_format_change { title_comp.title = title }
-
end
-
-
1
def to_s(new_format = nil)
-
408
self.format = new_format if new_format
-
-
408
Format::Formatter.process(@format, output.length, self)
-
end
-
-
1
def inspect
-
"#<ProgressBar:#{progress}/#{total || 'unknown'}>"
-
end
-
-
1
def format=(other)
-
output.refresh_with_format_change do
-
@format = Format::String.new(other || output.default_format)
-
end
-
end
-
-
1
alias format format=
-
-
1
protected
-
-
1
attr_accessor :output,
-
:timer,
-
:progressable,
-
:title_comp,
-
:bar,
-
:percentage,
-
:rate,
-
:time,
-
:autostart,
-
:autofinish,
-
:finished
-
-
1
def update_progress(*args)
-
492
output.with_refresh do
-
492
progressable.__send__(*args)
-
492
timer.stop if finished?
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Calculators
-
1
class Length
-
1
attr_reader :length_override
-
1
attr_accessor :current_length
-
-
1
def initialize(options)
-
1
self.length_override = options[:length]
-
1
self.current_length = nil
-
end
-
-
1
def length
-
409
current_length || reset_length
-
end
-
-
1
def length_changed?
-
408
previous_length = current_length
-
408
self.current_length = calculate_length
-
-
408
previous_length != current_length
-
end
-
-
1
def calculate_length
-
409
length_override || terminal_width || 80
-
end
-
-
1
def reset_length
-
1
self.current_length = calculate_length
-
end
-
-
1
def length_override=(other)
-
1
@length_override ||= ENV['RUBY_PROGRESS_BAR_LENGTH'] || other
-
1
@length_override = @length_override.to_i if @length_override
-
end
-
-
1
private
-
-
# This code was copied and modified from Rake, available under MIT-LICENSE
-
# Copyright (c) 2003, 2004 Jim Weirich
-
1
def terminal_width
-
409
return 80 unless unix?
-
-
result = dynamic_width
-
(result < 20) ? 80 : result
-
rescue
-
80
-
end
-
-
# rubocop:disable Lint/DuplicateMethods
-
1
begin
-
1
require 'io/console'
-
-
1
def dynamic_width
-
_rows, columns = IO.console.winsize
-
columns
-
end
-
rescue LoadError
-
def dynamic_width
-
dynamic_width_stty.nonzero? || dynamic_width_tput
-
end
-
-
def dynamic_width_stty
-
`stty size 2>/dev/null`.split[1].to_i
-
end
-
-
def dynamic_width_tput
-
`tput cols 2>/dev/null`.to_i
-
end
-
end
-
-
1
def unix?
-
409
RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Calculators
-
1
class RunningAverage
-
1
def self.calculate(current_average, new_value_to_average, smoothing_factor)
-
492
new_value_to_average * (1.0 - smoothing_factor) + current_average * smoothing_factor
-
end
-
end
-
end
-
end
-
1
require 'ruby-progressbar/components/bar'
-
1
require 'ruby-progressbar/components/percentage'
-
1
require 'ruby-progressbar/components/rate'
-
1
require 'ruby-progressbar/components/time'
-
1
require 'ruby-progressbar/components/title'
-
###
-
# UPA = Unknown Progress Animation
-
#
-
1
class ProgressBar
-
1
module Components
-
1
class Bar
-
1
DEFAULT_PROGRESS_MARK = '='.freeze
-
1
DEFAULT_REMAINDER_MARK = ' '.freeze
-
1
DEFAULT_UPA_STEPS = ['=---', '-=--', '--=-', '---='].freeze
-
-
1
attr_accessor :progress_mark,
-
:remainder_mark,
-
:length,
-
:progress,
-
:upa_steps
-
-
1
def initialize(options = {})
-
1
self.upa_steps = options[:unknown_progress_animation_steps] || DEFAULT_UPA_STEPS
-
1
self.progress_mark = options[:progress_mark] || DEFAULT_PROGRESS_MARK
-
1
self.remainder_mark = options[:remainder_mark] || DEFAULT_REMAINDER_MARK
-
1
self.progress = options[:progress]
-
1
self.length = options[:length]
-
end
-
-
1
def to_s(options = { :format => :standard })
-
408
if progress.unknown?
-
1
unknown_string
-
407
elsif options[:format] == :standard
-
407
"#{standard_complete_string}#{incomplete_string}"
-
elsif options[:format] == :integrated_percentage
-
"#{integrated_percentage_complete_string}#{incomplete_string}"
-
end
-
end
-
-
1
private
-
-
1
def integrated_percentage_complete_string
-
return standard_complete_string if completed_length < 5
-
-
" #{progress.percentage_completed} ".to_s.center(completed_length, progress_mark)
-
end
-
-
1
def standard_complete_string
-
407
progress_mark * completed_length
-
end
-
-
1
def incomplete_string
-
407
remainder_mark * (length - completed_length)
-
end
-
-
1
def bar(length)
-
self.length = length
-
-
standard_complete_string
-
end
-
-
1
def complete_bar(length)
-
408
self.length = length
-
-
408
to_s
-
end
-
-
1
def unknown_string
-
1
unknown_frame_string = unknown_progress_frame * ((length / upa_steps.size) + 2)
-
-
1
unknown_frame_string[0, length]
-
end
-
-
1
def incomplete_space(length)
-
self.length = length
-
-
if progress.unknown?
-
unknown_string
-
else
-
incomplete_string
-
end
-
end
-
-
1
def bar_with_percentage(length)
-
self.length = length
-
-
integrated_percentage_complete_string
-
end
-
-
1
def completed_length
-
814
(length * progress.percentage_completed / 100).floor
-
end
-
-
1
def unknown_progress_frame
-
1
current_animation_step = progress.progress % upa_steps.size
-
-
1
upa_steps[current_animation_step]
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Components
-
1
class Percentage
-
1
attr_accessor :progress
-
-
1
def initialize(options = {})
-
1
self.progress = options[:progress]
-
end
-
-
1
private
-
-
1
def percentage
-
408
progress.percentage_completed
-
end
-
-
1
def justified_percentage
-
progress.percentage_completed.to_s.rjust(3)
-
end
-
-
1
def percentage_with_precision
-
progress.percentage_completed_with_precision
-
end
-
-
1
def justified_percentage_with_precision
-
progress.percentage_completed_with_precision.to_s.rjust(6)
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Components
-
1
class Rate
-
1
attr_accessor :rate_scale,
-
:started_at,
-
:stopped_at,
-
:timer,
-
:progress
-
-
1
def initialize(options = {})
-
1
self.rate_scale = options[:rate_scale] || lambda { |x| x }
-
1
self.started_at = nil
-
1
self.stopped_at = nil
-
1
self.timer = options[:timer]
-
1
self.progress = options[:progress]
-
end
-
-
1
private
-
-
1
def rate_of_change(format_string = '%i')
-
return 0 unless elapsed_seconds > 0
-
-
format_string % scaled_rate
-
end
-
-
1
def rate_of_change_with_precision
-
rate_of_change('%.2f')
-
end
-
-
1
def scaled_rate
-
rate_scale.call(base_rate)
-
end
-
-
1
def base_rate
-
progress.absolute / elapsed_seconds
-
end
-
-
1
def elapsed_seconds
-
timer.elapsed_whole_seconds.to_f
-
end
-
end
-
end
-
end
-
###
-
# OOB = 'Out of Bounds'
-
#
-
1
class ProgressBar
-
1
module Components
-
1
class Time
-
1
TIME_FORMAT = '%02d:%02d:%02d'.freeze
-
1
OOB_TIME_FORMATS = [:unknown, :friendly, nil].freeze
-
1
OOB_LIMIT_IN_HOURS = 99
-
1
OOB_UNKNOWN_TIME_TEXT = '??:??:??'.freeze
-
1
OOB_FRIENDLY_TIME_TEXT = '> 4 Days'.freeze
-
1
NO_TIME_ELAPSED_TEXT = '--:--:--'.freeze
-
1
ESTIMATED_LABEL = ' ETA'.freeze
-
1
ELAPSED_LABEL = 'Time'.freeze
-
-
1
def initialize(options = {})
-
1
self.out_of_bounds_time_format = options[:out_of_bounds_time_format]
-
1
self.timer = options[:timer]
-
1
self.progress = options[:progress]
-
end
-
-
1
def estimated_with_label
-
407
"#{ESTIMATED_LABEL}: #{estimated}"
-
end
-
-
1
def elapsed_with_label
-
409
"#{ELAPSED_LABEL}: #{elapsed}"
-
end
-
-
1
protected
-
-
1
def estimated_with_no_oob
-
self.out_of_bounds_time_format = nil
-
-
estimated_with_elapsed_fallback
-
end
-
-
1
def estimated_with_unknown_oob
-
408
self.out_of_bounds_time_format = :unknown
-
-
408
estimated_with_elapsed_fallback
-
end
-
-
1
def estimated_with_friendly_oob
-
self.out_of_bounds_time_format = :friendly
-
-
estimated_with_elapsed_fallback
-
end
-
-
1
attr_reader :out_of_bounds_time_format
-
1
attr_accessor :timer,
-
:progress
-
-
1
def out_of_bounds_time_format=(format)
-
409
unless OOB_TIME_FORMATS.include? format
-
fail 'Invalid Out Of Bounds time format. Valid formats are ' +
-
OOB_TIME_FORMATS.inspect
-
end
-
-
409
@out_of_bounds_time_format = format
-
end
-
-
1
private
-
-
1
def estimated
-
407
return OOB_UNKNOWN_TIME_TEXT if progress.unknown? || progress.none? || timer.stopped?
-
-
406
hours, minutes, seconds = timer.divide_seconds(estimated_seconds_remaining)
-
-
406
if hours > OOB_LIMIT_IN_HOURS && out_of_bounds_time_format
-
out_of_bounds_time
-
else
-
406
TIME_FORMAT % [hours, minutes, seconds]
-
end
-
end
-
-
1
def elapsed
-
409
return NO_TIME_ELAPSED_TEXT unless timer.started?
-
-
409
hours, minutes, seconds = timer.divide_seconds(timer.elapsed_whole_seconds)
-
-
409
TIME_FORMAT % [hours, minutes, seconds]
-
end
-
-
1
def estimated_with_elapsed_fallback
-
408
progress.finished? ? elapsed_with_label : estimated_with_label
-
end
-
-
1
def estimated_seconds_remaining
-
406
(timer.elapsed_seconds * (progress.total / progress.running_average - 1)).round
-
end
-
-
1
def out_of_bounds_time
-
case out_of_bounds_time_format
-
when :unknown
-
OOB_UNKNOWN_TIME_TEXT
-
when :friendly
-
OOB_FRIENDLY_TIME_TEXT
-
end
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Components
-
1
class Title
-
1
DEFAULT_TITLE = 'Progress'.freeze
-
-
1
attr_accessor :title
-
-
1
def initialize(options = {})
-
1
self.title = options[:title] || DEFAULT_TITLE
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
class InvalidProgressError < RuntimeError
-
end
-
end
-
1
require 'ruby-progressbar/format/molecule'
-
1
require 'ruby-progressbar/format/formatter'
-
1
require 'ruby-progressbar/format/string'
-
1
class ProgressBar
-
1
module Format
-
1
class Formatter
-
1
def self.process(format_string, max_length, bar)
-
408
processed_string = format_string.dup
-
-
408
format_string.non_bar_molecules.each do |molecule|
-
2040
processed_string.gsub!(molecule.full_key, molecule.lookup_value(bar, nil))
-
end
-
-
408
processed_string.gsub!(/%%/, '%')
-
-
408
bar_length = max_length -
-
processed_string.displayable_length +
-
format_string.bar_molecule_placeholder_length
-
408
bar_length = bar_length < 0 ? 0 : bar_length
-
-
408
format_string.bar_molecules.each do |molecule|
-
408
processed_string.gsub!(molecule.full_key,
-
molecule.lookup_value(bar, bar_length))
-
end
-
-
408
processed_string
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Format
-
1
class Molecule
-
1
MOLECULES = {
-
:t => [:title_comp, :title],
-
:T => [:title_comp, :title],
-
:c => [:progressable, :progress],
-
:C => [:progressable, :total],
-
:p => [:percentage, :percentage],
-
:P => [:percentage, :percentage_with_precision],
-
:j => [:percentage, :justified_percentage],
-
:J => [:percentage, :justified_percentage_with_precision],
-
:a => [:time, :elapsed_with_label],
-
:e => [:time, :estimated_with_unknown_oob],
-
:E => [:time, :estimated_with_friendly_oob],
-
:f => [:time, :estimated_with_no_oob],
-
:B => [:bar, :complete_bar],
-
:b => [:bar, :bar],
-
:w => [:bar, :bar_with_percentage],
-
:i => [:bar, :incomplete_space],
-
:r => [:rate, :rate_of_change],
-
:R => [:rate, :rate_of_change_with_precision],
-
}.freeze
-
-
1
BAR_MOLECULES = %w{w B b i}.freeze
-
-
1
attr_accessor :key,
-
:method_name
-
-
1
def initialize(letter)
-
6
self.key = letter
-
6
self.method_name = MOLECULES.fetch(key.to_sym)
-
end
-
-
1
def bar_molecule?
-
2460
BAR_MOLECULES.include? key
-
end
-
-
1
def non_bar_molecule?
-
6
!bar_molecule?
-
end
-
-
1
def full_key
-
2448
"%#{key}"
-
end
-
-
1
def lookup_value(environment, length = 0)
-
2448
component = environment.__send__(method_name[0])
-
-
2448
if bar_molecule?
-
408
component.__send__(method_name[1], length).to_s
-
else
-
2040
component.__send__(method_name[1]).to_s
-
end
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
module Format
-
1
class String < ::String
-
1
MOLECULE_PATTERN = /%[a-zA-Z]/
-
1
ANSI_SGR_PATTERN = /\e\[[\d;]+m/
-
-
1
def displayable_length
-
408
gsub(ANSI_SGR_PATTERN, '').length
-
end
-
-
1
def bar_molecule_placeholder_length
-
408
@bar_molecule_placeholder_length ||= bar_molecules.size * 2
-
end
-
-
1
def non_bar_molecules
-
408
@non_bar_molecules ||= molecules.select(&:non_bar_molecule?)
-
end
-
-
1
def bar_molecules
-
409
@bar_molecules ||= molecules.select(&:bar_molecule?)
-
end
-
-
1
def molecules
-
@molecules ||= begin
-
1
molecules = []
-
-
1
scan(MOLECULE_PATTERN) do |match|
-
6
molecules << Molecule.new(match[1, 1])
-
end
-
-
1
molecules
-
2
end
-
end
-
end
-
end
-
end
-
1
class ProgressBar
-
1
class Output
-
1
DEFAULT_OUTPUT_STREAM = $stdout
-
-
1
attr_accessor :stream
-
-
1
def initialize(options = {})
-
1
self.bar = options[:bar]
-
1
self.stream = options[:output] || DEFAULT_OUTPUT_STREAM
-
1
self.length_calculator = Calculators::Length.new(options)
-
1
self.throttle = Throttle.new(options)
-
end
-
-
1
def self.detect(options = {})
-
1
if (options[:output] || DEFAULT_OUTPUT_STREAM).tty?
-
1
Outputs::Tty.new(options)
-
else
-
Outputs::NonTty.new(options)
-
end
-
end
-
-
1
def log(string)
-
clear
-
stream.puts string
-
-
refresh(:force => true) unless bar.stopped?
-
end
-
-
1
def clear_string
-
1
' ' * length_calculator.length
-
end
-
-
1
def length
-
408
length_calculator.length
-
end
-
-
1
def with_refresh
-
560
yield
-
560
refresh
-
end
-
-
1
def refresh(options = {})
-
560
throttle.choke(:force_update_if => (bar.stopped? || options[:force])) do
-
408
clear if length_calculator.length_changed?
-
-
408
print_and_flush
-
end
-
end
-
-
1
def print_and_flush
-
408
stream.print bar_update_string + eol
-
408
stream.flush
-
end
-
-
1
protected
-
-
1
attr_accessor :length_calculator,
-
:throttle,
-
:bar
-
end
-
end
-
1
require 'ruby-progressbar/output'
-
-
1
class ProgressBar
-
1
module Outputs
-
1
class NonTty < Output
-
1
DEFAULT_FORMAT_STRING = '%t: |%b|'.freeze
-
-
1
def clear
-
self.last_update_length = 0
-
-
stream.print "\n"
-
end
-
-
1
def last_update_length
-
@last_update_length ||= 0
-
end
-
-
1
def bar_update_string
-
formatted_string = bar.to_s
-
formatted_string = formatted_string[0...-1] unless bar.finished?
-
-
output_string = formatted_string[last_update_length..-1]
-
self.last_update_length = formatted_string.length
-
-
output_string
-
end
-
-
1
def default_format
-
DEFAULT_FORMAT_STRING
-
end
-
-
1
def resolve_format(*)
-
default_format
-
end
-
-
1
def refresh_with_format_change(*); end
-
-
1
def eol
-
bar.stopped? ? "\n" : ''
-
end
-
-
1
protected
-
-
1
attr_writer :last_update_length
-
end
-
end
-
end
-
1
require 'ruby-progressbar/output'
-
-
1
class ProgressBar
-
1
module Outputs
-
1
class Tty < Output
-
1
DEFAULT_FORMAT_STRING = '%t: |%B|'.freeze
-
-
1
alias refresh_with_format_change with_refresh
-
-
1
def clear
-
1
stream.print clear_string
-
1
stream.print "\r"
-
end
-
-
1
def bar_update_string
-
408
bar.to_s
-
end
-
-
1
def default_format
-
DEFAULT_FORMAT_STRING
-
end
-
-
1
def resolve_format(other_format)
-
1
other_format || default_format
-
end
-
-
1
def eol
-
408
bar.stopped? ? "\n" : "\r"
-
end
-
end
-
end
-
end
-
1
require 'ruby-progressbar/errors/invalid_progress_error'
-
-
1
class ProgressBar
-
1
class Progress
-
1
DEFAULT_TOTAL = 100
-
1
DEFAULT_BEGINNING_POSITION = 0
-
1
DEFAULT_SMOOTHING = 0.1
-
-
1
attr_reader :total,
-
:progress
-
-
1
attr_accessor :starting_position,
-
:running_average,
-
:smoothing
-
-
1
def initialize(options = {})
-
1
self.total = options.fetch(:total, DEFAULT_TOTAL)
-
1
self.smoothing = options[:smoothing] || DEFAULT_SMOOTHING
-
-
1
start :at => DEFAULT_BEGINNING_POSITION
-
end
-
-
1
def start(options = {})
-
2
self.running_average = 0
-
2
self.progress = \
-
self.starting_position = options[:at] || progress
-
end
-
-
1
def finish
-
self.progress = total unless unknown?
-
end
-
-
1
def finished?
-
1867
@progress == @total
-
end
-
-
1
def increment
-
warn "WARNING: Your progress bar is currently at #{progress} out of #{total} " \
-
"and cannot be incremented. In v2.0.0 this will become a " \
-
490
"ProgressBar::InvalidProgressError." if progress == total
-
-
490
self.progress += 1 unless progress == total
-
end
-
-
1
def decrement
-
warn "WARNING: Your progress bar is currently at #{progress} out of #{total} " \
-
"and cannot be decremented. In v2.0.0 this will become a " \
-
"ProgressBar::InvalidProgressError." if progress == 0
-
-
self.progress -= 1 unless progress == 0
-
end
-
-
1
def reset
-
start :at => starting_position
-
end
-
-
1
def progress=(new_progress)
-
fail ProgressBar::InvalidProgressError,
-
"You can't set the item's current value to be greater than the total." \
-
if total &&
-
492
new_progress > total
-
-
492
@progress = new_progress
-
-
492
self.running_average = Calculators::RunningAverage.calculate(running_average,
-
absolute,
-
smoothing)
-
end
-
-
1
def total=(new_total)
-
fail ProgressBar::InvalidProgressError,
-
"You can't set the item's total value to less than the current progress." \
-
unless progress.nil? ||
-
2
new_total.nil? ||
-
new_total >= progress
-
-
2
@total = new_total
-
end
-
-
1
def percentage_completed
-
1222
return 0 if total.nil?
-
1221
return 100 if total.zero?
-
-
# progress / total * 100
-
#
-
# Doing this way so we can avoid converting each
-
# number to a float and then back to an integer.
-
#
-
1221
(progress * 100 / total).to_i
-
end
-
-
1
def none?
-
406
running_average.zero? || progress.zero?
-
end
-
-
1
def unknown?
-
815
progress.nil? || total.nil?
-
end
-
-
1
def percentage_completed_with_precision
-
return 100.0 if total == 0
-
return 0.0 if total.nil?
-
-
'%5.2f' % [(progress * 100 / total.to_f * 100).floor / 100.0]
-
end
-
-
1
def absolute
-
492
progress - starting_position
-
end
-
end
-
end
-
1
class ProgressBar
-
1
class Throttle
-
1
attr_accessor :rate,
-
:started_at,
-
:stopped_at,
-
:timer
-
-
1
def initialize(options = {})
-
1
self.rate = options[:throttle_rate] || 0.01
-
1
self.started_at = nil
-
1
self.stopped_at = nil
-
1
self.timer = options.fetch(:throttle_timer, Timer.new)
-
end
-
-
1
def choke(options = {})
-
return unless !timer.started? ||
-
560
options.fetch(:force_update_if, false) ||
-
timer.elapsed_seconds >= rate
-
-
408
timer.restart
-
-
408
yield
-
end
-
end
-
end
-
1
class ProgressBar
-
1
class Time
-
1
TIME_MOCKING_LIBRARY_METHODS = [
-
:__simple_stub__now, # ActiveSupport
-
:now_without_mock_time, # Timecop
-
:now_without_delorean, # Delorean
-
:now # Actual
-
].freeze
-
-
1
def initialize(time = ::Time)
-
2
self.time = time
-
end
-
-
1
def now
-
1781
time.__send__ unmocked_time_method
-
end
-
-
1
def unmocked_time_method
-
@unmocked_time_method ||= begin
-
2
TIME_MOCKING_LIBRARY_METHODS.find do |method|
-
8
time.respond_to? method
-
end
-
1781
end
-
end
-
-
1
protected
-
-
1
attr_accessor :time
-
end
-
end
-
1
require 'ruby-progressbar/time'
-
-
1
class ProgressBar
-
1
class Timer
-
1
attr_accessor :started_at,
-
:stopped_at
-
-
1
def initialize(options = {})
-
2
self.time = options[:time] || Time.new
-
end
-
-
1
def start
-
409
self.started_at = stopped? ? time.now - (stopped_at - started_at) : time.now
-
409
self.stopped_at = nil
-
end
-
-
1
def stop
-
1
return unless started?
-
-
1
self.stopped_at = time.now
-
end
-
-
1
def pause
-
stop
-
end
-
-
1
def resume
-
start
-
end
-
-
1
def started?
-
970
started_at
-
end
-
-
1
def stopped?
-
1783
stopped_at
-
end
-
-
1
def reset
-
408
self.started_at = nil
-
408
self.stopped_at = nil
-
end
-
-
1
def reset?
-
!started_at
-
end
-
-
1
def restart
-
408
reset
-
408
start
-
end
-
-
1
def elapsed_seconds
-
1373
((stopped_at || time.now) - started_at)
-
end
-
-
1
def elapsed_whole_seconds
-
409
elapsed_seconds.floor
-
end
-
-
1
def divide_seconds(seconds)
-
815
hours, seconds = seconds.divmod(3600)
-
815
minutes, seconds = seconds.divmod(60)
-
-
815
[hours, minutes, seconds]
-
end
-
-
1
protected
-
-
1
attr_accessor :time
-
end
-
end
-
1
module RubyDep
-
1
class Warning
-
1
PREFIX = 'RubyDep: WARNING: '.freeze
-
1
MSG_BUGGY = 'Your Ruby is outdated/buggy.'.freeze
-
1
MSG_INSECURE = 'Your Ruby has security vulnerabilities!'.freeze
-
-
1
MSG_HOW_TO_DISABLE = ' (To disable warnings, set'\
-
' RUBY_DEP_GEM_SILENCE_WARNINGS=1)'.freeze
-
-
1
OPEN_ISSUE_FOR_UNRECOGNIZED = 'If this version is important,'\
-
' please open an issue at http://github.com/e2/ruby_dep'.freeze
-
-
1
def show_warnings
-
1
return if silenced?
-
1
case (status = check_ruby)
-
when :insecure
-
warn_ruby(MSG_INSECURE, status)
-
when :buggy
-
1
warn_ruby(MSG_BUGGY, status)
-
when :unknown
-
else
-
raise "Unknown problem type: #{problem.inspect}"
-
end
-
end
-
-
1
private
-
-
1
VERSION_INFO = {
-
'ruby' => {
-
'2.3.1' => :unknown,
-
'2.3.0' => :buggy,
-
'2.2.5' => :unknown,
-
'2.2.4' => :buggy,
-
'2.2.0' => :insecure,
-
'2.1.9' => :buggy,
-
'2.0.0' => :insecure
-
},
-
-
'jruby' => {
-
'2.2.3' => :unknown, # jruby-9.0.5.0
-
'2.2.0' => :insecure
-
}
-
}.freeze
-
-
1
def check_ruby
-
1
version = Gem::Version.new(RUBY_VERSION)
-
1
current_ruby_info.each do |ruby, status|
-
4
return status if version >= Gem::Version.new(ruby)
-
end
-
:insecure
-
end
-
-
1
def silenced?
-
1
value = ENV['RUBY_DEP_GEM_SILENCE_WARNINGS']
-
1
(value || '0') !~ /^0|false|no|n$/
-
end
-
-
1
def warn_ruby(msg, status)
-
1
STDERR.puts PREFIX + msg + MSG_HOW_TO_DISABLE
-
1
STDERR.puts PREFIX + recommendation(status)
-
end
-
-
1
def recommendation(status)
-
1
msg = "Your Ruby is: #{RUBY_VERSION}"
-
1
return msg + recommendation_for_unknown unless recognized?
-
-
1
msg += " (#{status})."
-
1
msg += " Recommendation: install #{recommended(:unknown).join(' or ')}."
-
1
return msg unless status == :insecure
-
-
msg + " (Or, at least to #{recommended(:buggy).join(' or ')})"
-
end
-
-
1
def recommended(status)
-
1
current = Gem::Version.new(RUBY_VERSION)
-
current_ruby_info.select do |key, value|
-
7
value == status && Gem::Version.new(key) > current
-
1
end.keys.reverse
-
end
-
-
1
def current_ruby_info
-
3
VERSION_INFO[RUBY_ENGINE] || {}
-
end
-
-
1
def recognized?
-
1
current_ruby_info.any?
-
end
-
-
1
def recommendation_for_unknown
-
format(
-
" '%s' (unrecognized). %s", RUBY_ENGINE,
-
OPEN_ISSUE_FOR_UNRECOGNIZED
-
)
-
end
-
end
-
end
-
1
require "open3"
-
-
1
module Shellany
-
# The Guard sheller abstract the actual subshell
-
# calls and allow easier stubbing.
-
#
-
1
class Sheller
-
1
attr_reader :status
-
-
# Creates a new Guard::Sheller object.
-
#
-
# @param [String] args a command to run in a subshell
-
# @param [Array<String>] args an array of command parts to run in a subshell
-
# @param [*String] args a list of command parts to run in a subshell
-
#
-
1
def initialize(*args)
-
1
fail ArgumentError, "no command given" if args.empty?
-
1
@command = args
-
1
@ran = false
-
end
-
-
# Shortcut for new(command).run
-
#
-
1
def self.run(*args)
-
1
new(*args).run
-
end
-
-
# Shortcut for new(command).run.stdout
-
#
-
1
def self.stdout(*args)
-
new(*args).stdout
-
end
-
-
# Shortcut for new(command).run.stderr
-
#
-
1
def self.stderr(*args)
-
new(*args).stderr
-
end
-
-
# Runs the command.
-
#
-
# @return [Boolean] whether or not the command succeeded.
-
#
-
1
def run
-
1
unless ran?
-
1
status, output, errors = self.class._system_with_capture(*@command)
-
1
@ran = true
-
1
@stdout = output
-
1
@stderr = errors
-
1
@status = status
-
end
-
-
1
ok?
-
end
-
-
# Returns true if the command has already been run, false otherwise.
-
#
-
# @return [Boolean] whether or not the command has already been run
-
#
-
1
def ran?
-
2
@ran
-
end
-
-
# Returns true if the command succeeded, false otherwise.
-
#
-
# @return [Boolean] whether or not the command succeeded
-
#
-
1
def ok?
-
1
run unless ran?
-
-
1
@status && @status.success?
-
end
-
-
# Returns the command's output.
-
#
-
# @return [String] the command output
-
#
-
1
def stdout
-
run unless ran?
-
-
@stdout
-
end
-
-
# Returns the command's error output.
-
#
-
# @return [String] the command output
-
#
-
1
def stderr
-
run unless ran?
-
-
@stderr
-
end
-
-
# No output capturing
-
#
-
# NOTE: `$stdout.puts system('cls')` on Windows won't work like
-
# it does for on systems with ansi terminals, so we need to be
-
# able to call Kernel.system directly.
-
1
def self.system(*args)
-
_system_with_no_capture(*args)
-
end
-
-
1
def self._system_with_no_capture(*args)
-
Kernel.system(*args)
-
result = $?
-
errors = (result == 0) || "Guard failed to run: #{args.inspect}"
-
[result, nil, errors]
-
end
-
-
1
def self._system_with_capture(*args)
-
# We use popen3, because it started working on recent versions
-
# of JRuby, while JRuby doesn't handle options to Kernel.system
-
1
args = _shellize_if_needed(args)
-
-
1
stdout, stderr, status = nil
-
1
Open3.popen3(*args) do |_stdin, _stdout, _stderr, _thr|
-
stdout = _stdout.read
-
stderr = _stderr.read
-
status = _thr.value
-
end
-
-
[status, stdout, stderr]
-
rescue Errno::ENOENT, IOError => e
-
1
[nil, nil, "Guard::Sheller failed (#{e.inspect})"]
-
end
-
-
# Only needed on JRUBY, because MRI properly detects ';' and metachars
-
1
def self._shellize_if_needed(args)
-
1
return args unless RUBY_PLATFORM == "java"
-
return args unless args.size == 1
-
return args unless /[;<>]/ =~ args.first
-
-
# NOTE: Sheller was originally meant for Guard (which basically only uses
-
# UNIX commands anyway) and JRuby doesn't support options to
-
# Kernel.system (and doesn't automatically shell when there's a
-
# metacharacter in the command).
-
#
-
# So ... I'm assuming /bin/sh exists - if not, PRs are welcome,
-
# because I have no clue what to do if /bin/sh doesn't exist.
-
# (use ENV["RUBYSHELL"] ? Detect cmd.exe ?)
-
["/bin/sh", "-c", args.first]
-
end
-
end
-
end
-
1
require 'sass'
-
-
1
module Sprockets
-
1
module Autoload
-
1
Sass = ::Sass
-
end
-
end
-
1
require 'fileutils'
-
1
require 'logger'
-
1
require 'sprockets/encoding_utils'
-
1
require 'sprockets/path_utils'
-
1
require 'zlib'
-
-
1
module Sprockets
-
1
class Cache
-
# Public: A file system cache store that automatically cleans up old keys.
-
#
-
# Assign the instance to the Environment#cache.
-
#
-
# environment.cache = Sprockets::Cache::FileStore.new("/tmp")
-
#
-
# See Also
-
#
-
# ActiveSupport::Cache::FileStore
-
#
-
1
class FileStore
-
# Internal: Default key limit for store.
-
1
DEFAULT_MAX_SIZE = 25 * 1024 * 1024
-
-
# Internal: Default standard error fatal logger.
-
#
-
# Returns a Logger.
-
1
def self.default_logger
-
logger = Logger.new($stderr)
-
logger.level = Logger::FATAL
-
logger
-
end
-
-
# Public: Initialize the cache store.
-
#
-
# root - A String path to a directory to persist cached values to.
-
# max_size - A Integer of the maximum number of keys the store will hold.
-
# (default: 1000).
-
1
def initialize(root, max_size = DEFAULT_MAX_SIZE, logger = self.class.default_logger)
-
1
@root = root
-
130
@size = find_caches.inject(0) { |n, (_, stat)| n + stat.size }
-
1
@max_size = max_size
-
1
@gc_size = max_size * 0.75
-
1
@logger = logger
-
end
-
-
# Public: Retrieve value from cache.
-
#
-
# This API should not be used directly, but via the Cache wrapper API.
-
#
-
# key - String cache key.
-
#
-
# Returns Object or nil or the value is not set.
-
1
def get(key)
-
43
path = File.join(@root, "#{key}.cache")
-
-
43
value = safe_open(path) do |f|
-
43
begin
-
43
EncodingUtils.unmarshaled_deflated(f.read, Zlib::MAX_WBITS)
-
rescue Exception => e
-
@logger.error do
-
"#{self.class}[#{path}] could not be unmarshaled: " +
-
"#{e.class}: #{e.message}"
-
end
-
nil
-
end
-
end
-
-
43
if value
-
43
FileUtils.touch(path)
-
43
value
-
end
-
end
-
-
# Public: Set a key and value in the cache.
-
#
-
# This API should not be used directly, but via the Cache wrapper API.
-
#
-
# key - String cache key.
-
# value - Object value.
-
#
-
# Returns Object value.
-
1
def set(key, value)
-
path = File.join(@root, "#{key}.cache")
-
-
# Ensure directory exists
-
FileUtils.mkdir_p File.dirname(path)
-
-
# Check if cache exists before writing
-
exists = File.exist?(path)
-
-
# Serialize value
-
marshaled = Marshal.dump(value)
-
-
# Compress if larger than 4KB
-
if marshaled.bytesize > 4 * 1024
-
deflater = Zlib::Deflate.new(
-
Zlib::BEST_COMPRESSION,
-
Zlib::MAX_WBITS,
-
Zlib::MAX_MEM_LEVEL,
-
Zlib::DEFAULT_STRATEGY
-
)
-
deflater << marshaled
-
raw = deflater.finish
-
else
-
raw = marshaled
-
end
-
-
# Write data
-
PathUtils.atomic_write(path) do |f|
-
f.write(raw)
-
@size += f.size unless exists
-
end
-
-
# GC if necessary
-
gc! if @size > @max_size
-
-
value
-
end
-
-
# Public: Pretty inspect
-
#
-
# Returns String.
-
1
def inspect
-
"#<#{self.class} size=#{@size}/#{@max_size}>"
-
end
-
-
1
private
-
# Internal: Get all cache files along with stats.
-
#
-
# Returns an Array of [String filename, File::Stat] pairs sorted by
-
# mtime.
-
1
def find_caches
-
Dir.glob(File.join(@root, '**/*.cache')).reduce([]) { |stats, filename|
-
129
stat = safe_stat(filename)
-
# stat maybe nil if file was removed between the time we called
-
# dir.glob and the next stat
-
129
stats << [filename, stat] if stat
-
129
stats
-
130
}.sort_by { |_, stat| stat.mtime.to_i }
-
end
-
-
1
def compute_size(caches)
-
caches.inject(0) { |sum, (_, stat)| sum + stat.size }
-
end
-
-
1
def safe_stat(fn)
-
129
File.stat(fn)
-
rescue Errno::ENOENT
-
nil
-
end
-
-
1
def safe_open(path, &block)
-
43
if File.exist?(path)
-
43
File.open(path, 'rb', &block)
-
end
-
rescue Errno::ENOENT
-
end
-
-
1
def gc!
-
start_time = Time.now
-
-
caches = find_caches
-
size = compute_size(caches)
-
-
delete_caches, keep_caches = caches.partition { |filename, stat|
-
deleted = size > @gc_size
-
size -= stat.size
-
deleted
-
}
-
-
return if delete_caches.empty?
-
-
FileUtils.remove(delete_caches.map(&:first), force: true)
-
@size = compute_size(keep_caches)
-
-
@logger.warn do
-
secs = Time.now.to_f - start_time.to_f
-
"#{self.class}[#{@root}] garbage collected " +
-
"#{delete_caches.size} files (#{(secs * 1000).to_i}ms)"
-
end
-
end
-
end
-
end
-
end
-
1
require "thor/command"
-
1
require "thor/core_ext/hash_with_indifferent_access"
-
1
require "thor/core_ext/ordered_hash"
-
1
require "thor/error"
-
1
require "thor/invocation"
-
1
require "thor/parser"
-
1
require "thor/shell"
-
1
require "thor/line_editor"
-
1
require "thor/util"
-
-
1
class Thor
-
1
autoload :Actions, "thor/actions"
-
1
autoload :RakeCompat, "thor/rake_compat"
-
1
autoload :Group, "thor/group"
-
-
# Shortcuts for help.
-
1
HELP_MAPPINGS = %w[-h -? --help -D]
-
-
# Thor methods that should not be overwritten by the user.
-
1
THOR_RESERVED_WORDS = %w[invoke shell options behavior root destination_root relative_root
-
action add_file create_file in_root inside run run_ruby_script]
-
-
1
TEMPLATE_EXTNAME = ".tt"
-
-
1
module Base
-
1
attr_accessor :options, :parent_options, :args
-
-
# It receives arguments in an Array and two hashes, one for options and
-
# other for configuration.
-
#
-
# Notice that it does not check if all required arguments were supplied.
-
# It should be done by the parser.
-
#
-
# ==== Parameters
-
# args<Array[Object]>:: An array of objects. The objects are applied to their
-
# respective accessors declared with <tt>argument</tt>.
-
#
-
# options<Hash>:: An options hash that will be available as self.options.
-
# The hash given is converted to a hash with indifferent
-
# access, magic predicates (options.skip?) and then frozen.
-
#
-
# config<Hash>:: Configuration for this Thor class.
-
#
-
1
def initialize(args = [], local_options = {}, config = {}) # rubocop:disable MethodLength
-
parse_options = self.class.class_options
-
-
# The start method splits inbound arguments at the first argument
-
# that looks like an option (starts with - or --). It then calls
-
# new, passing in the two halves of the arguments Array as the
-
# first two parameters.
-
-
command_options = config.delete(:command_options) # hook for start
-
parse_options = parse_options.merge(command_options) if command_options
-
if local_options.is_a?(Array)
-
array_options, hash_options = local_options, {}
-
else
-
# Handle the case where the class was explicitly instantiated
-
# with pre-parsed options.
-
array_options, hash_options = [], local_options
-
end
-
-
# Let Thor::Options parse the options first, so it can remove
-
# declared options from the array. This will leave us with
-
# a list of arguments that weren't declared.
-
stop_on_unknown = self.class.stop_on_unknown_option? config[:current_command]
-
opts = Thor::Options.new(parse_options, hash_options, stop_on_unknown)
-
self.options = opts.parse(array_options)
-
self.options = config[:class_options].merge(options) if config[:class_options]
-
-
# If unknown options are disallowed, make sure that none of the
-
# remaining arguments looks like an option.
-
opts.check_unknown! if self.class.check_unknown_options?(config)
-
-
# Add the remaining arguments from the options parser to the
-
# arguments passed in to initialize. Then remove any positional
-
# arguments declared using #argument (this is primarily used
-
# by Thor::Group). Tis will leave us with the remaining
-
# positional arguments.
-
to_parse = args
-
to_parse += opts.remaining unless self.class.strict_args_position?(config)
-
-
thor_args = Thor::Arguments.new(self.class.arguments)
-
thor_args.parse(to_parse).each { |k, v| __send__("#{k}=", v) }
-
@args = thor_args.remaining
-
end
-
-
1
class << self
-
1
def included(base) #:nodoc:
-
1
base.extend ClassMethods
-
1
base.send :include, Invocation
-
1
base.send :include, Shell
-
end
-
-
# Returns the classes that inherits from Thor or Thor::Group.
-
#
-
# ==== Returns
-
# Array[Class]
-
#
-
1
def subclasses
-
@subclasses ||= []
-
end
-
-
# Returns the files where the subclasses are kept.
-
#
-
# ==== Returns
-
# Hash[path<String> => Class]
-
#
-
1
def subclass_files
-
@subclass_files ||= Hash.new { |h, k| h[k] = [] }
-
end
-
-
# Whenever a class inherits from Thor or Thor::Group, we should track the
-
# class and the file on Thor::Base. This is the method responsable for it.
-
#
-
1
def register_klass_file(klass) #:nodoc:
-
file = caller[1].match(/(.*):\d+/)[1]
-
Thor::Base.subclasses << klass unless Thor::Base.subclasses.include?(klass)
-
-
file_subclasses = Thor::Base.subclass_files[File.expand_path(file)]
-
file_subclasses << klass unless file_subclasses.include?(klass)
-
end
-
end
-
-
1
module ClassMethods
-
1
def attr_reader(*) #:nodoc:
-
no_commands { super }
-
end
-
-
1
def attr_writer(*) #:nodoc:
-
no_commands { super }
-
end
-
-
1
def attr_accessor(*) #:nodoc:
-
no_commands { super }
-
end
-
-
# If you want to raise an error for unknown options, call check_unknown_options!
-
# This is disabled by default to allow dynamic invocations.
-
1
def check_unknown_options!
-
@check_unknown_options = true
-
end
-
-
1
def check_unknown_options #:nodoc:
-
@check_unknown_options ||= from_superclass(:check_unknown_options, false)
-
end
-
-
1
def check_unknown_options?(config) #:nodoc:
-
!!check_unknown_options
-
end
-
-
# If true, option parsing is suspended as soon as an unknown option or a
-
# regular argument is encountered. All remaining arguments are passed to
-
# the command as regular arguments.
-
1
def stop_on_unknown_option?(command_name) #:nodoc:
-
false
-
end
-
-
# If you want only strict string args (useful when cascading thor classes),
-
# call strict_args_position! This is disabled by default to allow dynamic
-
# invocations.
-
1
def strict_args_position!
-
@strict_args_position = true
-
end
-
-
1
def strict_args_position #:nodoc:
-
@strict_args_position ||= from_superclass(:strict_args_position, false)
-
end
-
-
1
def strict_args_position?(config) #:nodoc:
-
!!strict_args_position
-
end
-
-
# Adds an argument to the class and creates an attr_accessor for it.
-
#
-
# Arguments are different from options in several aspects. The first one
-
# is how they are parsed from the command line, arguments are retrieved
-
# from position:
-
#
-
# thor command NAME
-
#
-
# Instead of:
-
#
-
# thor command --name=NAME
-
#
-
# Besides, arguments are used inside your code as an accessor (self.argument),
-
# while options are all kept in a hash (self.options).
-
#
-
# Finally, arguments cannot have type :default or :boolean but can be
-
# optional (supplying :optional => :true or :required => false), although
-
# you cannot have a required argument after a non-required argument. If you
-
# try it, an error is raised.
-
#
-
# ==== Parameters
-
# name<Symbol>:: The name of the argument.
-
# options<Hash>:: Described below.
-
#
-
# ==== Options
-
# :desc - Description for the argument.
-
# :required - If the argument is required or not.
-
# :optional - If the argument is optional or not.
-
# :type - The type of the argument, can be :string, :hash, :array, :numeric.
-
# :default - Default value for this argument. It cannot be required and have default values.
-
# :banner - String to show on usage notes.
-
#
-
# ==== Errors
-
# ArgumentError:: Raised if you supply a required argument after a non required one.
-
#
-
1
def argument(name, options = {}) # rubocop:disable MethodLength
-
is_thor_reserved_word?(name, :argument)
-
no_commands { attr_accessor name }
-
-
required = if options.key?(:optional)
-
!options[:optional]
-
elsif options.key?(:required)
-
options[:required]
-
else
-
options[:default].nil?
-
end
-
-
remove_argument name
-
-
arguments.each do |argument|
-
next if argument.required?
-
fail ArgumentError, "You cannot have #{name.to_s.inspect} as required argument after " <<
-
"the non-required argument #{argument.human_name.inspect}."
-
end if required
-
-
options[:required] = required
-
-
arguments << Thor::Argument.new(name, options)
-
end
-
-
# Returns this class arguments, looking up in the ancestors chain.
-
#
-
# ==== Returns
-
# Array[Thor::Argument]
-
#
-
1
def arguments
-
@arguments ||= from_superclass(:arguments, [])
-
end
-
-
# Adds a bunch of options to the set of class options.
-
#
-
# class_options :foo => false, :bar => :required, :baz => :string
-
#
-
# If you prefer more detailed declaration, check class_option.
-
#
-
# ==== Parameters
-
# Hash[Symbol => Object]
-
#
-
1
def class_options(options = nil)
-
@class_options ||= from_superclass(:class_options, {})
-
build_options(options, @class_options) if options
-
@class_options
-
end
-
-
# Adds an option to the set of class options
-
#
-
# ==== Parameters
-
# name<Symbol>:: The name of the argument.
-
# options<Hash>:: Described below.
-
#
-
# ==== Options
-
# :desc:: -- Description for the argument.
-
# :required:: -- If the argument is required or not.
-
# :default:: -- Default value for this argument.
-
# :group:: -- The group for this options. Use by class options to output options in different levels.
-
# :aliases:: -- Aliases for this option. <b>Note:</b> Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead.
-
# :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
-
# :banner:: -- String to show on usage notes.
-
# :hide:: -- If you want to hide this option from the help.
-
#
-
1
def class_option(name, options = {})
-
build_option(name, options, class_options)
-
end
-
-
# Removes a previous defined argument. If :undefine is given, undefine
-
# accessors as well.
-
#
-
# ==== Parameters
-
# names<Array>:: Arguments to be removed
-
#
-
# ==== Examples
-
#
-
# remove_argument :foo
-
# remove_argument :foo, :bar, :baz, :undefine => true
-
#
-
1
def remove_argument(*names)
-
options = names.last.is_a?(Hash) ? names.pop : {}
-
-
names.each do |name|
-
arguments.delete_if { |a| a.name == name.to_s }
-
undef_method name, "#{name}=" if options[:undefine]
-
end
-
end
-
-
# Removes a previous defined class option.
-
#
-
# ==== Parameters
-
# names<Array>:: Class options to be removed
-
#
-
# ==== Examples
-
#
-
# remove_class_option :foo
-
# remove_class_option :foo, :bar, :baz
-
#
-
1
def remove_class_option(*names)
-
names.each do |name|
-
class_options.delete(name)
-
end
-
end
-
-
# Defines the group. This is used when thor list is invoked so you can specify
-
# that only commands from a pre-defined group will be shown. Defaults to standard.
-
#
-
# ==== Parameters
-
# name<String|Symbol>
-
#
-
1
def group(name = nil)
-
if name
-
@group = name.to_s
-
else
-
@group ||= from_superclass(:group, "standard")
-
end
-
end
-
-
# Returns the commands for this Thor class.
-
#
-
# ==== Returns
-
# OrderedHash:: An ordered hash with commands names as keys and Thor::Command
-
# objects as values.
-
#
-
1
def commands
-
@commands ||= Thor::CoreExt::OrderedHash.new
-
end
-
1
alias_method :tasks, :commands
-
-
# Returns the commands for this Thor class and all subclasses.
-
#
-
# ==== Returns
-
# OrderedHash:: An ordered hash with commands names as keys and Thor::Command
-
# objects as values.
-
#
-
1
def all_commands
-
@all_commands ||= from_superclass(:all_commands, Thor::CoreExt::OrderedHash.new)
-
@all_commands.merge(commands)
-
end
-
1
alias_method :all_tasks, :all_commands
-
-
# Removes a given command from this Thor class. This is usually done if you
-
# are inheriting from another class and don't want it to be available
-
# anymore.
-
#
-
# By default it only remove the mapping to the command. But you can supply
-
# :undefine => true to undefine the method from the class as well.
-
#
-
# ==== Parameters
-
# name<Symbol|String>:: The name of the command to be removed
-
# options<Hash>:: You can give :undefine => true if you want commands the method
-
# to be undefined from the class as well.
-
#
-
1
def remove_command(*names)
-
options = names.last.is_a?(Hash) ? names.pop : {}
-
-
names.each do |name|
-
commands.delete(name.to_s)
-
all_commands.delete(name.to_s)
-
undef_method name if options[:undefine]
-
end
-
end
-
1
alias_method :remove_task, :remove_command
-
-
# All methods defined inside the given block are not added as commands.
-
#
-
# So you can do:
-
#
-
# class MyScript < Thor
-
# no_commands do
-
# def this_is_not_a_command
-
# end
-
# end
-
# end
-
#
-
# You can also add the method and remove it from the command list:
-
#
-
# class MyScript < Thor
-
# def this_is_not_a_command
-
# end
-
# remove_command :this_is_not_a_command
-
# end
-
#
-
1
def no_commands
-
@no_commands = true
-
yield
-
ensure
-
@no_commands = false
-
end
-
1
alias_method :no_tasks, :no_commands
-
-
# Sets the namespace for the Thor or Thor::Group class. By default the
-
# namespace is retrieved from the class name. If your Thor class is named
-
# Scripts::MyScript, the help method, for example, will be called as:
-
#
-
# thor scripts:my_script -h
-
#
-
# If you change the namespace:
-
#
-
# namespace :my_scripts
-
#
-
# You change how your commands are invoked:
-
#
-
# thor my_scripts -h
-
#
-
# Finally, if you change your namespace to default:
-
#
-
# namespace :default
-
#
-
# Your commands can be invoked with a shortcut. Instead of:
-
#
-
# thor :my_command
-
#
-
1
def namespace(name = nil)
-
if name
-
@namespace = name.to_s
-
else
-
@namespace ||= Thor::Util.namespace_from_thor_class(self)
-
end
-
end
-
-
# Parses the command and options from the given args, instantiate the class
-
# and invoke the command. This method is used when the arguments must be parsed
-
# from an array. If you are inside Ruby and want to use a Thor class, you
-
# can simply initialize it:
-
#
-
# script = MyScript.new(args, options, config)
-
# script.invoke(:command, first_arg, second_arg, third_arg)
-
#
-
1
def start(given_args = ARGV, config = {})
-
config[:shell] ||= Thor::Base.shell.new
-
dispatch(nil, given_args.dup, nil, config)
-
rescue Thor::Error => e
-
config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
-
exit(1) if exit_on_failure?
-
rescue Errno::EPIPE
-
# This happens if a thor command is piped to something like `head`,
-
# which closes the pipe when it's done reading. This will also
-
# mean that if the pipe is closed, further unnecessary
-
# computation will not occur.
-
exit(0)
-
end
-
-
# Allows to use private methods from parent in child classes as commands.
-
#
-
# ==== Parameters
-
# names<Array>:: Method names to be used as commands
-
#
-
# ==== Examples
-
#
-
# public_command :foo
-
# public_command :foo, :bar, :baz
-
#
-
1
def public_command(*names)
-
names.each do |name|
-
class_eval "def #{name}(*); super end"
-
end
-
end
-
1
alias_method :public_task, :public_command
-
-
1
def handle_no_command_error(command, has_namespace = $thor_runner) #:nodoc:
-
if has_namespace
-
fail UndefinedCommandError, "Could not find command #{command.inspect} in #{namespace.inspect} namespace."
-
else
-
fail UndefinedCommandError, "Could not find command #{command.inspect}."
-
end
-
end
-
1
alias_method :handle_no_task_error, :handle_no_command_error
-
-
1
def handle_argument_error(command, error, args, arity) #:nodoc:
-
msg = "ERROR: \"#{basename} #{command.name}\" was called with "
-
msg << "no arguments" if args.empty?
-
msg << "arguments " << args.inspect unless args.empty?
-
msg << "\nUsage: #{banner(command).inspect}"
-
fail InvocationError, msg
-
end
-
-
1
protected
-
-
# Prints the class options per group. If an option does not belong to
-
# any group, it's printed as Class option.
-
#
-
1
def class_options_help(shell, groups = {}) #:nodoc:
-
# Group options by group
-
class_options.each do |_, value|
-
groups[value.group] ||= []
-
groups[value.group] << value
-
end
-
-
# Deal with default group
-
global_options = groups.delete(nil) || []
-
print_options(shell, global_options)
-
-
# Print all others
-
groups.each do |group_name, options|
-
print_options(shell, options, group_name)
-
end
-
end
-
-
# Receives a set of options and print them.
-
1
def print_options(shell, options, group_name = nil)
-
return if options.empty?
-
-
list = []
-
padding = options.map { |o| o.aliases.size }.max.to_i * 4
-
-
options.each do |option|
-
unless option.hide
-
item = [option.usage(padding)]
-
item.push(option.description ? "# #{option.description}" : "")
-
-
list << item
-
list << ["", "# Default: #{option.default}"] if option.show_default?
-
list << ["", "# Possible values: #{option.enum.join(', ')}"] if option.enum
-
end
-
end
-
-
shell.say(group_name ? "#{group_name} options:" : "Options:")
-
shell.print_table(list, :indent => 2)
-
shell.say ""
-
end
-
-
# Raises an error if the word given is a Thor reserved word.
-
1
def is_thor_reserved_word?(word, type) #:nodoc:
-
return false unless THOR_RESERVED_WORDS.include?(word.to_s)
-
fail "#{word.inspect} is a Thor reserved word and cannot be defined as #{type}"
-
end
-
-
# Build an option and adds it to the given scope.
-
#
-
# ==== Parameters
-
# name<Symbol>:: The name of the argument.
-
# options<Hash>:: Described in both class_option and method_option.
-
# scope<Hash>:: Options hash that is being built up
-
1
def build_option(name, options, scope) #:nodoc:
-
scope[name] = Thor::Option.new(name, options)
-
end
-
-
# Receives a hash of options, parse them and add to the scope. This is a
-
# fast way to set a bunch of options:
-
#
-
# build_options :foo => true, :bar => :required, :baz => :string
-
#
-
# ==== Parameters
-
# Hash[Symbol => Object]
-
1
def build_options(options, scope) #:nodoc:
-
options.each do |key, value|
-
scope[key] = Thor::Option.parse(key, value)
-
end
-
end
-
-
# Finds a command with the given name. If the command belongs to the current
-
# class, just return it, otherwise dup it and add the fresh copy to the
-
# current command hash.
-
1
def find_and_refresh_command(name) #:nodoc:
-
if commands[name.to_s]
-
commands[name.to_s]
-
elsif command = all_commands[name.to_s] # rubocop:disable AssignmentInCondition
-
commands[name.to_s] = command.clone
-
else
-
fail ArgumentError, "You supplied :for => #{name.inspect}, but the command #{name.inspect} could not be found."
-
end
-
end
-
1
alias_method :find_and_refresh_task, :find_and_refresh_command
-
-
# Everytime someone inherits from a Thor class, register the klass
-
# and file into baseclass.
-
1
def inherited(klass)
-
Thor::Base.register_klass_file(klass)
-
klass.instance_variable_set(:@no_commands, false)
-
end
-
-
# Fire this callback whenever a method is added. Added methods are
-
# tracked as commands by invoking the create_command method.
-
1
def method_added(meth)
-
1
meth = meth.to_s
-
-
1
if meth == "initialize"
-
initialize_added
-
return
-
end
-
-
# Return if it's not a public instance method
-
1
return unless public_method_defined?(meth.to_sym)
-
-
@no_commands ||= false
-
return if @no_commands || !create_command(meth)
-
-
is_thor_reserved_word?(meth, :command)
-
Thor::Base.register_klass_file(self)
-
end
-
-
# Retrieves a value from superclass. If it reaches the baseclass,
-
# returns default.
-
1
def from_superclass(method, default = nil)
-
if self == baseclass || !superclass.respond_to?(method, true)
-
default
-
else
-
value = superclass.send(method)
-
-
# Ruby implements `dup` on Object, but raises a `TypeError`
-
# if the method is called on immediates. As a result, we
-
# don't have a good way to check whether dup will succeed
-
# without calling it and rescuing the TypeError.
-
begin
-
value.dup
-
rescue TypeError
-
value
-
end
-
-
end
-
end
-
-
# A flag that makes the process exit with status 1 if any error happens.
-
1
def exit_on_failure?
-
false
-
end
-
-
#
-
# The basename of the program invoking the thor class.
-
#
-
1
def basename
-
File.basename($PROGRAM_NAME).split(" ").first
-
end
-
-
# SIGNATURE: Sets the baseclass. This is where the superclass lookup
-
# finishes.
-
1
def baseclass #:nodoc:
-
end
-
-
# SIGNATURE: Creates a new command if valid_command? is true. This method is
-
# called when a new method is added to the class.
-
1
def create_command(meth) #:nodoc:
-
end
-
1
alias_method :create_task, :create_command
-
-
# SIGNATURE: Defines behavior when the initialize method is added to the
-
# class.
-
1
def initialize_added #:nodoc:
-
end
-
-
# SIGNATURE: The hook invoked by start.
-
1
def dispatch(command, given_args, given_opts, config) #:nodoc:
-
fail NotImplementedError
-
end
-
end
-
end
-
end
-
1
class Thor
-
1
class Command < Struct.new(:name, :description, :long_description, :usage, :options)
-
1
FILE_REGEXP = /^#{Regexp.escape(File.dirname(__FILE__))}/
-
-
1
def initialize(name, description, long_description, usage, options = nil)
-
super(name.to_s, description, long_description, usage, options || {})
-
end
-
-
1
def initialize_copy(other) #:nodoc:
-
super(other)
-
self.options = other.options.dup if other.options
-
end
-
-
1
def hidden?
-
false
-
end
-
-
# By default, a command invokes a method in the thor class. You can change this
-
# implementation to create custom commands.
-
1
def run(instance, args = [])
-
arity = nil
-
-
if private_method?(instance)
-
instance.class.handle_no_command_error(name)
-
elsif public_method?(instance)
-
arity = instance.method(name).arity
-
instance.__send__(name, *args)
-
elsif local_method?(instance, :method_missing)
-
instance.__send__(:method_missing, name.to_sym, *args)
-
else
-
instance.class.handle_no_command_error(name)
-
end
-
rescue ArgumentError => e
-
handle_argument_error?(instance, e, caller) ? instance.class.handle_argument_error(self, e, args, arity) : (raise e)
-
rescue NoMethodError => e
-
handle_no_method_error?(instance, e, caller) ? instance.class.handle_no_command_error(name) : (fail e)
-
end
-
-
# Returns the formatted usage by injecting given required arguments
-
# and required options into the given usage.
-
1
def formatted_usage(klass, namespace = true, subcommand = false)
-
if namespace
-
namespace = klass.namespace
-
formatted = "#{namespace.gsub(/^(default)/, '')}:"
-
end
-
formatted = "#{klass.namespace.split(':').last} " if subcommand
-
-
formatted ||= ""
-
-
# Add usage with required arguments
-
formatted << if klass && !klass.arguments.empty?
-
usage.to_s.gsub(/^#{name}/) do |match|
-
match << " " << klass.arguments.map { |a| a.usage }.compact.join(" ")
-
end
-
else
-
usage.to_s
-
end
-
-
# Add required options
-
formatted << " #{required_options}"
-
-
# Strip and go!
-
formatted.strip
-
end
-
-
1
protected
-
-
1
def not_debugging?(instance)
-
!(instance.class.respond_to?(:debugging) && instance.class.debugging)
-
end
-
-
1
def required_options
-
@required_options ||= options.map { |_, o| o.usage if o.required? }.compact.sort.join(" ")
-
end
-
-
# Given a target, checks if this class name is a public method.
-
1
def public_method?(instance) #:nodoc:
-
!(instance.public_methods & [name.to_s, name.to_sym]).empty?
-
end
-
-
1
def private_method?(instance)
-
!(instance.private_methods & [name.to_s, name.to_sym]).empty?
-
end
-
-
1
def local_method?(instance, name)
-
methods = instance.public_methods(false) + instance.private_methods(false) + instance.protected_methods(false)
-
!(methods & [name.to_s, name.to_sym]).empty?
-
end
-
-
1
def sans_backtrace(backtrace, caller) #:nodoc:
-
saned = backtrace.reject { |frame| frame =~ FILE_REGEXP || (frame =~ /\.java:/ && RUBY_PLATFORM =~ /java/) || (frame =~ /^kernel\// && RUBY_ENGINE =~ /rbx/) }
-
saned - caller
-
end
-
-
1
def handle_argument_error?(instance, error, caller)
-
not_debugging?(instance) && (error.message =~ /wrong number of arguments/ || error.message =~ /given \d*, expected \d*/) && begin
-
saned = sans_backtrace(error.backtrace, caller)
-
# Ruby 1.9 always include the called method in the backtrace
-
saned.empty? || (saned.size == 1 && RUBY_VERSION >= "1.9")
-
end
-
end
-
-
1
def handle_no_method_error?(instance, error, caller)
-
not_debugging?(instance) &&
-
error.message =~ /^undefined method `#{name}' for #{Regexp.escape(instance.to_s)}$/
-
end
-
end
-
1
Task = Command # rubocop:disable ConstantName
-
-
# A command that is hidden in help messages but still invocable.
-
1
class HiddenCommand < Command
-
1
def hidden?
-
true
-
end
-
end
-
1
HiddenTask = HiddenCommand # rubocop:disable ConstantName
-
-
# A dynamic command that handles method missing scenarios.
-
1
class DynamicCommand < Command
-
1
def initialize(name, options = nil)
-
super(name.to_s, "A dynamically-generated command", name.to_s, name.to_s, options)
-
end
-
-
1
def run(instance, args = [])
-
if (instance.methods & [name.to_s, name.to_sym]).empty?
-
super
-
else
-
instance.class.handle_no_command_error(name)
-
end
-
end
-
end
-
1
DynamicTask = DynamicCommand # rubocop:disable ConstantName
-
end
-
1
class Thor
-
1
module CoreExt #:nodoc:
-
# A hash with indifferent access and magic predicates.
-
#
-
# hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true
-
#
-
# hash[:foo] #=> 'bar'
-
# hash['foo'] #=> 'bar'
-
# hash.foo? #=> true
-
#
-
1
class HashWithIndifferentAccess < ::Hash #:nodoc:
-
1
def initialize(hash = {})
-
1
super()
-
1
hash.each do |key, value|
-
3
self[convert_key(key)] = value
-
end
-
end
-
-
1
def [](key)
-
24
super(convert_key(key))
-
end
-
-
1
def []=(key, value)
-
3
super(convert_key(key), value)
-
end
-
-
1
def delete(key)
-
3
super(convert_key(key))
-
end
-
-
1
def values_at(*indices)
-
indices.map { |key| self[convert_key(key)] }
-
end
-
-
1
def merge(other)
-
dup.merge!(other)
-
end
-
-
1
def merge!(other)
-
other.each do |key, value|
-
self[convert_key(key)] = value
-
end
-
self
-
end
-
-
# Convert to a Hash with String keys.
-
1
def to_hash
-
Hash.new(default).merge!(self)
-
end
-
-
1
protected
-
-
1
def convert_key(key)
-
33
key.is_a?(Symbol) ? key.to_s : key
-
end
-
-
# Magic predicates. For instance:
-
#
-
# options.force? # => !!options['force']
-
# options.shebang # => "/usr/lib/local/ruby"
-
# options.test_framework?(:rspec) # => options[:test_framework] == :rspec
-
#
-
1
def method_missing(method, *args, &block)
-
method = method.to_s
-
if method =~ /^(\w+)\?$/
-
if args.empty?
-
!!self[$1]
-
else
-
self[$1] == args.first
-
end
-
else
-
self[method]
-
end
-
end
-
end
-
end
-
end
-
1
class Thor
-
1
module CoreExt #:nodoc:
-
1
if RUBY_VERSION >= "1.9"
-
1
class OrderedHash < ::Hash
-
end
-
else
-
# This class is based on the Ruby 1.9 ordered hashes.
-
#
-
# It keeps the semantics and most of the efficiency of normal hashes
-
# while also keeping track of the order in which elements were set.
-
#
-
class OrderedHash #:nodoc:
-
include Enumerable
-
-
Node = Struct.new(:key, :value, :next, :prev)
-
-
def initialize
-
@hash = {}
-
end
-
-
def [](key)
-
@hash[key] && @hash[key].value
-
end
-
-
def []=(key, value)
-
if node = @hash[key] # rubocop:disable AssignmentInCondition
-
node.value = value
-
else
-
node = Node.new(key, value)
-
-
if !defined?(@first) || @first.nil?
-
@first = @last = node
-
else
-
node.prev = @last
-
@last.next = node
-
@last = node
-
end
-
end
-
-
@hash[key] = node
-
value
-
end
-
-
def delete(key)
-
if node = @hash[key] # rubocop:disable AssignmentInCondition
-
prev_node = node.prev
-
next_node = node.next
-
-
next_node.prev = prev_node if next_node
-
prev_node.next = next_node if prev_node
-
-
@first = next_node if @first == node
-
@last = prev_node if @last == node
-
-
value = node.value
-
end
-
-
@hash.delete(key)
-
value
-
end
-
-
def keys
-
map { |k, v| k }
-
end
-
-
def values
-
map { |k, v| v }
-
end
-
-
def each
-
return unless defined?(@first) && @first
-
yield [@first.key, @first.value]
-
node = @first
-
yield [node.key, node.value] while node = node.next # rubocop:disable AssignmentInCondition
-
self
-
end
-
-
def merge(other)
-
hash = self.class.new
-
-
each do |key, value|
-
hash[key] = value
-
end
-
-
other.each do |key, value|
-
hash[key] = value
-
end
-
-
hash
-
end
-
-
def empty?
-
@hash.empty?
-
end
-
end
-
end
-
end
-
end
-
1
class Thor
-
# Thor::Error is raised when it's caused by wrong usage of thor classes. Those
-
# errors have their backtrace suppressed and are nicely shown to the user.
-
#
-
# Errors that are caused by the developer, like declaring a method which
-
# overwrites a thor keyword, it SHOULD NOT raise a Thor::Error. This way, we
-
# ensure that developer errors are shown with full backtrace.
-
1
class Error < StandardError
-
end
-
-
# Raised when a command was not found.
-
1
class UndefinedCommandError < Error
-
end
-
1
UndefinedTaskError = UndefinedCommandError # rubocop:disable ConstantName
-
-
1
class AmbiguousCommandError < Error
-
end
-
1
AmbiguousTaskError = AmbiguousCommandError # rubocop:disable ConstantName
-
-
# Raised when a command was found, but not invoked properly.
-
1
class InvocationError < Error
-
end
-
-
1
class UnknownArgumentError < Error
-
end
-
-
1
class RequiredArgumentMissingError < InvocationError
-
end
-
-
1
class MalformattedArgumentError < InvocationError
-
end
-
end
-
1
require "thor/base"
-
-
# Thor has a special class called Thor::Group. The main difference to Thor class
-
# is that it invokes all commands at once. It also include some methods that allows
-
# invocations to be done at the class method, which are not available to Thor
-
# commands.
-
1
class Thor::Group # rubocop:disable ClassLength
-
1
class << self
-
# The description for this Thor::Group. If none is provided, but a source root
-
# exists, tries to find the USAGE one folder above it, otherwise searches
-
# in the superclass.
-
#
-
# ==== Parameters
-
# description<String>:: The description for this Thor::Group.
-
#
-
1
def desc(description = nil)
-
if description
-
@desc = description
-
else
-
@desc ||= from_superclass(:desc, nil)
-
end
-
end
-
-
# Prints help information.
-
#
-
# ==== Options
-
# short:: When true, shows only usage.
-
#
-
1
def help(shell)
-
shell.say "Usage:"
-
shell.say " #{banner}\n"
-
shell.say
-
class_options_help(shell)
-
shell.say desc if desc
-
end
-
-
# Stores invocations for this class merging with superclass values.
-
#
-
1
def invocations #:nodoc:
-
@invocations ||= from_superclass(:invocations, {})
-
end
-
-
# Stores invocation blocks used on invoke_from_option.
-
#
-
1
def invocation_blocks #:nodoc:
-
@invocation_blocks ||= from_superclass(:invocation_blocks, {})
-
end
-
-
# Invoke the given namespace or class given. It adds an instance
-
# method that will invoke the klass and command. You can give a block to
-
# configure how it will be invoked.
-
#
-
# The namespace/class given will have its options showed on the help
-
# usage. Check invoke_from_option for more information.
-
#
-
1
def invoke(*names, &block) # rubocop:disable MethodLength
-
options = names.last.is_a?(Hash) ? names.pop : {}
-
verbose = options.fetch(:verbose, true)
-
-
names.each do |name|
-
invocations[name] = false
-
invocation_blocks[name] = block if block_given?
-
-
class_eval <<-METHOD, __FILE__, __LINE__
-
def _invoke_#{name.to_s.gsub(/\W/, "_")}
-
klass, command = self.class.prepare_for_invocation(nil, #{name.inspect})
-
-
if klass
-
say_status :invoke, #{name.inspect}, #{verbose.inspect}
-
block = self.class.invocation_blocks[#{name.inspect}]
-
_invoke_for_class_method klass, command, &block
-
else
-
say_status :error, %(#{name.inspect} [not found]), :red
-
end
-
end
-
METHOD
-
end
-
end
-
-
# Invoke a thor class based on the value supplied by the user to the
-
# given option named "name". A class option must be created before this
-
# method is invoked for each name given.
-
#
-
# ==== Examples
-
#
-
# class GemGenerator < Thor::Group
-
# class_option :test_framework, :type => :string
-
# invoke_from_option :test_framework
-
# end
-
#
-
# ==== Boolean options
-
#
-
# In some cases, you want to invoke a thor class if some option is true or
-
# false. This is automatically handled by invoke_from_option. Then the
-
# option name is used to invoke the generator.
-
#
-
# ==== Preparing for invocation
-
#
-
# In some cases you want to customize how a specified hook is going to be
-
# invoked. You can do that by overwriting the class method
-
# prepare_for_invocation. The class method must necessarily return a klass
-
# and an optional command.
-
#
-
# ==== Custom invocations
-
#
-
# You can also supply a block to customize how the option is going to be
-
# invoked. The block receives two parameters, an instance of the current
-
# class and the klass to be invoked.
-
#
-
1
def invoke_from_option(*names, &block) # rubocop:disable MethodLength
-
options = names.last.is_a?(Hash) ? names.pop : {}
-
verbose = options.fetch(:verbose, :white)
-
-
names.each do |name|
-
unless class_options.key?(name)
-
fail ArgumentError, "You have to define the option #{name.inspect} " <<
-
"before setting invoke_from_option."
-
end
-
-
invocations[name] = true
-
invocation_blocks[name] = block if block_given?
-
-
class_eval <<-METHOD, __FILE__, __LINE__
-
def _invoke_from_option_#{name.to_s.gsub(/\W/, "_")}
-
return unless options[#{name.inspect}]
-
-
value = options[#{name.inspect}]
-
value = #{name.inspect} if TrueClass === value
-
klass, command = self.class.prepare_for_invocation(#{name.inspect}, value)
-
-
if klass
-
say_status :invoke, value, #{verbose.inspect}
-
block = self.class.invocation_blocks[#{name.inspect}]
-
_invoke_for_class_method klass, command, &block
-
else
-
say_status :error, %(\#{value} [not found]), :red
-
end
-
end
-
METHOD
-
end
-
end
-
-
# Remove a previously added invocation.
-
#
-
# ==== Examples
-
#
-
# remove_invocation :test_framework
-
#
-
1
def remove_invocation(*names)
-
names.each do |name|
-
remove_command(name)
-
remove_class_option(name)
-
invocations.delete(name)
-
invocation_blocks.delete(name)
-
end
-
end
-
-
# Overwrite class options help to allow invoked generators options to be
-
# shown recursively when invoking a generator.
-
#
-
1
def class_options_help(shell, groups = {}) #:nodoc:
-
get_options_from_invocations(groups, class_options) do |klass|
-
klass.send(:get_options_from_invocations, groups, class_options)
-
end
-
super(shell, groups)
-
end
-
-
# Get invocations array and merge options from invocations. Those
-
# options are added to group_options hash. Options that already exists
-
# in base_options are not added twice.
-
#
-
1
def get_options_from_invocations(group_options, base_options) #:nodoc: # rubocop:disable MethodLength
-
invocations.each do |name, from_option|
-
value = if from_option
-
option = class_options[name]
-
option.type == :boolean ? name : option.default
-
else
-
name
-
end
-
next unless value
-
-
klass, _ = prepare_for_invocation(name, value)
-
next unless klass && klass.respond_to?(:class_options)
-
-
value = value.to_s
-
human_name = value.respond_to?(:classify) ? value.classify : value
-
-
group_options[human_name] ||= []
-
group_options[human_name] += klass.class_options.values.select do |class_option|
-
base_options[class_option.name.to_sym].nil? && class_option.group.nil? &&
-
!group_options.values.flatten.any? { |i| i.name == class_option.name }
-
end
-
-
yield klass if block_given?
-
end
-
end
-
-
# Returns commands ready to be printed.
-
1
def printable_commands(*)
-
item = []
-
item << banner
-
item << (desc ? "# #{desc.gsub(/\s+/m, ' ')}" : "")
-
[item]
-
end
-
1
alias_method :printable_tasks, :printable_commands
-
-
1
def handle_argument_error(command, error, args, arity) #:nodoc:
-
msg = "#{basename} #{command.name} takes #{arity} argument"
-
msg << "s" if arity > 1
-
msg << ", but it should not."
-
fail error, msg
-
end
-
-
1
protected
-
-
# The method responsible for dispatching given the args.
-
1
def dispatch(command, given_args, given_opts, config) #:nodoc:
-
if Thor::HELP_MAPPINGS.include?(given_args.first)
-
help(config[:shell])
-
return
-
end
-
-
args, opts = Thor::Options.split(given_args)
-
opts = given_opts || opts
-
-
instance = new(args, opts, config)
-
yield instance if block_given?
-
-
if command
-
instance.invoke_command(all_commands[command])
-
else
-
instance.invoke_all
-
end
-
end
-
-
# The banner for this class. You can customize it if you are invoking the
-
# thor class by another ways which is not the Thor::Runner.
-
1
def banner
-
"#{basename} #{self_command.formatted_usage(self, false)}"
-
end
-
-
# Represents the whole class as a command.
-
1
def self_command #:nodoc:
-
Thor::DynamicCommand.new(namespace, class_options)
-
end
-
1
alias_method :self_task, :self_command
-
-
1
def baseclass #:nodoc:
-
Thor::Group
-
end
-
-
1
def create_command(meth) #:nodoc:
-
commands[meth.to_s] = Thor::Command.new(meth, nil, nil, nil, nil)
-
true
-
end
-
1
alias_method :create_task, :create_command
-
end
-
-
1
include Thor::Base
-
-
1
protected
-
-
# Shortcut to invoke with padding and block handling. Use internally by
-
# invoke and invoke_from_option class methods.
-
1
def _invoke_for_class_method(klass, command = nil, *args, &block) #:nodoc:
-
with_padding do
-
if block
-
case block.arity
-
when 3
-
block.call(self, klass, command)
-
when 2
-
block.call(self, klass)
-
when 1
-
instance_exec(klass, &block)
-
end
-
else
-
invoke klass, command, *args
-
end
-
end
-
end
-
end
-
1
class Thor
-
1
module Invocation
-
1
def self.included(base) #:nodoc:
-
1
base.extend ClassMethods
-
end
-
-
1
module ClassMethods
-
# This method is responsible for receiving a name and find the proper
-
# class and command for it. The key is an optional parameter which is
-
# available only in class methods invocations (i.e. in Thor::Group).
-
1
def prepare_for_invocation(key, name) #:nodoc:
-
case name
-
when Symbol, String
-
Thor::Util.find_class_and_command_by_namespace(name.to_s, !key)
-
else
-
name
-
end
-
end
-
end
-
-
# Make initializer aware of invocations and the initialization args.
-
1
def initialize(args = [], options = {}, config = {}, &block) #:nodoc:
-
@_invocations = config[:invocations] || Hash.new { |h, k| h[k] = [] }
-
@_initializer = [args, options, config]
-
super
-
end
-
-
# Make the current command chain accessible with in a Thor-(sub)command
-
1
def current_command_chain
-
@_invocations.values.flatten.map(&:to_sym)
-
end
-
-
# Receives a name and invokes it. The name can be a string (either "command" or
-
# "namespace:command"), a Thor::Command, a Class or a Thor instance. If the
-
# command cannot be guessed by name, it can also be supplied as second argument.
-
#
-
# You can also supply the arguments, options and configuration values for
-
# the command to be invoked, if none is given, the same values used to
-
# initialize the invoker are used to initialize the invoked.
-
#
-
# When no name is given, it will invoke the default command of the current class.
-
#
-
# ==== Examples
-
#
-
# class A < Thor
-
# def foo
-
# invoke :bar
-
# invoke "b:hello", ["Erik"]
-
# end
-
#
-
# def bar
-
# invoke "b:hello", ["Erik"]
-
# end
-
# end
-
#
-
# class B < Thor
-
# def hello(name)
-
# puts "hello #{name}"
-
# end
-
# end
-
#
-
# You can notice that the method "foo" above invokes two commands: "bar",
-
# which belongs to the same class and "hello" which belongs to the class B.
-
#
-
# By using an invocation system you ensure that a command is invoked only once.
-
# In the example above, invoking "foo" will invoke "b:hello" just once, even
-
# if it's invoked later by "bar" method.
-
#
-
# When class A invokes class B, all arguments used on A initialization are
-
# supplied to B. This allows lazy parse of options. Let's suppose you have
-
# some rspec commands:
-
#
-
# class Rspec < Thor::Group
-
# class_option :mock_framework, :type => :string, :default => :rr
-
#
-
# def invoke_mock_framework
-
# invoke "rspec:#{options[:mock_framework]}"
-
# end
-
# end
-
#
-
# As you noticed, it invokes the given mock framework, which might have its
-
# own options:
-
#
-
# class Rspec::RR < Thor::Group
-
# class_option :style, :type => :string, :default => :mock
-
# end
-
#
-
# Since it's not rspec concern to parse mock framework options, when RR
-
# is invoked all options are parsed again, so RR can extract only the options
-
# that it's going to use.
-
#
-
# If you want Rspec::RR to be initialized with its own set of options, you
-
# have to do that explicitly:
-
#
-
# invoke "rspec:rr", [], :style => :foo
-
#
-
# Besides giving an instance, you can also give a class to invoke:
-
#
-
# invoke Rspec::RR, [], :style => :foo
-
#
-
1
def invoke(name = nil, *args)
-
if name.nil?
-
warn "[Thor] Calling invoke() without argument is deprecated. Please use invoke_all instead.\n#{caller.join("\n")}"
-
return invoke_all
-
end
-
-
args.unshift(nil) if args.first.is_a?(Array) || args.first.nil?
-
command, args, opts, config = args
-
-
klass, command = _retrieve_class_and_command(name, command)
-
fail "Missing Thor class for invoke #{name}" unless klass
-
fail "Expected Thor class, got #{klass}" unless klass <= Thor::Base
-
-
args, opts, config = _parse_initialization_options(args, opts, config)
-
klass.send(:dispatch, command, args, opts, config) do |instance|
-
instance.parent_options = options
-
end
-
end
-
-
# Invoke the given command if the given args.
-
1
def invoke_command(command, *args) #:nodoc:
-
current = @_invocations[self.class]
-
-
unless current.include?(command.name)
-
current << command.name
-
command.run(self, *args)
-
end
-
end
-
1
alias_method :invoke_task, :invoke_command
-
-
# Invoke all commands for the current instance.
-
1
def invoke_all #:nodoc:
-
self.class.all_commands.map { |_, command| invoke_command(command) }
-
end
-
-
# Invokes using shell padding.
-
1
def invoke_with_padding(*args)
-
with_padding { invoke(*args) }
-
end
-
-
1
protected
-
-
# Configuration values that are shared between invocations.
-
1
def _shared_configuration #:nodoc:
-
{:invocations => @_invocations}
-
end
-
-
# This method simply retrieves the class and command to be invoked.
-
# If the name is nil or the given name is a command in the current class,
-
# use the given name and return self as class. Otherwise, call
-
# prepare_for_invocation in the current class.
-
1
def _retrieve_class_and_command(name, sent_command = nil) #:nodoc:
-
case
-
when name.nil?
-
[self.class, nil]
-
when self.class.all_commands[name.to_s]
-
[self.class, name.to_s]
-
else
-
klass, command = self.class.prepare_for_invocation(nil, name)
-
[klass, command || sent_command]
-
end
-
end
-
1
alias_method :_retrieve_class_and_task, :_retrieve_class_and_command
-
-
# Initialize klass using values stored in the @_initializer.
-
1
def _parse_initialization_options(args, opts, config) #:nodoc:
-
stored_args, stored_opts, stored_config = @_initializer
-
-
args ||= stored_args.dup
-
opts ||= stored_opts.dup
-
-
config ||= {}
-
config = stored_config.merge(_shared_configuration).merge!(config)
-
-
[args, opts, config]
-
end
-
end
-
end
-
1
require "thor/line_editor/basic"
-
1
require "thor/line_editor/readline"
-
-
1
class Thor
-
1
module LineEditor
-
1
def self.readline(prompt, options = {})
-
best_available.new(prompt, options).readline
-
end
-
-
1
def self.best_available
-
[
-
Thor::LineEditor::Readline,
-
Thor::LineEditor::Basic
-
].detect(&:available?)
-
end
-
end
-
end
-
1
class Thor
-
1
module LineEditor
-
1
class Basic
-
1
attr_reader :prompt, :options
-
-
1
def self.available?
-
true
-
end
-
-
1
def initialize(prompt, options)
-
@prompt = prompt
-
@options = options
-
end
-
-
1
def readline
-
$stdout.print(prompt)
-
get_input
-
end
-
-
1
private
-
-
1
def get_input
-
if echo?
-
$stdin.gets
-
else
-
$stdin.noecho(&:gets)
-
end
-
end
-
-
1
def echo?
-
options.fetch(:echo, true)
-
end
-
end
-
end
-
end
-
1
begin
-
1
require "readline"
-
rescue LoadError
-
end
-
-
1
class Thor
-
1
module LineEditor
-
1
class Readline < Basic
-
1
def self.available?
-
Object.const_defined?(:Readline)
-
end
-
-
1
def readline
-
if echo?
-
::Readline.completion_append_character = nil
-
# Ruby 1.8.7 does not allow Readline.completion_proc= to receive nil.
-
if complete = completion_proc
-
::Readline.completion_proc = complete
-
end
-
::Readline.readline(prompt, add_to_history?)
-
else
-
super
-
end
-
end
-
-
1
private
-
-
1
def add_to_history?
-
options.fetch(:add_to_history, true)
-
end
-
-
1
def completion_proc
-
if use_path_completion?
-
proc { |text| PathCompletion.new(text).matches }
-
elsif completion_options.any?
-
proc do |text|
-
completion_options.select { |option| option.start_with?(text) }
-
end
-
end
-
end
-
-
1
def completion_options
-
options.fetch(:limited_to, [])
-
end
-
-
1
def use_path_completion?
-
options.fetch(:path, false)
-
end
-
-
1
class PathCompletion
-
1
attr_reader :text
-
1
private :text
-
-
1
def initialize(text)
-
@text = text
-
end
-
-
1
def matches
-
relative_matches
-
end
-
-
1
private
-
-
1
def relative_matches
-
absolute_matches.map { |path| path.sub(base_path, "") }
-
end
-
-
1
def absolute_matches
-
Dir[glob_pattern].map do |path|
-
if File.directory?(path)
-
"#{path}/"
-
else
-
path
-
end
-
end
-
end
-
-
1
def glob_pattern
-
"#{base_path}#{text}*"
-
end
-
-
1
def base_path
-
"#{Dir.pwd}/"
-
end
-
end
-
end
-
end
-
end
-
1
require "thor/parser/argument"
-
1
require "thor/parser/arguments"
-
1
require "thor/parser/option"
-
1
require "thor/parser/options"
-
1
class Thor
-
1
class Argument #:nodoc:
-
1
VALID_TYPES = [:numeric, :hash, :array, :string]
-
-
1
attr_reader :name, :description, :enum, :required, :type, :default, :banner
-
1
alias_method :human_name, :name
-
-
1
def initialize(name, options = {})
-
class_name = self.class.name.split("::").last
-
-
type = options[:type]
-
-
fail ArgumentError, "#{class_name} name can't be nil." if name.nil?
-
fail ArgumentError, "Type :#{type} is not valid for #{class_name.downcase}s." if type && !valid_type?(type)
-
-
@name = name.to_s
-
@description = options[:desc]
-
@required = options.key?(:required) ? options[:required] : true
-
@type = (type || :string).to_sym
-
@default = options[:default]
-
@banner = options[:banner] || default_banner
-
@enum = options[:enum]
-
-
validate! # Trigger specific validations
-
end
-
-
1
def usage
-
required? ? banner : "[#{banner}]"
-
end
-
-
1
def required?
-
required
-
end
-
-
1
def show_default?
-
case default
-
when Array, String, Hash
-
!default.empty?
-
else
-
default
-
end
-
end
-
-
1
protected
-
-
1
def validate!
-
if required? && !default.nil?
-
fail ArgumentError, "An argument cannot be required and have default value."
-
elsif @enum && !@enum.is_a?(Array)
-
fail ArgumentError, "An argument cannot have an enum other than an array."
-
end
-
end
-
-
1
def valid_type?(type)
-
self.class::VALID_TYPES.include?(type.to_sym)
-
end
-
-
1
def default_banner
-
case type
-
when :boolean
-
nil
-
when :string, :default
-
human_name.upcase
-
when :numeric
-
"N"
-
when :hash
-
"key:value"
-
when :array
-
"one two three"
-
end
-
end
-
end
-
end
-
1
class Thor
-
1
class Arguments #:nodoc: # rubocop:disable ClassLength
-
1
NUMERIC = /(\d*\.\d+|\d+)/
-
-
# Receives an array of args and returns two arrays, one with arguments
-
# and one with switches.
-
#
-
1
def self.split(args)
-
arguments = []
-
-
args.each do |item|
-
break if item =~ /^-/
-
arguments << item
-
end
-
-
[arguments, args[Range.new(arguments.size, -1)]]
-
end
-
-
1
def self.parse(*args)
-
to_parse = args.pop
-
new(*args).parse(to_parse)
-
end
-
-
# Takes an array of Thor::Argument objects.
-
#
-
1
def initialize(arguments = [])
-
@assigns, @non_assigned_required = {}, []
-
@switches = arguments
-
-
arguments.each do |argument|
-
if !argument.default.nil?
-
@assigns[argument.human_name] = argument.default
-
elsif argument.required?
-
@non_assigned_required << argument
-
end
-
end
-
end
-
-
1
def parse(args)
-
@pile = args.dup
-
-
@switches.each do |argument|
-
break unless peek
-
@non_assigned_required.delete(argument)
-
@assigns[argument.human_name] = send(:"parse_#{argument.type}", argument.human_name)
-
end
-
-
check_requirement!
-
@assigns
-
end
-
-
1
def remaining # rubocop:disable TrivialAccessors
-
@pile
-
end
-
-
1
private
-
-
1
def no_or_skip?(arg)
-
arg =~ /^--(no|skip)-([-\w]+)$/
-
$2
-
end
-
-
1
def last?
-
@pile.empty?
-
end
-
-
1
def peek
-
@pile.first
-
end
-
-
1
def shift
-
@pile.shift
-
end
-
-
1
def unshift(arg)
-
if arg.kind_of?(Array)
-
@pile = arg + @pile
-
else
-
@pile.unshift(arg)
-
end
-
end
-
-
1
def current_is_value?
-
peek && peek.to_s !~ /^-/
-
end
-
-
# Runs through the argument array getting strings that contains ":" and
-
# mark it as a hash:
-
#
-
# [ "name:string", "age:integer" ]
-
#
-
# Becomes:
-
#
-
# { "name" => "string", "age" => "integer" }
-
#
-
1
def parse_hash(name)
-
return shift if peek.is_a?(Hash)
-
hash = {}
-
-
while current_is_value? && peek.include?(":")
-
key, value = shift.split(":", 2)
-
hash[key] = value
-
end
-
hash
-
end
-
-
# Runs through the argument array getting all strings until no string is
-
# found or a switch is found.
-
#
-
# ["a", "b", "c"]
-
#
-
# And returns it as an array:
-
#
-
# ["a", "b", "c"]
-
#
-
1
def parse_array(name)
-
return shift if peek.is_a?(Array)
-
array = []
-
array << shift while current_is_value?
-
array
-
end
-
-
# Check if the peek is numeric format and return a Float or Integer.
-
# Check if the peek is included in enum if enum is provided.
-
# Otherwise raises an error.
-
#
-
1
def parse_numeric(name)
-
return shift if peek.is_a?(Numeric)
-
-
unless peek =~ NUMERIC && $& == peek
-
fail MalformattedArgumentError, "Expected numeric value for '#{name}'; got #{peek.inspect}"
-
end
-
-
value = $&.index(".") ? shift.to_f : shift.to_i
-
if @switches.is_a?(Hash) && switch = @switches[name]
-
if switch.enum && !switch.enum.include?(value)
-
fail MalformattedArgumentError, "Expected '#{name}' to be one of #{switch.enum.join(', ')}; got #{value}"
-
end
-
end
-
value
-
end
-
-
# Parse string:
-
# for --string-arg, just return the current value in the pile
-
# for --no-string-arg, nil
-
# Check if the peek is included in enum if enum is provided. Otherwise raises an error.
-
#
-
1
def parse_string(name)
-
if no_or_skip?(name)
-
nil
-
else
-
value = shift
-
if @switches.is_a?(Hash) && switch = @switches[name] # rubocop:disable AssignmentInCondition
-
if switch.enum && !switch.enum.include?(value)
-
fail MalformattedArgumentError, "Expected '#{name}' to be one of #{switch.enum.join(', ')}; got #{value}"
-
end
-
end
-
value
-
end
-
end
-
-
# Raises an error if @non_assigned_required array is not empty.
-
#
-
1
def check_requirement!
-
unless @non_assigned_required.empty?
-
names = @non_assigned_required.map do |o|
-
o.respond_to?(:switch_name) ? o.switch_name : o.human_name
-
end.join("', '")
-
-
class_name = self.class.name.split("::").last.downcase
-
fail RequiredArgumentMissingError, "No value provided for required #{class_name} '#{names}'"
-
end
-
end
-
end
-
end
-
1
class Thor
-
1
class Option < Argument #:nodoc:
-
1
attr_reader :aliases, :group, :lazy_default, :hide
-
-
1
VALID_TYPES = [:boolean, :numeric, :hash, :array, :string]
-
-
1
def initialize(name, options = {})
-
options[:required] = false unless options.key?(:required)
-
super
-
@lazy_default = options[:lazy_default]
-
@group = options[:group].to_s.capitalize if options[:group]
-
@aliases = Array(options[:aliases])
-
@hide = options[:hide]
-
end
-
-
# This parse quick options given as method_options. It makes several
-
# assumptions, but you can be more specific using the option method.
-
#
-
# parse :foo => "bar"
-
# #=> Option foo with default value bar
-
#
-
# parse [:foo, :baz] => "bar"
-
# #=> Option foo with default value bar and alias :baz
-
#
-
# parse :foo => :required
-
# #=> Required option foo without default value
-
#
-
# parse :foo => 2
-
# #=> Option foo with default value 2 and type numeric
-
#
-
# parse :foo => :numeric
-
# #=> Option foo without default value and type numeric
-
#
-
# parse :foo => true
-
# #=> Option foo with default value true and type boolean
-
#
-
# The valid types are :boolean, :numeric, :hash, :array and :string. If none
-
# is given a default type is assumed. This default type accepts arguments as
-
# string (--foo=value) or booleans (just --foo).
-
#
-
# By default all options are optional, unless :required is given.
-
#
-
1
def self.parse(key, value) # rubocop:disable MethodLength
-
if key.is_a?(Array)
-
name, *aliases = key
-
else
-
name, aliases = key, []
-
end
-
-
name = name.to_s
-
default = value
-
-
type = case value
-
when Symbol
-
default = nil
-
if VALID_TYPES.include?(value)
-
value
-
elsif required = (value == :required) # rubocop:disable AssignmentInCondition
-
:string
-
end
-
when TrueClass, FalseClass
-
:boolean
-
when Numeric
-
:numeric
-
when Hash, Array, String
-
value.class.name.downcase.to_sym
-
end
-
new(name.to_s, :required => required, :type => type, :default => default, :aliases => aliases)
-
end
-
-
1
def switch_name
-
@switch_name ||= dasherized? ? name : dasherize(name)
-
end
-
-
1
def human_name
-
@human_name ||= dasherized? ? undasherize(name) : name
-
end
-
-
1
def usage(padding = 0)
-
sample = if banner && !banner.to_s.empty?
-
"#{switch_name}=#{banner}"
-
else
-
switch_name
-
end
-
-
sample = "[#{sample}]" unless required?
-
-
if boolean?
-
sample << ", [#{dasherize("no-" + human_name)}]" unless name == "force"
-
end
-
-
if aliases.empty?
-
(" " * padding) << sample
-
else
-
"#{aliases.join(', ')}, #{sample}"
-
end
-
end
-
-
1
VALID_TYPES.each do |type|
-
5
class_eval <<-RUBY, __FILE__, __LINE__ + 1
-
def #{type}?
-
self.type == #{type.inspect}
-
end
-
RUBY
-
end
-
-
1
protected
-
-
1
def validate!
-
fail ArgumentError, "An option cannot be boolean and required." if boolean? && required?
-
end
-
-
1
def dasherized?
-
name.index("-") == 0
-
end
-
-
1
def undasherize(str)
-
str.sub(/^-{1,2}/, "")
-
end
-
-
1
def dasherize(str)
-
(str.length > 1 ? "--" : "-") + str.gsub("_", "-")
-
end
-
end
-
end
-
1
class Thor
-
1
class Options < Arguments #:nodoc: # rubocop:disable ClassLength
-
1
LONG_RE = /^(--\w+(?:-\w+)*)$/
-
1
SHORT_RE = /^(-[a-z])$/i
-
1
EQ_RE = /^(--\w+(?:-\w+)*|-[a-z])=(.*)$/i
-
1
SHORT_SQ_RE = /^-([a-z]{2,})$/i # Allow either -x -v or -xv style for single char args
-
1
SHORT_NUM = /^(-[a-z])#{NUMERIC}$/i
-
1
OPTS_END = "--".freeze
-
-
# Receives a hash and makes it switches.
-
1
def self.to_switches(options)
-
options.map do |key, value|
-
case value
-
when true
-
"--#{key}"
-
when Array
-
"--#{key} #{value.map { |v| v.inspect }.join(' ')}"
-
when Hash
-
"--#{key} #{value.map { |k, v| "#{k}:#{v}" }.join(' ')}"
-
when nil, false
-
""
-
else
-
"--#{key} #{value.inspect}"
-
end
-
end.join(" ")
-
end
-
-
# Takes a hash of Thor::Option and a hash with defaults.
-
#
-
# If +stop_on_unknown+ is true, #parse will stop as soon as it encounters
-
# an unknown option or a regular argument.
-
1
def initialize(hash_options = {}, defaults = {}, stop_on_unknown = false)
-
@stop_on_unknown = stop_on_unknown
-
options = hash_options.values
-
super(options)
-
-
# Add defaults
-
defaults.each do |key, value|
-
@assigns[key.to_s] = value
-
@non_assigned_required.delete(hash_options[key])
-
end
-
-
@shorts, @switches, @extra = {}, {}, []
-
-
options.each do |option|
-
@switches[option.switch_name] = option
-
-
option.aliases.each do |short|
-
name = short.to_s.sub(/^(?!\-)/, "-")
-
@shorts[name] ||= option.switch_name
-
end
-
end
-
end
-
-
1
def remaining # rubocop:disable TrivialAccessors
-
@extra
-
end
-
-
1
def peek
-
return super unless @parsing_options
-
-
result = super
-
if result == OPTS_END
-
shift
-
@parsing_options = false
-
super
-
else
-
result
-
end
-
end
-
-
1
def parse(args) # rubocop:disable MethodLength
-
@pile = args.dup
-
@parsing_options = true
-
-
while peek
-
if parsing_options?
-
match, is_switch = current_is_switch?
-
shifted = shift
-
-
if is_switch
-
case shifted
-
when SHORT_SQ_RE
-
unshift($1.split("").map { |f| "-#{f}" })
-
next
-
when EQ_RE, SHORT_NUM
-
unshift($2)
-
switch = $1
-
when LONG_RE, SHORT_RE
-
switch = $1
-
end
-
-
switch = normalize_switch(switch)
-
option = switch_option(switch)
-
@assigns[option.human_name] = parse_peek(switch, option)
-
elsif @stop_on_unknown
-
@parsing_options = false
-
@extra << shifted
-
@extra << shift while peek
-
break
-
elsif match
-
@extra << shifted
-
@extra << shift while peek && peek !~ /^-/
-
else
-
@extra << shifted
-
end
-
else
-
@extra << shift
-
end
-
end
-
-
check_requirement!
-
-
assigns = Thor::CoreExt::HashWithIndifferentAccess.new(@assigns)
-
assigns.freeze
-
assigns
-
end
-
-
1
def check_unknown!
-
# an unknown option starts with - or -- and has no more --'s afterward.
-
unknown = @extra.select { |str| str =~ /^--?(?:(?!--).)*$/ }
-
fail UnknownArgumentError, "Unknown switches '#{unknown.join(', ')}'" unless unknown.empty?
-
end
-
-
1
protected
-
-
# Check if the current value in peek is a registered switch.
-
#
-
# Two booleans are returned. The first is true if the current value
-
# starts with a hyphen; the second is true if it is a registered switch.
-
1
def current_is_switch?
-
case peek
-
when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM
-
[true, switch?($1)]
-
when SHORT_SQ_RE
-
[true, $1.split("").any? { |f| switch?("-#{f}") }]
-
else
-
[false, false]
-
end
-
end
-
-
1
def current_is_switch_formatted?
-
case peek
-
when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM, SHORT_SQ_RE
-
true
-
else
-
false
-
end
-
end
-
-
1
def current_is_value?
-
peek && (!parsing_options? || super)
-
end
-
-
1
def switch?(arg)
-
switch_option(normalize_switch(arg))
-
end
-
-
1
def switch_option(arg)
-
if match = no_or_skip?(arg) # rubocop:disable AssignmentInCondition
-
@switches[arg] || @switches["--#{match}"]
-
else
-
@switches[arg]
-
end
-
end
-
-
# Check if the given argument is actually a shortcut.
-
#
-
1
def normalize_switch(arg)
-
(@shorts[arg] || arg).tr("_", "-")
-
end
-
-
1
def parsing_options?
-
peek
-
@parsing_options
-
end
-
-
# Parse boolean values which can be given as --foo=true, --foo or --no-foo.
-
#
-
1
def parse_boolean(switch)
-
if current_is_value?
-
if ["true", "TRUE", "t", "T", true].include?(peek)
-
shift
-
true
-
elsif ["false", "FALSE", "f", "F", false].include?(peek)
-
shift
-
false
-
else
-
true
-
end
-
else
-
@switches.key?(switch) || !no_or_skip?(switch)
-
end
-
end
-
-
# Parse the value at the peek analyzing if it requires an input or not.
-
#
-
1
def parse_peek(switch, option)
-
if parsing_options? && (current_is_switch_formatted? || last?)
-
if option.boolean?
-
# No problem for boolean types
-
elsif no_or_skip?(switch)
-
return nil # User set value to nil
-
elsif option.string? && !option.required?
-
# Return the default if there is one, else the human name
-
return option.lazy_default || option.default || option.human_name
-
elsif option.lazy_default
-
return option.lazy_default
-
else
-
fail MalformattedArgumentError, "No value provided for option '#{switch}'"
-
end
-
end
-
-
@non_assigned_required.delete(option)
-
send(:"parse_#{option.type}", switch)
-
end
-
end
-
end
-
1
require "rbconfig"
-
-
1
class Thor
-
1
module Base
-
1
class << self
-
1
attr_writer :shell
-
-
# Returns the shell used in all Thor classes. If you are in a Unix platform
-
# it will use a colored log, otherwise it will use a basic one without color.
-
#
-
1
def shell
-
@shell ||= if ENV["THOR_SHELL"] && ENV["THOR_SHELL"].size > 0
-
Thor::Shell.const_get(ENV["THOR_SHELL"])
-
elsif RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ && !ENV["ANSICON"]
-
Thor::Shell::Basic
-
else
-
Thor::Shell::Color
-
end
-
end
-
end
-
end
-
-
1
module Shell
-
1
SHELL_DELEGATED_METHODS = [:ask, :error, :set_color, :yes?, :no?, :say, :say_status, :print_in_columns, :print_table, :print_wrapped, :file_collision, :terminal_width]
-
1
attr_writer :shell
-
-
1
autoload :Basic, "thor/shell/basic"
-
1
autoload :Color, "thor/shell/color"
-
1
autoload :HTML, "thor/shell/html"
-
-
# Add shell to initialize config values.
-
#
-
# ==== Configuration
-
# shell<Object>:: An instance of the shell to be used.
-
#
-
# ==== Examples
-
#
-
# class MyScript < Thor
-
# argument :first, :type => :numeric
-
# end
-
#
-
# MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new
-
#
-
1
def initialize(args = [], options = {}, config = {})
-
super
-
self.shell = config[:shell]
-
shell.base ||= self if shell.respond_to?(:base)
-
end
-
-
# Holds the shell for the given Thor instance. If no shell is given,
-
# it gets a default shell from Thor::Base.shell.
-
1
def shell
-
@shell ||= Thor::Base.shell.new
-
end
-
-
# Common methods that are delegated to the shell.
-
1
SHELL_DELEGATED_METHODS.each do |method|
-
12
module_eval <<-METHOD, __FILE__, __LINE__
-
def #{method}(*args,&block)
-
shell.#{method}(*args,&block)
-
end
-
METHOD
-
end
-
-
# Yields the given block with padding.
-
1
def with_padding
-
shell.padding += 1
-
yield
-
ensure
-
shell.padding -= 1
-
end
-
-
1
protected
-
-
# Allow shell to be shared between invocations.
-
#
-
1
def _shared_configuration #:nodoc:
-
super.merge!(:shell => shell)
-
end
-
end
-
end
-
1
require "tempfile"
-
1
require "io/console" if RUBY_VERSION > "1.9.2"
-
-
1
class Thor
-
1
module Shell
-
1
class Basic # rubocop:disable ClassLength
-
1
attr_accessor :base
-
1
attr_reader :padding
-
-
# Initialize base, mute and padding to nil.
-
#
-
1
def initialize #:nodoc:
-
@base, @mute, @padding, @always_force = nil, false, 0, false
-
end
-
-
# Mute everything that's inside given block
-
#
-
1
def mute
-
@mute = true
-
yield
-
ensure
-
@mute = false
-
end
-
-
# Check if base is muted
-
#
-
1
def mute? # rubocop:disable TrivialAccessors
-
@mute
-
end
-
-
# Sets the output padding, not allowing less than zero values.
-
#
-
1
def padding=(value)
-
@padding = [0, value].max
-
end
-
-
# Asks something to the user and receives a response.
-
#
-
# If asked to limit the correct responses, you can pass in an
-
# array of acceptable answers. If one of those is not supplied,
-
# they will be shown a message stating that one of those answers
-
# must be given and re-asked the question.
-
#
-
# If asking for sensitive information, the :echo option can be set
-
# to false to mask user input from $stdin.
-
#
-
# If the required input is a path, then set the path option to
-
# true. This will enable tab completion for file paths relative
-
# to the current working directory on systems that support
-
# Readline.
-
#
-
# ==== Example
-
# ask("What is your name?")
-
#
-
# ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
-
#
-
# ask("What is your password?", :echo => false)
-
#
-
# ask("Where should the file be saved?", :path => true)
-
#
-
1
def ask(statement, *args)
-
options = args.last.is_a?(Hash) ? args.pop : {}
-
color = args.first
-
-
if options[:limited_to]
-
ask_filtered(statement, color, options)
-
else
-
ask_simply(statement, color, options)
-
end
-
end
-
-
# Say (print) something to the user. If the sentence ends with a whitespace
-
# or tab character, a new line is not appended (print + flush). Otherwise
-
# are passed straight to puts (behavior got from Highline).
-
#
-
# ==== Example
-
# say("I know you knew that.")
-
#
-
1
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
-
buffer = prepare_message(message, *color)
-
buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")
-
-
stdout.print(buffer)
-
stdout.flush
-
end
-
-
# Say a status with the given color and appends the message. Since this
-
# method is used frequently by actions, it allows nil or false to be given
-
# in log_status, avoiding the message from being shown. If a Symbol is
-
# given in log_status, it's used as the color.
-
#
-
1
def say_status(status, message, log_status = true)
-
return if quiet? || log_status == false
-
spaces = " " * (padding + 1)
-
color = log_status.is_a?(Symbol) ? log_status : :green
-
-
status = status.to_s.rjust(12)
-
status = set_color status, color, true if color
-
-
buffer = "#{status}#{spaces}#{message}"
-
buffer << "\n" unless buffer.end_with?("\n")
-
-
stdout.print(buffer)
-
stdout.flush
-
end
-
-
# Make a question the to user and returns true if the user replies "y" or
-
# "yes".
-
#
-
1
def yes?(statement, color = nil)
-
!!(ask(statement, color, :add_to_history => false) =~ is?(:yes))
-
end
-
-
# Make a question the to user and returns true if the user replies "n" or
-
# "no".
-
#
-
1
def no?(statement, color = nil)
-
!!(ask(statement, color, :add_to_history => false) =~ is?(:no))
-
end
-
-
# Prints values in columns
-
#
-
# ==== Parameters
-
# Array[String, String, ...]
-
#
-
1
def print_in_columns(array)
-
return if array.empty?
-
colwidth = (array.map { |el| el.to_s.size }.max || 0) + 2
-
array.each_with_index do |value, index|
-
# Don't output trailing spaces when printing the last column
-
if ((((index + 1) % (terminal_width / colwidth))).zero? && !index.zero?) || index + 1 == array.length
-
stdout.puts value
-
else
-
stdout.printf("%-#{colwidth}s", value)
-
end
-
end
-
end
-
-
# Prints a table.
-
#
-
# ==== Parameters
-
# Array[Array[String, String, ...]]
-
#
-
# ==== Options
-
# indent<Integer>:: Indent the first column by indent value.
-
# colwidth<Integer>:: Force the first column to colwidth spaces wide.
-
#
-
1
def print_table(array, options = {}) # rubocop:disable MethodLength
-
return if array.empty?
-
-
formats, indent, colwidth = [], options[:indent].to_i, options[:colwidth]
-
options[:truncate] = terminal_width if options[:truncate] == true
-
-
formats << "%-#{colwidth + 2}s" if colwidth
-
start = colwidth ? 1 : 0
-
-
colcount = array.max { |a, b| a.size <=> b.size }.size
-
-
maximas = []
-
-
start.upto(colcount - 1) do |index|
-
maxima = array.map { |row| row[index] ? row[index].to_s.size : 0 }.max
-
maximas << maxima
-
if index == colcount - 1
-
# Don't output 2 trailing spaces when printing the last column
-
formats << "%-s"
-
else
-
formats << "%-#{maxima + 2}s"
-
end
-
end
-
-
formats[0] = formats[0].insert(0, " " * indent)
-
formats << "%s"
-
-
array.each do |row|
-
sentence = ""
-
-
row.each_with_index do |column, index|
-
maxima = maximas[index]
-
-
if column.is_a?(Numeric)
-
if index == row.size - 1
-
# Don't output 2 trailing spaces when printing the last column
-
f = "%#{maxima}s"
-
else
-
f = "%#{maxima}s "
-
end
-
else
-
f = formats[index]
-
end
-
sentence << f % column.to_s
-
end
-
-
sentence = truncate(sentence, options[:truncate]) if options[:truncate]
-
stdout.puts sentence
-
end
-
end
-
-
# Prints a long string, word-wrapping the text to the current width of the
-
# terminal display. Ideal for printing heredocs.
-
#
-
# ==== Parameters
-
# String
-
#
-
# ==== Options
-
# indent<Integer>:: Indent each line of the printed paragraph by indent value.
-
#
-
1
def print_wrapped(message, options = {})
-
indent = options[:indent] || 0
-
width = terminal_width - indent
-
paras = message.split("\n\n")
-
-
paras.map! do |unwrapped|
-
unwrapped.strip.gsub(/\n/, " ").squeeze(" ").gsub(/.{1,#{width}}(?:\s|\Z)/) { ($& + 5.chr).gsub(/\n\005/, "\n").gsub(/\005/, "\n") }
-
end
-
-
paras.each do |para|
-
para.split("\n").each do |line|
-
stdout.puts line.insert(0, " " * indent)
-
end
-
stdout.puts unless para == paras.last
-
end
-
end
-
-
# Deals with file collision and returns true if the file should be
-
# overwritten and false otherwise. If a block is given, it uses the block
-
# response as the content for the diff.
-
#
-
# ==== Parameters
-
# destination<String>:: the destination file to solve conflicts
-
# block<Proc>:: an optional block that returns the value to be used in diff
-
#
-
1
def file_collision(destination) # rubocop:disable MethodLength
-
return true if @always_force
-
options = block_given? ? "[Ynaqdh]" : "[Ynaqh]"
-
-
loop do
-
answer = ask(
-
%[Overwrite #{destination}? (enter "h" for help) #{options}],
-
:add_to_history => false
-
)
-
-
case answer
-
when is?(:yes), is?(:force), ""
-
return true
-
when is?(:no), is?(:skip)
-
return false
-
when is?(:always)
-
return @always_force = true
-
when is?(:quit)
-
say "Aborting..."
-
fail SystemExit
-
when is?(:diff)
-
show_diff(destination, yield) if block_given?
-
say "Retrying..."
-
else
-
say file_collision_help
-
end
-
end
-
end
-
-
# This code was copied from Rake, available under MIT-LICENSE
-
# Copyright (c) 2003, 2004 Jim Weirich
-
1
def terminal_width
-
if ENV["THOR_COLUMNS"]
-
result = ENV["THOR_COLUMNS"].to_i
-
else
-
result = unix? ? dynamic_width : 80
-
end
-
result < 10 ? 80 : result
-
rescue
-
80
-
end
-
-
# Called if something goes wrong during the execution. This is used by Thor
-
# internally and should not be used inside your scripts. If something went
-
# wrong, you can always raise an exception. If you raise a Thor::Error, it
-
# will be rescued and wrapped in the method below.
-
#
-
1
def error(statement)
-
stderr.puts statement
-
end
-
-
# Apply color to the given string with optional bold. Disabled in the
-
# Thor::Shell::Basic class.
-
#
-
1
def set_color(string, *args) #:nodoc:
-
string
-
end
-
-
1
protected
-
-
1
def prepare_message(message, *color)
-
spaces = " " * padding
-
spaces + set_color(message.to_s, *color)
-
end
-
-
1
def can_display_colors?
-
false
-
end
-
-
1
def lookup_color(color)
-
return color unless color.is_a?(Symbol)
-
self.class.const_get(color.to_s.upcase)
-
end
-
-
1
def stdout
-
$stdout
-
end
-
-
1
def stderr
-
$stderr
-
end
-
-
1
def is?(value) #:nodoc:
-
value = value.to_s
-
-
if value.size == 1
-
/\A#{value}\z/i
-
else
-
/\A(#{value}|#{value[0, 1]})\z/i
-
end
-
end
-
-
1
def file_collision_help #:nodoc:
-
<<-HELP
-
Y - yes, overwrite
-
n - no, do not overwrite
-
a - all, overwrite this and all others
-
q - quit, abort
-
d - diff, show the differences between the old and the new
-
h - help, show this help
-
HELP
-
end
-
-
1
def show_diff(destination, content) #:nodoc:
-
diff_cmd = ENV["THOR_DIFF"] || ENV["RAILS_DIFF"] || "diff -u"
-
-
Tempfile.open(File.basename(destination), File.dirname(destination)) do |temp|
-
temp.write content
-
temp.rewind
-
system %(#{diff_cmd} "#{destination}" "#{temp.path}")
-
end
-
end
-
-
1
def quiet? #:nodoc:
-
mute? || (base && base.options[:quiet])
-
end
-
-
# Calculate the dynamic width of the terminal
-
1
def dynamic_width
-
@dynamic_width ||= (dynamic_width_stty.nonzero? || dynamic_width_tput)
-
end
-
-
1
def dynamic_width_stty
-
%x(stty size 2>/dev/null).split[1].to_i
-
end
-
-
1
def dynamic_width_tput
-
%x(tput cols 2>/dev/null).to_i
-
end
-
-
1
def unix?
-
RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
-
end
-
-
1
def truncate(string, width)
-
as_unicode do
-
chars = string.chars.to_a
-
if chars.length <= width
-
chars.join
-
else
-
( chars[0, width - 3].join) + "..."
-
end
-
end
-
end
-
-
1
if "".respond_to?(:encode)
-
1
def as_unicode
-
yield
-
end
-
else
-
def as_unicode
-
old, $KCODE = $KCODE, "U"
-
yield
-
ensure
-
$KCODE = old
-
end
-
end
-
-
1
def ask_simply(statement, color, options)
-
default = options[:default]
-
message = [statement, ("(#{default})" if default), nil].uniq.join(" ")
-
message = prepare_message(message, color)
-
result = Thor::LineEditor.readline(message, options)
-
-
return unless result
-
-
result.strip!
-
-
if default && result == ""
-
default
-
else
-
result
-
end
-
end
-
-
1
def ask_filtered(statement, color, options)
-
answer_set = options[:limited_to]
-
correct_answer = nil
-
until correct_answer
-
answers = answer_set.join(", ")
-
answer = ask_simply("#{statement} [#{answers}]", color, options)
-
correct_answer = answer_set.include?(answer) ? answer : nil
-
say("Your response must be one of: [#{answers}]. Please try again.") unless correct_answer
-
end
-
correct_answer
-
end
-
end
-
end
-
end
-
1
require "rbconfig"
-
-
1
class Thor
-
1
module Sandbox #:nodoc:
-
end
-
-
# This module holds several utilities:
-
#
-
# 1) Methods to convert thor namespaces to constants and vice-versa.
-
#
-
# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz"
-
#
-
# 2) Loading thor files and sandboxing:
-
#
-
# Thor::Util.load_thorfile("~/.thor/foo")
-
#
-
1
module Util
-
1
class << self
-
# Receives a namespace and search for it in the Thor::Base subclasses.
-
#
-
# ==== Parameters
-
# namespace<String>:: The namespace to search for.
-
#
-
1
def find_by_namespace(namespace)
-
namespace = "default#{namespace}" if namespace.empty? || namespace =~ /^:/
-
Thor::Base.subclasses.detect { |klass| klass.namespace == namespace }
-
end
-
-
# Receives a constant and converts it to a Thor namespace. Since Thor
-
# commands can be added to a sandbox, this method is also responsable for
-
# removing the sandbox namespace.
-
#
-
# This method should not be used in general because it's used to deal with
-
# older versions of Thor. On current versions, if you need to get the
-
# namespace from a class, just call namespace on it.
-
#
-
# ==== Parameters
-
# constant<Object>:: The constant to be converted to the thor path.
-
#
-
# ==== Returns
-
# String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz"
-
#
-
1
def namespace_from_thor_class(constant)
-
constant = constant.to_s.gsub(/^Thor::Sandbox::/, "")
-
constant = snake_case(constant).squeeze(":")
-
constant
-
end
-
-
# Given the contents, evaluate it inside the sandbox and returns the
-
# namespaces defined in the sandbox.
-
#
-
# ==== Parameters
-
# contents<String>
-
#
-
# ==== Returns
-
# Array[Object]
-
#
-
1
def namespaces_in_content(contents, file = __FILE__)
-
old_constants = Thor::Base.subclasses.dup
-
Thor::Base.subclasses.clear
-
-
load_thorfile(file, contents)
-
-
new_constants = Thor::Base.subclasses.dup
-
Thor::Base.subclasses.replace(old_constants)
-
-
new_constants.map! { |c| c.namespace }
-
new_constants.compact!
-
new_constants
-
end
-
-
# Returns the thor classes declared inside the given class.
-
#
-
1
def thor_classes_in(klass)
-
stringfied_constants = klass.constants.map { |c| c.to_s }
-
Thor::Base.subclasses.select do |subclass|
-
next unless subclass.name
-
stringfied_constants.include?(subclass.name.gsub("#{klass.name}::", ""))
-
end
-
end
-
-
# Receives a string and convert it to snake case. SnakeCase returns snake_case.
-
#
-
# ==== Parameters
-
# String
-
#
-
# ==== Returns
-
# String
-
#
-
1
def snake_case(str)
-
return str.downcase if str =~ /^[A-Z_]+$/
-
str.gsub(/\B[A-Z]/, '_\&').squeeze("_") =~ /_*(.*)/
-
$+.downcase
-
end
-
-
# Receives a string and convert it to camel case. camel_case returns CamelCase.
-
#
-
# ==== Parameters
-
# String
-
#
-
# ==== Returns
-
# String
-
#
-
1
def camel_case(str)
-
return str if str !~ /_/ && str =~ /[A-Z]+.*/
-
str.split("_").map { |i| i.capitalize }.join
-
end
-
-
# Receives a namespace and tries to retrieve a Thor or Thor::Group class
-
# from it. It first searches for a class using the all the given namespace,
-
# if it's not found, removes the highest entry and searches for the class
-
# again. If found, returns the highest entry as the class name.
-
#
-
# ==== Examples
-
#
-
# class Foo::Bar < Thor
-
# def baz
-
# end
-
# end
-
#
-
# class Baz::Foo < Thor::Group
-
# end
-
#
-
# Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command
-
# Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil
-
# Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"
-
#
-
# ==== Parameters
-
# namespace<String>
-
#
-
1
def find_class_and_command_by_namespace(namespace, fallback = true)
-
if namespace.include?(":") # look for a namespaced command
-
pieces = namespace.split(":")
-
command = pieces.pop
-
klass = Thor::Util.find_by_namespace(pieces.join(":"))
-
end
-
unless klass # look for a Thor::Group with the right name
-
klass, command = Thor::Util.find_by_namespace(namespace), nil
-
end
-
if !klass && fallback # try a command in the default namespace
-
command = namespace
-
klass = Thor::Util.find_by_namespace("")
-
end
-
[klass, command]
-
end
-
1
alias_method :find_class_and_task_by_namespace, :find_class_and_command_by_namespace
-
-
# Receives a path and load the thor file in the path. The file is evaluated
-
# inside the sandbox to avoid namespacing conflicts.
-
#
-
1
def load_thorfile(path, content = nil, debug = false)
-
content ||= File.binread(path)
-
-
begin
-
Thor::Sandbox.class_eval(content, path)
-
rescue StandardError => e
-
$stderr.puts("WARNING: unable to load thorfile #{path.inspect}: #{e.message}")
-
if debug
-
$stderr.puts(*e.backtrace)
-
else
-
$stderr.puts(e.backtrace.first)
-
end
-
end
-
end
-
-
1
def user_home # rubocop:disable MethodLength
-
@@user_home ||= if ENV["HOME"]
-
ENV["HOME"]
-
elsif ENV["USERPROFILE"]
-
ENV["USERPROFILE"]
-
elsif ENV["HOMEDRIVE"] && ENV["HOMEPATH"]
-
File.join(ENV["HOMEDRIVE"], ENV["HOMEPATH"])
-
elsif ENV["APPDATA"]
-
ENV["APPDATA"]
-
else
-
begin
-
File.expand_path("~")
-
rescue
-
if File::ALT_SEPARATOR
-
"C:/"
-
else
-
"/"
-
end
-
end
-
end
-
end
-
-
# Returns the root where thor files are located, depending on the OS.
-
#
-
1
def thor_root
-
File.join(user_home, ".thor").gsub(/\\/, "/")
-
end
-
-
# Returns the files in the thor root. On Windows thor_root will be something
-
# like this:
-
#
-
# C:\Documents and Settings\james\.thor
-
#
-
# If we don't #gsub the \ character, Dir.glob will fail.
-
#
-
1
def thor_root_glob
-
files = Dir["#{escape_globs(thor_root)}/*"]
-
-
files.map! do |file|
-
File.directory?(file) ? File.join(file, "main.thor") : file
-
end
-
end
-
-
# Where to look for Thor files.
-
#
-
1
def globs_for(path)
-
path = escape_globs(path)
-
["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/*.thor"]
-
end
-
-
# Return the path to the ruby interpreter taking into account multiple
-
# installations and windows extensions.
-
#
-
1
def ruby_command # rubocop:disable MethodLength
-
@ruby_command ||= begin
-
ruby_name = RbConfig::CONFIG["ruby_install_name"]
-
ruby = File.join(RbConfig::CONFIG["bindir"], ruby_name)
-
ruby << RbConfig::CONFIG["EXEEXT"]
-
-
# avoid using different name than ruby (on platforms supporting links)
-
if ruby_name != "ruby" && File.respond_to?(:readlink)
-
begin
-
alternate_ruby = File.join(RbConfig::CONFIG["bindir"], "ruby")
-
alternate_ruby << RbConfig::CONFIG["EXEEXT"]
-
-
# ruby is a symlink
-
if File.symlink? alternate_ruby
-
linked_ruby = File.readlink alternate_ruby
-
-
# symlink points to 'ruby_install_name'
-
ruby = alternate_ruby if linked_ruby == ruby_name || linked_ruby == ruby
-
end
-
rescue NotImplementedError # rubocop:disable HandleExceptions
-
# just ignore on windows
-
end
-
end
-
-
# escape string in case path to ruby executable contain spaces.
-
ruby.sub!(/.*\s.*/m, '"\&"')
-
ruby
-
end
-
end
-
-
# Returns a string that has had any glob characters escaped.
-
# The glob characters are `* ? { } [ ]`.
-
#
-
# ==== Examples
-
#
-
# Thor::Util.escape_globs('[apps]') # => '\[apps\]'
-
#
-
# ==== Parameters
-
# String
-
#
-
# ==== Returns
-
# String
-
#
-
1
def escape_globs(path)
-
path.to_s.gsub(/[*?{}\[\]]/, '\\\\\\&')
-
end
-
end
-
end
-
end
-
# encoding: UTF-8
-
-
# This file contains data derived from the IANA Time Zone Database
-
# (http://www.iana.org/time-zones).
-
-
1
module TZInfo
-
1
module Data
-
1
module Definitions
-
1
module America
-
1
module New_York
-
1
include TimezoneDefinition
-
-
1
timezone 'America/New_York' do |tz|
-
1
tz.offset :o0, -17762, 0, :LMT
-
1
tz.offset :o1, -18000, 0, :EST
-
1
tz.offset :o2, -18000, 3600, :EDT
-
1
tz.offset :o3, -18000, 3600, :EWT
-
1
tz.offset :o4, -18000, 3600, :EPT
-
-
1
tz.transition 1883, 11, :o1, -2717650800, 57819197, 24
-
1
tz.transition 1918, 3, :o2, -1633280400, 58120411, 24
-
1
tz.transition 1918, 10, :o1, -1615140000, 9687575, 4
-
1
tz.transition 1919, 3, :o2, -1601830800, 58129147, 24
-
1
tz.transition 1919, 10, :o1, -1583690400, 9689031, 4
-
1
tz.transition 1920, 3, :o2, -1570381200, 58137883, 24
-
1
tz.transition 1920, 10, :o1, -1551636000, 9690515, 4
-
1
tz.transition 1921, 4, :o2, -1536512400, 58147291, 24
-
1
tz.transition 1921, 9, :o1, -1523210400, 9691831, 4
-
1
tz.transition 1922, 4, :o2, -1504458000, 58156195, 24
-
1
tz.transition 1922, 9, :o1, -1491760800, 9693287, 4
-
1
tz.transition 1923, 4, :o2, -1473008400, 58164931, 24
-
1
tz.transition 1923, 9, :o1, -1459706400, 9694771, 4
-
1
tz.transition 1924, 4, :o2, -1441558800, 58173667, 24
-
1
tz.transition 1924, 9, :o1, -1428256800, 9696227, 4
-
1
tz.transition 1925, 4, :o2, -1410109200, 58182403, 24
-
1
tz.transition 1925, 9, :o1, -1396807200, 9697683, 4
-
1
tz.transition 1926, 4, :o2, -1378659600, 58191139, 24
-
1
tz.transition 1926, 9, :o1, -1365357600, 9699139, 4
-
1
tz.transition 1927, 4, :o2, -1347210000, 58199875, 24
-
1
tz.transition 1927, 9, :o1, -1333908000, 9700595, 4
-
1
tz.transition 1928, 4, :o2, -1315155600, 58208779, 24
-
1
tz.transition 1928, 9, :o1, -1301853600, 9702079, 4
-
1
tz.transition 1929, 4, :o2, -1283706000, 58217515, 24
-
1
tz.transition 1929, 9, :o1, -1270404000, 9703535, 4
-
1
tz.transition 1930, 4, :o2, -1252256400, 58226251, 24
-
1
tz.transition 1930, 9, :o1, -1238954400, 9704991, 4
-
1
tz.transition 1931, 4, :o2, -1220806800, 58234987, 24
-
1
tz.transition 1931, 9, :o1, -1207504800, 9706447, 4
-
1
tz.transition 1932, 4, :o2, -1189357200, 58243723, 24
-
1
tz.transition 1932, 9, :o1, -1176055200, 9707903, 4
-
1
tz.transition 1933, 4, :o2, -1157302800, 58252627, 24
-
1
tz.transition 1933, 9, :o1, -1144605600, 9709359, 4
-
1
tz.transition 1934, 4, :o2, -1125853200, 58261363, 24
-
1
tz.transition 1934, 9, :o1, -1112551200, 9710843, 4
-
1
tz.transition 1935, 4, :o2, -1094403600, 58270099, 24
-
1
tz.transition 1935, 9, :o1, -1081101600, 9712299, 4
-
1
tz.transition 1936, 4, :o2, -1062954000, 58278835, 24
-
1
tz.transition 1936, 9, :o1, -1049652000, 9713755, 4
-
1
tz.transition 1937, 4, :o2, -1031504400, 58287571, 24
-
1
tz.transition 1937, 9, :o1, -1018202400, 9715211, 4
-
1
tz.transition 1938, 4, :o2, -1000054800, 58296307, 24
-
1
tz.transition 1938, 9, :o1, -986752800, 9716667, 4
-
1
tz.transition 1939, 4, :o2, -968000400, 58305211, 24
-
1
tz.transition 1939, 9, :o1, -955303200, 9718123, 4
-
1
tz.transition 1940, 4, :o2, -936550800, 58313947, 24
-
1
tz.transition 1940, 9, :o1, -923248800, 9719607, 4
-
1
tz.transition 1941, 4, :o2, -905101200, 58322683, 24
-
1
tz.transition 1941, 9, :o1, -891799200, 9721063, 4
-
1
tz.transition 1942, 2, :o3, -880218000, 58329595, 24
-
1
tz.transition 1945, 8, :o4, -769395600, 58360379, 24
-
1
tz.transition 1945, 9, :o1, -765396000, 9726915, 4
-
1
tz.transition 1946, 4, :o2, -747248400, 58366531, 24
-
1
tz.transition 1946, 9, :o1, -733946400, 9728371, 4
-
1
tz.transition 1947, 4, :o2, -715798800, 58375267, 24
-
1
tz.transition 1947, 9, :o1, -702496800, 9729827, 4
-
1
tz.transition 1948, 4, :o2, -684349200, 58384003, 24
-
1
tz.transition 1948, 9, :o1, -671047200, 9731283, 4
-
1
tz.transition 1949, 4, :o2, -652899600, 58392739, 24
-
1
tz.transition 1949, 9, :o1, -639597600, 9732739, 4
-
1
tz.transition 1950, 4, :o2, -620845200, 58401643, 24
-
1
tz.transition 1950, 9, :o1, -608148000, 9734195, 4
-
1
tz.transition 1951, 4, :o2, -589395600, 58410379, 24
-
1
tz.transition 1951, 9, :o1, -576093600, 9735679, 4
-
1
tz.transition 1952, 4, :o2, -557946000, 58419115, 24
-
1
tz.transition 1952, 9, :o1, -544644000, 9737135, 4
-
1
tz.transition 1953, 4, :o2, -526496400, 58427851, 24
-
1
tz.transition 1953, 9, :o1, -513194400, 9738591, 4
-
1
tz.transition 1954, 4, :o2, -495046800, 58436587, 24
-
1
tz.transition 1954, 9, :o1, -481744800, 9740047, 4
-
1
tz.transition 1955, 4, :o2, -463597200, 58445323, 24
-
1
tz.transition 1955, 10, :o1, -447271200, 9741643, 4
-
1
tz.transition 1956, 4, :o2, -431542800, 58454227, 24
-
1
tz.transition 1956, 10, :o1, -415821600, 9743099, 4
-
1
tz.transition 1957, 4, :o2, -400093200, 58462963, 24
-
1
tz.transition 1957, 10, :o1, -384372000, 9744555, 4
-
1
tz.transition 1958, 4, :o2, -368643600, 58471699, 24
-
1
tz.transition 1958, 10, :o1, -352922400, 9746011, 4
-
1
tz.transition 1959, 4, :o2, -337194000, 58480435, 24
-
1
tz.transition 1959, 10, :o1, -321472800, 9747467, 4
-
1
tz.transition 1960, 4, :o2, -305744400, 58489171, 24
-
1
tz.transition 1960, 10, :o1, -289418400, 9748951, 4
-
1
tz.transition 1961, 4, :o2, -273690000, 58498075, 24
-
1
tz.transition 1961, 10, :o1, -257968800, 9750407, 4
-
1
tz.transition 1962, 4, :o2, -242240400, 58506811, 24
-
1
tz.transition 1962, 10, :o1, -226519200, 9751863, 4
-
1
tz.transition 1963, 4, :o2, -210790800, 58515547, 24
-
1
tz.transition 1963, 10, :o1, -195069600, 9753319, 4
-
1
tz.transition 1964, 4, :o2, -179341200, 58524283, 24
-
1
tz.transition 1964, 10, :o1, -163620000, 9754775, 4
-
1
tz.transition 1965, 4, :o2, -147891600, 58533019, 24
-
1
tz.transition 1965, 10, :o1, -131565600, 9756259, 4
-
1
tz.transition 1966, 4, :o2, -116442000, 58541755, 24
-
1
tz.transition 1966, 10, :o1, -100116000, 9757715, 4
-
1
tz.transition 1967, 4, :o2, -84387600, 58550659, 24
-
1
tz.transition 1967, 10, :o1, -68666400, 9759171, 4
-
1
tz.transition 1968, 4, :o2, -52938000, 58559395, 24
-
1
tz.transition 1968, 10, :o1, -37216800, 9760627, 4
-
1
tz.transition 1969, 4, :o2, -21488400, 58568131, 24
-
1
tz.transition 1969, 10, :o1, -5767200, 9762083, 4
-
1
tz.transition 1970, 4, :o2, 9961200
-
1
tz.transition 1970, 10, :o1, 25682400
-
1
tz.transition 1971, 4, :o2, 41410800
-
1
tz.transition 1971, 10, :o1, 57736800
-
1
tz.transition 1972, 4, :o2, 73465200
-
1
tz.transition 1972, 10, :o1, 89186400
-
1
tz.transition 1973, 4, :o2, 104914800
-
1
tz.transition 1973, 10, :o1, 120636000
-
1
tz.transition 1974, 1, :o2, 126687600
-
1
tz.transition 1974, 10, :o1, 152085600
-
1
tz.transition 1975, 2, :o2, 162370800
-
1
tz.transition 1975, 10, :o1, 183535200
-
1
tz.transition 1976, 4, :o2, 199263600
-
1
tz.transition 1976, 10, :o1, 215589600
-
1
tz.transition 1977, 4, :o2, 230713200
-
1
tz.transition 1977, 10, :o1, 247039200
-
1
tz.transition 1978, 4, :o2, 262767600
-
1
tz.transition 1978, 10, :o1, 278488800
-
1
tz.transition 1979, 4, :o2, 294217200
-
1
tz.transition 1979, 10, :o1, 309938400
-
1
tz.transition 1980, 4, :o2, 325666800
-
1
tz.transition 1980, 10, :o1, 341388000
-
1
tz.transition 1981, 4, :o2, 357116400
-
1
tz.transition 1981, 10, :o1, 372837600
-
1
tz.transition 1982, 4, :o2, 388566000
-
1
tz.transition 1982, 10, :o1, 404892000
-
1
tz.transition 1983, 4, :o2, 420015600
-
1
tz.transition 1983, 10, :o1, 436341600
-
1
tz.transition 1984, 4, :o2, 452070000
-
1
tz.transition 1984, 10, :o1, 467791200
-
1
tz.transition 1985, 4, :o2, 483519600
-
1
tz.transition 1985, 10, :o1, 499240800
-
1
tz.transition 1986, 4, :o2, 514969200
-
1
tz.transition 1986, 10, :o1, 530690400
-
1
tz.transition 1987, 4, :o2, 544604400
-
1
tz.transition 1987, 10, :o1, 562140000
-
1
tz.transition 1988, 4, :o2, 576054000
-
1
tz.transition 1988, 10, :o1, 594194400
-
1
tz.transition 1989, 4, :o2, 607503600
-
1
tz.transition 1989, 10, :o1, 625644000
-
1
tz.transition 1990, 4, :o2, 638953200
-
1
tz.transition 1990, 10, :o1, 657093600
-
1
tz.transition 1991, 4, :o2, 671007600
-
1
tz.transition 1991, 10, :o1, 688543200
-
1
tz.transition 1992, 4, :o2, 702457200
-
1
tz.transition 1992, 10, :o1, 719992800
-
1
tz.transition 1993, 4, :o2, 733906800
-
1
tz.transition 1993, 10, :o1, 752047200
-
1
tz.transition 1994, 4, :o2, 765356400
-
1
tz.transition 1994, 10, :o1, 783496800
-
1
tz.transition 1995, 4, :o2, 796806000
-
1
tz.transition 1995, 10, :o1, 814946400
-
1
tz.transition 1996, 4, :o2, 828860400
-
1
tz.transition 1996, 10, :o1, 846396000
-
1
tz.transition 1997, 4, :o2, 860310000
-
1
tz.transition 1997, 10, :o1, 877845600
-
1
tz.transition 1998, 4, :o2, 891759600
-
1
tz.transition 1998, 10, :o1, 909295200
-
1
tz.transition 1999, 4, :o2, 923209200
-
1
tz.transition 1999, 10, :o1, 941349600
-
1
tz.transition 2000, 4, :o2, 954658800
-
1
tz.transition 2000, 10, :o1, 972799200
-
1
tz.transition 2001, 4, :o2, 986108400
-
1
tz.transition 2001, 10, :o1, 1004248800
-
1
tz.transition 2002, 4, :o2, 1018162800
-
1
tz.transition 2002, 10, :o1, 1035698400
-
1
tz.transition 2003, 4, :o2, 1049612400
-
1
tz.transition 2003, 10, :o1, 1067148000
-
1
tz.transition 2004, 4, :o2, 1081062000
-
1
tz.transition 2004, 10, :o1, 1099202400
-
1
tz.transition 2005, 4, :o2, 1112511600
-
1
tz.transition 2005, 10, :o1, 1130652000
-
1
tz.transition 2006, 4, :o2, 1143961200
-
1
tz.transition 2006, 10, :o1, 1162101600
-
1
tz.transition 2007, 3, :o2, 1173596400
-
1
tz.transition 2007, 11, :o1, 1194156000
-
1
tz.transition 2008, 3, :o2, 1205046000
-
1
tz.transition 2008, 11, :o1, 1225605600
-
1
tz.transition 2009, 3, :o2, 1236495600
-
1
tz.transition 2009, 11, :o1, 1257055200
-
1
tz.transition 2010, 3, :o2, 1268550000
-
1
tz.transition 2010, 11, :o1, 1289109600
-
1
tz.transition 2011, 3, :o2, 1299999600
-
1
tz.transition 2011, 11, :o1, 1320559200
-
1
tz.transition 2012, 3, :o2, 1331449200
-
1
tz.transition 2012, 11, :o1, 1352008800
-
1
tz.transition 2013, 3, :o2, 1362898800
-
1
tz.transition 2013, 11, :o1, 1383458400
-
1
tz.transition 2014, 3, :o2, 1394348400
-
1
tz.transition 2014, 11, :o1, 1414908000
-
1
tz.transition 2015, 3, :o2, 1425798000
-
1
tz.transition 2015, 11, :o1, 1446357600
-
1
tz.transition 2016, 3, :o2, 1457852400
-
1
tz.transition 2016, 11, :o1, 1478412000
-
1
tz.transition 2017, 3, :o2, 1489302000
-
1
tz.transition 2017, 11, :o1, 1509861600
-
1
tz.transition 2018, 3, :o2, 1520751600
-
1
tz.transition 2018, 11, :o1, 1541311200
-
1
tz.transition 2019, 3, :o2, 1552201200
-
1
tz.transition 2019, 11, :o1, 1572760800
-
1
tz.transition 2020, 3, :o2, 1583650800
-
1
tz.transition 2020, 11, :o1, 1604210400
-
1
tz.transition 2021, 3, :o2, 1615705200
-
1
tz.transition 2021, 11, :o1, 1636264800
-
1
tz.transition 2022, 3, :o2, 1647154800
-
1
tz.transition 2022, 11, :o1, 1667714400
-
1
tz.transition 2023, 3, :o2, 1678604400
-
1
tz.transition 2023, 11, :o1, 1699164000
-
1
tz.transition 2024, 3, :o2, 1710054000
-
1
tz.transition 2024, 11, :o1, 1730613600
-
1
tz.transition 2025, 3, :o2, 1741503600
-
1
tz.transition 2025, 11, :o1, 1762063200
-
1
tz.transition 2026, 3, :o2, 1772953200
-
1
tz.transition 2026, 11, :o1, 1793512800
-
1
tz.transition 2027, 3, :o2, 1805007600
-
1
tz.transition 2027, 11, :o1, 1825567200
-
1
tz.transition 2028, 3, :o2, 1836457200
-
1
tz.transition 2028, 11, :o1, 1857016800
-
1
tz.transition 2029, 3, :o2, 1867906800
-
1
tz.transition 2029, 11, :o1, 1888466400
-
1
tz.transition 2030, 3, :o2, 1899356400
-
1
tz.transition 2030, 11, :o1, 1919916000
-
1
tz.transition 2031, 3, :o2, 1930806000
-
1
tz.transition 2031, 11, :o1, 1951365600
-
1
tz.transition 2032, 3, :o2, 1962860400
-
1
tz.transition 2032, 11, :o1, 1983420000
-
1
tz.transition 2033, 3, :o2, 1994310000
-
1
tz.transition 2033, 11, :o1, 2014869600
-
1
tz.transition 2034, 3, :o2, 2025759600
-
1
tz.transition 2034, 11, :o1, 2046319200
-
1
tz.transition 2035, 3, :o2, 2057209200
-
1
tz.transition 2035, 11, :o1, 2077768800
-
1
tz.transition 2036, 3, :o2, 2088658800
-
1
tz.transition 2036, 11, :o1, 2109218400
-
1
tz.transition 2037, 3, :o2, 2120108400
-
1
tz.transition 2037, 11, :o1, 2140668000
-
1
tz.transition 2038, 3, :o2, 2152162800, 59171923, 24
-
1
tz.transition 2038, 11, :o1, 2172722400, 9862939, 4
-
1
tz.transition 2039, 3, :o2, 2183612400, 59180659, 24
-
1
tz.transition 2039, 11, :o1, 2204172000, 9864395, 4
-
1
tz.transition 2040, 3, :o2, 2215062000, 59189395, 24
-
1
tz.transition 2040, 11, :o1, 2235621600, 9865851, 4
-
1
tz.transition 2041, 3, :o2, 2246511600, 59198131, 24
-
1
tz.transition 2041, 11, :o1, 2267071200, 9867307, 4
-
1
tz.transition 2042, 3, :o2, 2277961200, 59206867, 24
-
1
tz.transition 2042, 11, :o1, 2298520800, 9868763, 4
-
1
tz.transition 2043, 3, :o2, 2309410800, 59215603, 24
-
1
tz.transition 2043, 11, :o1, 2329970400, 9870219, 4
-
1
tz.transition 2044, 3, :o2, 2341465200, 59224507, 24
-
1
tz.transition 2044, 11, :o1, 2362024800, 9871703, 4
-
1
tz.transition 2045, 3, :o2, 2372914800, 59233243, 24
-
1
tz.transition 2045, 11, :o1, 2393474400, 9873159, 4
-
1
tz.transition 2046, 3, :o2, 2404364400, 59241979, 24
-
1
tz.transition 2046, 11, :o1, 2424924000, 9874615, 4
-
1
tz.transition 2047, 3, :o2, 2435814000, 59250715, 24
-
1
tz.transition 2047, 11, :o1, 2456373600, 9876071, 4
-
1
tz.transition 2048, 3, :o2, 2467263600, 59259451, 24
-
1
tz.transition 2048, 11, :o1, 2487823200, 9877527, 4
-
1
tz.transition 2049, 3, :o2, 2499318000, 59268355, 24
-
1
tz.transition 2049, 11, :o1, 2519877600, 9879011, 4
-
1
tz.transition 2050, 3, :o2, 2530767600, 59277091, 24
-
1
tz.transition 2050, 11, :o1, 2551327200, 9880467, 4
-
1
tz.transition 2051, 3, :o2, 2562217200, 59285827, 24
-
1
tz.transition 2051, 11, :o1, 2582776800, 9881923, 4
-
1
tz.transition 2052, 3, :o2, 2593666800, 59294563, 24
-
1
tz.transition 2052, 11, :o1, 2614226400, 9883379, 4
-
1
tz.transition 2053, 3, :o2, 2625116400, 59303299, 24
-
1
tz.transition 2053, 11, :o1, 2645676000, 9884835, 4
-
1
tz.transition 2054, 3, :o2, 2656566000, 59312035, 24
-
1
tz.transition 2054, 11, :o1, 2677125600, 9886291, 4
-
1
tz.transition 2055, 3, :o2, 2688620400, 59320939, 24
-
1
tz.transition 2055, 11, :o1, 2709180000, 9887775, 4
-
1
tz.transition 2056, 3, :o2, 2720070000, 59329675, 24
-
1
tz.transition 2056, 11, :o1, 2740629600, 9889231, 4
-
1
tz.transition 2057, 3, :o2, 2751519600, 59338411, 24
-
1
tz.transition 2057, 11, :o1, 2772079200, 9890687, 4
-
1
tz.transition 2058, 3, :o2, 2782969200, 59347147, 24
-
1
tz.transition 2058, 11, :o1, 2803528800, 9892143, 4
-
1
tz.transition 2059, 3, :o2, 2814418800, 59355883, 24
-
1
tz.transition 2059, 11, :o1, 2834978400, 9893599, 4
-
1
tz.transition 2060, 3, :o2, 2846473200, 59364787, 24
-
1
tz.transition 2060, 11, :o1, 2867032800, 9895083, 4
-
1
tz.transition 2061, 3, :o2, 2877922800, 59373523, 24
-
1
tz.transition 2061, 11, :o1, 2898482400, 9896539, 4
-
1
tz.transition 2062, 3, :o2, 2909372400, 59382259, 24
-
1
tz.transition 2062, 11, :o1, 2929932000, 9897995, 4
-
1
tz.transition 2063, 3, :o2, 2940822000, 59390995, 24
-
1
tz.transition 2063, 11, :o1, 2961381600, 9899451, 4
-
1
tz.transition 2064, 3, :o2, 2972271600, 59399731, 24
-
1
tz.transition 2064, 11, :o1, 2992831200, 9900907, 4
-
1
tz.transition 2065, 3, :o2, 3003721200, 59408467, 24
-
1
tz.transition 2065, 11, :o1, 3024280800, 9902363, 4
-
1
tz.transition 2066, 3, :o2, 3035775600, 59417371, 24
-
1
tz.transition 2066, 11, :o1, 3056335200, 9903847, 4
-
end
-
end
-
end
-
end
-
end
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
# A module which all non-literal tokens should include.
-
1
module URITemplate::Expression
-
-
1
include URITemplate::Token
-
-
1
attr_reader :variables
-
-
1
def literal?
-
false
-
end
-
-
1
def expression?
-
true
-
end
-
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
# A module which all literal tokens should include.
-
1
module URITemplate::Literal
-
-
1
include URITemplate::Token
-
-
1
SLASH = ?/
-
-
1
attr_reader :string
-
-
1
def literal?
-
true
-
end
-
-
1
def expression?
-
false
-
end
-
-
1
def size
-
0
-
end
-
-
1
def expand(_)
-
2
return string
-
end
-
-
1
def expand_partial(_)
-
return [self]
-
end
-
-
1
def starts_with_slash?
-
string[0] == SLASH
-
end
-
-
1
def ends_with_slash?
-
string[-1] == SLASH
-
end
-
-
1
alias to_s string
-
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
1
require 'strscan'
-
1
require 'set'
-
1
require 'forwardable'
-
-
1
require 'uri_template'
-
1
require 'uri_template/utils'
-
-
# A uri template which should comply with the rfc 6570 ( http://tools.ietf.org/html/rfc6570 ).
-
# @note
-
# Most specs and examples refer to this class directly, because they are acutally refering to this specific implementation. If you just want uri templates, you should rather use the methods on {URITemplate} to create templates since they will select an implementation.
-
1
class URITemplate::RFC6570
-
-
1
TYPE = :rfc6570
-
-
1
include URITemplate
-
1
extend Forwardable
-
-
# @private
-
1
module Utils
-
-
1
include URITemplate::Utils
-
-
# Returns true iff the value is `defined` [RFC6570 Section 2.3](http://tools.ietf.org/html/rfc6570#section-2.3)
-
#
-
# The only undefined things are:
-
# - nil
-
# - arrays containing no defined value
-
# - associative arrays/hashes containing no defined value
-
#
-
# Things that are always defined:
-
# - Strings, independent of the length
-
1
def def?( value )
-
2
case( value )
-
when nil then
-
false
-
when Hash then
-
value.any?{|_, v| !v.nil? }
-
when Array then
-
if value.none?
-
false
-
elsif value[0].kind_of?(Array)
-
value.any?{|_,v| !v.nil? }
-
else
-
value.any?{|v| !v.nil? }
-
end
-
else
-
2
true
-
end
-
end
-
-
1
extend self
-
-
end
-
-
# :nocov:
-
skipped
if Utils.use_unicode?
-
skipped
# @private
-
skipped
# \/ - unicode ctrl-chars
-
skipped
LITERAL = /([^"'%<>\\^`{|}\u0000-\u001F\u007F-\u009F\s]|%[0-9a-fA-F]{2})+/u
-
skipped
else
-
skipped
# @private
-
skipped
LITERAL = Regexp.compile('([^"\'%<>\\\\^`{|}\x00-\x1F\x7F-\x9F\s]|%[0-9a-fA-F]{2})+',Utils::KCODE_UTF8)
-
skipped
end
-
# :nocov:
-
-
# @private
-
1
CHARACTER_CLASSES = {
-
-
:unreserved => {
-
:class => '(?:[A-Za-z0-9\-\._]|%[0-9a-fA-F]{2})',
-
:class_with_comma => '(?:[A-Za-z0-9\-\._,]|%[0-9a-fA-F]{2})',
-
:class_without_comma => '(?:[A-Za-z0-9\-\._]|%[0-9a-fA-F]{2})',
-
:grabs_comma => false
-
},
-
:unreserved_reserved_pct => {
-
:class => '(?:[A-Za-z0-9\-\._:\/?#\[\]@!\$%\'\(\)*+,;=]|%[0-9a-fA-F]{2})',
-
:class_with_comma => '(?:[A-Za-z0-9\-\._:\/?#\[\]@!\$%\'\(\)*+,;=]|%[0-9a-fA-F]{2})',
-
:class_without_comma => '(?:[A-Za-z0-9\-\._:\/?#\[\]@!\$%\'\(\)*+;=]|%[0-9a-fA-F]{2})',
-
:grabs_comma => true
-
},
-
-
:varname => {
-
:class => '(?:[A-Za-z0-9\-\._]|%[0-9a-fA-F]{2})+',
-
:class_name => 'c_vn_'
-
}
-
-
}
-
-
# Specifies that no processing should be done upon extraction.
-
# @see #extract
-
1
NO_PROCESSING = []
-
-
# Specifies that the extracted values should be processed.
-
# @see #extract
-
1
CONVERT_VALUES = [:convert_values]
-
-
# Specifies that the extracted variable list should be processed.
-
# @see #extract
-
1
CONVERT_RESULT = [:convert_result]
-
-
# Default processing. Means: convert values and the list itself.
-
# @see #extract
-
1
DEFAULT_PROCESSING = CONVERT_VALUES + CONVERT_RESULT
-
-
# @private
-
1
VAR = Regexp.compile(Utils.compact_regexp(<<'__REGEXP__'), Utils::KCODE_UTF8)
-
(
-
(?:[a-zA-Z0-9_]|%[0-9a-fA-F]{2})
-
(?:\.?
-
(?:[a-zA-Z0-9_]|%[0-9a-fA-F]{2})
-
)*
-
)
-
(?:(\*)|:([1-9]\d{0,3})|)
-
__REGEXP__
-
-
# @private
-
1
EXPRESSION = Regexp.compile(Utils.compact_regexp(<<'__REGEXP__'), Utils::KCODE_UTF8)
-
\{
-
([+#\./;?&]?)
-
(
-
(?:[a-zA-Z0-9_]|%[0-9a-fA-F]{2})
-
(?:\.?(?:[a-zA-Z0-9_]|%[0-9a-fA-F]{2}))*
-
(?:\*|:[1-9]\d{0,3}|)
-
(?:
-
,
-
(?:[a-zA-Z0-9_]|%[0-9a-fA-F]{2})
-
(?:\.?(?:[a-zA-Z0-9_]|%[0-9a-fA-F]{2}))*
-
(?:\*|:[1-9]\d{0,3}|)
-
)*
-
)
-
\}
-
__REGEXP__
-
-
# @private
-
1
URI = Regexp.compile(<<__REGEXP__.strip, Utils::KCODE_UTF8)
-
\\A(#{LITERAL.source}|#{EXPRESSION.source})*\\z
-
__REGEXP__
-
-
# @private
-
1
class Token
-
end
-
-
# @private
-
1
class Literal < Token
-
-
1
include URITemplate::Literal
-
-
1
def initialize(string)
-
3
@string = string
-
end
-
-
1
def level
-
1
-
end
-
-
1
def to_r_source(*_)
-
Regexp.escape(@string)
-
end
-
-
1
def to_s
-
@string
-
end
-
-
end
-
-
# This error is raised when an invalid pattern was given.
-
1
class Invalid < StandardError
-
-
1
include URITemplate::Invalid
-
-
1
attr_reader :pattern, :position
-
-
1
def initialize(source, position)
-
@pattern = source
-
@position = position
-
super("Invalid expression found in #{source.inspect} at #{position}: '#{source[position..-1]}'")
-
end
-
-
end
-
-
# @private
-
1
class Tokenizer
-
-
1
include Enumerable
-
-
1
attr_reader :source
-
-
1
def initialize(source, ops)
-
3
@source = source
-
3
@operators = ops
-
end
-
-
1
def each
-
3
scanner = StringScanner.new(@source)
-
3
until scanner.eos?
-
5
expression = scanner.scan(EXPRESSION)
-
5
if expression
-
2
vars = scanner[2].split(',').map{|name|
-
2
match = VAR.match(name)
-
# 1 = varname
-
# 2 = explode
-
# 3 = length
-
2
[ match[1], match[2] == '*', match[3].to_i ]
-
}
-
2
yield @operators[scanner[1]].new(vars)
-
else
-
3
literal = scanner.scan(LITERAL)
-
3
if literal
-
3
yield(Literal.new(literal))
-
else
-
raise Invalid.new(@source,scanner.pos)
-
end
-
end
-
end
-
end
-
-
end
-
-
# The class methods for all rfc6570 templates.
-
1
module ClassMethods
-
-
# Tries to convert the given param in to a instance of {RFC6570}
-
# It basically passes thru instances of that class, parses strings and return nil on everything else.
-
#
-
# @example
-
# URITemplate::RFC6570.try_convert( Object.new ) #=> nil
-
# tpl = URITemplate::RFC6570.new('{foo}')
-
# URITemplate::RFC6570.try_convert( tpl ) #=> tpl
-
# URITemplate::RFC6570.try_convert('{foo}') #=> tpl
-
# URITemplate::RFC6570.try_convert(URITemplate.new(:colon, ':foo')) #=> tpl
-
# # This pattern is invalid, so it wont be parsed:
-
# URITemplate::RFC6570.try_convert('{foo') #=> nil
-
#
-
1
def try_convert(x)
-
if x.class == self
-
return x
-
elsif x.kind_of? String and valid? x
-
return new(x)
-
elsif x.kind_of? URITemplate::Colon
-
return nil if x.tokens.any?{|tk| tk.kind_of? URITemplate::Colon::Token::Splat }
-
return new( x.tokens.map{|tk|
-
if tk.literal?
-
Literal.new(tk.string)
-
else
-
Expression.new([[tk.variables.first, false, 0]])
-
end
-
})
-
else
-
return nil
-
end
-
end
-
-
# Tests whether a given pattern is a valid template pattern.
-
# @example
-
# URITemplate::RFC6570.valid? 'foo' #=> true
-
# URITemplate::RFC6570.valid? '{foo}' #=> true
-
# URITemplate::RFC6570.valid? '{foo' #=> false
-
1
def valid?(pattern)
-
URI === pattern
-
end
-
-
end
-
-
1
extend ClassMethods
-
-
1
attr_reader :options
-
-
# @param pattern_or_tokens [String,Array] either a pattern as String or an Array of tokens
-
# @param options [Hash] some options
-
# @option :lazy [true,false] If true the pattern will be parsed on first access, this also means that syntax errors will not be detected unless accessed.
-
1
def initialize(pattern_or_tokens,options={})
-
3
@options = options.dup.freeze
-
3
if pattern_or_tokens.kind_of? String
-
3
@pattern = pattern_or_tokens.dup
-
3
@pattern.freeze
-
3
unless @options[:lazy]
-
3
self.tokens
-
end
-
elsif pattern_or_tokens.kind_of? Array
-
@tokens = pattern_or_tokens.dup
-
@tokens.freeze
-
else
-
raise ArgumentError, "Expected to receive a pattern string, but got #{pattern_or_tokens.inspect}"
-
end
-
end
-
-
# @method expand(variables = {})
-
# Expands the template with the given variables.
-
# The expansion should be compatible to uritemplate spec rfc 6570 ( http://tools.ietf.org/html/rfc6570 ).
-
# @note
-
# All keys of the supplied hash should be strings as anything else won't be recognised.
-
# @note
-
# There are neither default values for variables nor will anything be raised if a variable is missing. Please read the spec if you want to know how undefined variables are handled.
-
# @example
-
# URITemplate::RFC6570.new('{foo}').expand('foo'=>'bar') #=> 'bar'
-
# URITemplate::RFC6570.new('{?args*}').expand('args'=>{'key'=>'value'}) #=> '?key=value'
-
# URITemplate::RFC6570.new('{undef}').expand() #=> ''
-
#
-
# @param variables [Hash, Array]
-
# @return String
-
-
# @method expand_partial(variables = {})
-
# Works like expand but keeps missing variables in place.
-
# @example
-
# URITemplate::RFC6570.new('{foo}').expand_partial('foo'=>'bar') #=> URITemplate::RFC6570.new('bar{foo}')
-
# URITemplate::RFC6570.new('{undef}').expand_partial() #=> URITemplate::RFC6570.new('{undef}')
-
#
-
# @param variables [Hash,Array]
-
# @return URITemplate
-
-
# Compiles this template into a regular expression which can be used to test whether a given uri matches this template. This template is also used for {#===}.
-
#
-
# @example
-
# tpl = URITemplate::RFC6570.new('/foo/{bar}/')
-
# regex = tpl.to_r
-
# regex === '/foo/baz/' #=> true
-
# regex === '/foz/baz/' #=> false
-
#
-
# @return Regexp
-
1
def to_r
-
@regexp ||= begin
-
source = tokens.map(&:to_r_source)
-
source.unshift('\A')
-
source.push('\z')
-
Regexp.new( source.join, Utils::KCODE_UTF8)
-
end
-
end
-
-
# Extracts variables from a uri ( given as string ) or an instance of MatchData ( which was matched by the regexp of this template.
-
# The actual result depends on the value of post_processing.
-
# This argument specifies whether pair arrays should be converted to hashes.
-
#
-
# @example Default Processing
-
# URITemplate::RFC6570.new('{var}').extract('value') #=> {'var'=>'value'}
-
# URITemplate::RFC6570.new('{&args*}').extract('&a=1&b=2') #=> {'args'=>{'a'=>'1','b'=>'2'}}
-
# URITemplate::RFC6570.new('{&arg,arg}').extract('&arg=1&arg=2') #=> {'arg'=>'2'}
-
#
-
# @example No Processing
-
# URITemplate::RFC6570.new('{var}').extract('value', URITemplate::RFC6570::NO_PROCESSING) #=> [['var','value']]
-
# URITemplate::RFC6570.new('{&args*}').extract('&a=1&b=2', URITemplate::RFC6570::NO_PROCESSING) #=> [['args',[['a','1'],['b','2']]]]
-
# URITemplate::RFC6570.new('{&arg,arg}').extract('&arg=1&arg=2', URITemplate::RFC6570::NO_PROCESSING) #=> [['arg','1'],['arg','2']]
-
#
-
# @raise Encoding::InvalidByteSequenceError when the given uri was not properly encoded.
-
# @raise Encoding::UndefinedConversionError when the given uri could not be converted to utf-8.
-
# @raise Encoding::CompatibilityError when the given uri could not be converted to utf-8.
-
#
-
# @param uri_or_match [String,MatchData] Uri_or_MatchData A uri or a matchdata from which the variables should be extracted.
-
# @param post_processing [Array] Processing Specifies which processing should be done.
-
#
-
# @note
-
# Don't expect that an extraction can fully recover the expanded variables. Extract rather generates a variable list which should expand to the uri from which it were extracted. In general the following equation should hold true:
-
# a_tpl.expand( a_tpl.extract( an_uri ) ) == an_uri
-
#
-
# @example Extraction cruces
-
# two_lists = URITemplate::RFC6570.new('{listA*,listB*}')
-
# uri = two_lists.expand('listA'=>[1,2],'listB'=>[3,4]) #=> "1,2,3,4"
-
# variables = two_lists.extract( uri ) #=> {'listA'=>["1","2","3"],'listB'=>["4"]}
-
# # However, like said in the note:
-
# two_lists.expand( variables ) == uri #=> true
-
#
-
# @note
-
# The current implementation drops duplicated variables instead of checking them.
-
#
-
1
def extract(uri_or_match, post_processing = DEFAULT_PROCESSING )
-
if uri_or_match.kind_of? String
-
m = self.to_r.match(uri_or_match)
-
elsif uri_or_match.kind_of?(MatchData)
-
if uri_or_match.respond_to?(:regexp) and uri_or_match.regexp != self.to_r
-
raise ArgumentError, "Trying to extract variables from MatchData which was not generated by this template."
-
end
-
m = uri_or_match
-
elsif uri_or_match.nil?
-
return nil
-
else
-
raise ArgumentError, "Expected to receive a String or a MatchData, but got #{uri_or_match.inspect}."
-
end
-
if m.nil?
-
return nil
-
else
-
result = extract_matchdata(m, post_processing)
-
if block_given?
-
return yield result
-
end
-
return result
-
end
-
end
-
-
# Extracts variables without any proccessing.
-
# This is equivalent to {#extract} with options {NO_PROCESSING}.
-
# @see #extract
-
1
def extract_simple(uri_or_match)
-
extract( uri_or_match, NO_PROCESSING )
-
end
-
-
# @method ===(uri)
-
# Alias for to_r.=== . Tests whether this template matches a given uri.
-
# @return TrueClass, FalseClass
-
1
def_delegators :to_r, :===
-
-
# @method match(uri)
-
# Alias for to_r.match . Matches this template against the given uri.
-
# @yield MatchData
-
# @return MatchData, Object
-
1
def_delegators :to_r, :match
-
-
# The type of this template.
-
#
-
# @example
-
# tpl1 = URITemplate::RFC6570.new('/foo')
-
# tpl2 = URITemplate.new( tpl1.pattern, tpl1.type )
-
# tpl1 == tpl2 #=> true
-
#
-
# @see {URITemplate#type}
-
1
def type
-
self.class::TYPE
-
end
-
-
# Returns the level of this template according to the rfc 6570 ( http://tools.ietf.org/html/rfc6570#section-1.2 ). Higher level means higher complexity.
-
# Basically this is defined as:
-
#
-
# * Level 1: no operators, one variable per expansion, no variable modifiers
-
# * Level 2: '+' and '#' operators, one variable per expansion, no variable modifiers
-
# * Level 3: all operators, multiple variables per expansion, no variable modifiers
-
# * Level 4: all operators, multiple variables per expansion, all variable modifiers
-
#
-
# @example
-
# URITemplate::RFC6570.new('/foo/').level #=> 1
-
# URITemplate::RFC6570.new('/foo{bar}').level #=> 1
-
# URITemplate::RFC6570.new('/foo{#bar}').level #=> 2
-
# URITemplate::RFC6570.new('/foo{.bar}').level #=> 3
-
# URITemplate::RFC6570.new('/foo{bar,baz}').level #=> 3
-
# URITemplate::RFC6570.new('/foo{bar:20}').level #=> 4
-
# URITemplate::RFC6570.new('/foo{bar*}').level #=> 4
-
#
-
# Templates of lower levels might be convertible to other formats while templates of higher levels might be incompatible. Level 1 for example should be convertible to any other format since it just contains simple expansions.
-
#
-
1
def level
-
tokens.map(&:level).max
-
end
-
-
# Returns an array containing a the template tokens.
-
1
def tokens
-
6
@tokens ||= tokenize!
-
end
-
-
1
protected
-
# @private
-
1
def tokenize!
-
3
self.class::Tokenizer.new(pattern, self.class::OPERATORS).to_a
-
end
-
-
# @private
-
1
def extract_matchdata(matchdata, post_processing)
-
bc = 1
-
vars = []
-
tokens.each{|part|
-
next if part.literal?
-
i = 0
-
pa = part.arity
-
while i < pa
-
vars.push( *part.extract(i, matchdata[bc]) )
-
bc += 1
-
i += 1
-
end
-
}
-
if post_processing.include? :convert_result
-
if post_processing.include? :convert_values
-
return Hash[ vars.map!{|k,v| [k,Utils.pair_array_to_hash(v)] } ]
-
else
-
return Hash[vars]
-
end
-
else
-
if post_processing.include? :convert_values
-
return vars.collect{|k,v| [k,Utils.pair_array_to_hash(v)] }
-
else
-
return vars
-
end
-
end
-
end
-
-
end
-
-
1
require 'uri_template/rfc6570/regex_builder.rb'
-
1
require 'uri_template/rfc6570/expression.rb'
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
1
require 'uri_template/rfc6570'
-
-
1
class URITemplate::RFC6570
-
-
# @private
-
1
class Expression < Token
-
-
1
include URITemplate::Expression
-
-
1
attr_reader :variables
-
-
1
def initialize(vars)
-
2
@variable_specs = vars
-
2
@variables = vars.map(&:first)
-
2
@variables.uniq!
-
end
-
-
1
PREFIX = ''.freeze
-
1
SEPARATOR = ','.freeze
-
1
PAIR_CONNECTOR = '='.freeze
-
1
PAIR_IF_EMPTY = true
-
1
LIST_CONNECTOR = ','.freeze
-
1
BASE_LEVEL = 1
-
-
1
CHARACTER_CLASS = CHARACTER_CLASSES[:unreserved]
-
-
1
OPERATOR = ''
-
-
1
def level
-
if @variable_specs.none?{|_,expand,ml| expand || (ml > 0) }
-
if @variable_specs.size == 1
-
return self.class::BASE_LEVEL
-
else
-
return 3
-
end
-
else
-
return 4
-
end
-
end
-
-
1
def arity
-
@variable_specs.size
-
end
-
-
1
def expand( vars )
-
2
result = []
-
2
@variable_specs.each do | var, expand , max_length |
-
2
if Utils.def? vars[var]
-
2
result.push(*expand_one(var, vars[var], expand, max_length))
-
end
-
end
-
2
if result.any?
-
2
return (self.class::PREFIX + result.join(self.class::SEPARATOR))
-
else
-
return ''
-
end
-
end
-
-
1
def expand_partial( vars )
-
result = []
-
follow_up = self.class::FOLLOW_UP
-
var_specs = []
-
@variable_specs.each do | var, expand , max_length |
-
if vars.key? var
-
unless var_specs.none?
-
result.push( follow_up.new( var_specs ) )
-
var_specs = []
-
end
-
unless result.none?
-
result.push( Literal.new(self.class::SEPARATOR) )
-
end
-
one = Array(expand_one(var, vars[var], expand, max_length))
-
result.push( Literal.new(one.join(self.class::SEPARATOR)))
-
end
-
var_specs << [var,expand,max_length]
-
end
-
if result.none?
-
# no literal was emitted so far
-
return [ self ]
-
end
-
unless self.class::PREFIX.empty? || empty_literals?( result )
-
result.unshift( Literal.new(self.class::PREFIX) )
-
end
-
if var_specs.size != 0
-
result.push( follow_up.new( var_specs ) )
-
end
-
return result
-
end
-
-
1
def extract(position,matched)
-
name, expand, max_length = @variable_specs[position]
-
if matched.nil?
-
return [[ name , extracted_nil ]]
-
end
-
if expand
-
it = URITemplate::RegexpEnumerator.new(self.class.hash_extractor(max_length), :rest => :raise)
-
if position == 0
-
matched = "#{self.class::SEPARATOR}#{matched}"
-
end
-
splitted = it.each(matched)\
-
.map do |match|
-
raise match.inspect if match.kind_of? String
-
[ decode(match[1]), decode(match[2], false) ]
-
end
-
return after_expand(name, splitted)
-
end
-
-
return [ [ name, decode( matched ) ] ]
-
end
-
-
1
def to_s
-
return '{' + self.class::OPERATOR + @variable_specs.map{|name,expand,max_length| name + (expand ? '*': '') + (max_length > 0 ? (':' + max_length.to_s) : '') }.join(',') + '}'
-
end
-
-
1
private
-
-
1
def expand_one( name, value, expand, max_length)
-
2
if value.kind_of?(Hash) or Utils.pair_array?(value)
-
return transform_hash(name, value, expand, max_length)
-
2
elsif value.kind_of? Array
-
return transform_array(name, value, expand, max_length)
-
else
-
2
return self_pair(name, value, max_length)
-
end
-
end
-
-
1
def length_limited?(max_length)
-
max_length > 0
-
end
-
-
1
def extracted_nil
-
nil
-
end
-
-
1
protected
-
-
1
module ClassMethods
-
-
1
def hash_extractors
-
@hash_extractors ||= Hash.new{|hsh, key| hsh[key] = generate_hash_extractor(key) }
-
end
-
-
1
def hash_extractor(max_length)
-
return hash_extractors[max_length]
-
end
-
-
1
def generate_hash_extractor(max_length)
-
source = regex_builder
-
source.push('\\A')
-
source.escaped_separator
-
source.capture do
-
source.character_class('+').reluctant
-
end
-
source.group do
-
source.escaped_pair_connector
-
source.capture do
-
source.character_class(max_length,0).reluctant
-
end
-
end.length('?')
-
source.lookahead do
-
source.push '\\z'
-
source.push '|'
-
source.escaped_separator
-
source.push '[^'
-
source.escaped_separator
-
source.push ']'
-
end
-
return Regexp.new( source.join , Utils::KCODE_UTF8)
-
end
-
-
1
def regex_builder
-
RegexBuilder.new(self)
-
end
-
-
end
-
-
1
extend ClassMethods
-
-
1
def escape(x)
-
2
Utils.escape_url(Utils.object_to_param(x))
-
end
-
-
1
def unescape(x)
-
Utils.unescape_url(x)
-
end
-
-
1
def regex_builder
-
self.class.regex_builder
-
end
-
-
1
SPLITTER = /^(,+)|([^,]+)/
-
-
1
COMMA = ",".freeze
-
-
1
def decode(x, split = true)
-
if x.nil?
-
return extracted_nil
-
elsif split
-
result = []
-
# Add a comma if the last character is a comma
-
# seems weird but is more compatible than changing
-
# the regex.
-
x += COMMA if x[-1..-1] == COMMA
-
URITemplate::RegexpEnumerator.new(SPLITTER, :rest => :raise).each(x) do |match|
-
if match[1]
-
next if match[1].size == 1
-
result << match[1][0..-3]
-
elsif match[2]
-
result << unescape(match[2])
-
end
-
end
-
case(result.size)
-
when 0 then ''
-
when 1 then result.first
-
else result
-
end
-
else
-
unescape(x)
-
end
-
end
-
-
1
def cut(str,chars)
-
2
if chars > 0
-
md = Regexp.compile("\\A#{self.class::CHARACTER_CLASS[:class]}{0,#{chars.to_s}}", Utils::KCODE_UTF8).match(str)
-
return md[0]
-
else
-
2
return str
-
end
-
end
-
-
1
def pair(key, value, max_length = 0, &block)
-
ek = key
-
if block
-
ev = value.map(&block).join(self.class::LIST_CONNECTOR)
-
else
-
ev = escape(value)
-
end
-
if !self.class::PAIR_IF_EMPTY and ev.size == 0
-
return ek
-
else
-
return ek + self.class::PAIR_CONNECTOR + cut( ev, max_length )
-
end
-
end
-
-
1
def transform_hash(name, hsh, expand , max_length)
-
if expand
-
hsh.map{|key,value| pair(escape(key),value) }
-
else
-
[ self_pair(name,hsh, max_length ){|key,value| escape(key)+self.class::LIST_CONNECTOR+escape(value)} ]
-
end
-
end
-
-
1
def transform_array(name, ary, expand , max_length)
-
if expand
-
ary.map{|value| self_pair(name,value) }
-
else
-
[ self_pair(name, ary, max_length){|value| escape(value) } ]
-
end
-
end
-
-
1
def empty_literals?( list )
-
list.none?{|x| x.kind_of?(Literal) && !x.to_s.empty? }
-
end
-
end
-
-
1
require 'uri_template/rfc6570/expression/named'
-
1
require 'uri_template/rfc6570/expression/unnamed'
-
-
1
class Expression::Basic < Expression::Unnamed
-
1
FOLLOW_UP = self
-
1
BULK_FOLLOW_UP = self
-
end
-
-
1
class Expression::Reserved < Expression::Unnamed
-
-
1
CHARACTER_CLASS = CHARACTER_CLASSES[:unreserved_reserved_pct]
-
1
OPERATOR = '+'.freeze
-
1
BASE_LEVEL = 2
-
1
FOLLOW_UP = self
-
1
BULK_FOLLOW_UP = self
-
-
1
def escape(x)
-
Utils.escape_uri(Utils.object_to_param(x))
-
end
-
-
1
def unescape(x)
-
Utils.unescape_uri(x)
-
end
-
-
1
def scheme?
-
true
-
end
-
-
1
def host?
-
true
-
end
-
-
end
-
-
1
class Expression::Fragment < Expression::Unnamed
-
-
1
CHARACTER_CLASS = CHARACTER_CLASSES[:unreserved_reserved_pct]
-
1
PREFIX = '#'.freeze
-
1
OPERATOR = '#'.freeze
-
1
BASE_LEVEL = 2
-
1
FOLLOW_UP = Expression::Reserved
-
1
BULK_FOLLOW_UP = Expression::Reserved
-
-
1
def escape(x)
-
Utils.escape_uri(Utils.object_to_param(x))
-
end
-
-
1
def unescape(x)
-
Utils.unescape_uri(x)
-
end
-
-
end
-
-
1
class Expression::Label < Expression::Unnamed
-
-
1
SEPARATOR = '.'.freeze
-
1
PREFIX = '.'.freeze
-
1
OPERATOR = '.'.freeze
-
1
BASE_LEVEL = 3
-
1
FOLLOW_UP = self
-
1
BULK_FOLLOW_UP = self
-
-
end
-
-
1
class Expression::Path < Expression::Unnamed
-
-
1
SEPARATOR = '/'.freeze
-
1
PREFIX = '/'.freeze
-
1
OPERATOR = '/'.freeze
-
1
BASE_LEVEL = 3
-
1
FOLLOW_UP = self
-
1
BULK_FOLLOW_UP = self
-
-
1
def starts_with_slash?
-
true
-
end
-
-
end
-
-
1
class Expression::PathParameters < Expression::Named
-
-
1
SEPARATOR = ';'.freeze
-
1
PREFIX = ';'.freeze
-
1
PAIR_IF_EMPTY = false
-
1
OPERATOR = ';'.freeze
-
1
BASE_LEVEL = 3
-
1
FOLLOW_UP = self
-
1
BULK_FOLLOW_UP = self
-
-
end
-
-
1
class Expression::FormQueryContinuation < Expression::Named
-
-
1
SEPARATOR = '&'.freeze
-
1
PREFIX = '&'.freeze
-
1
OPERATOR = '&'.freeze
-
1
BASE_LEVEL = 3
-
1
FOLLOW_UP = Expression::Basic
-
1
BULK_FOLLOW_UP = self
-
end
-
-
1
class Expression::FormQuery < Expression::Named
-
-
1
SEPARATOR = '&'.freeze
-
1
PREFIX = '?'.freeze
-
1
OPERATOR = '?'.freeze
-
1
BASE_LEVEL = 3
-
1
FOLLOW_UP = Expression::Basic
-
1
BULK_FOLLOW_UP = Expression::FormQueryContinuation
-
-
end
-
-
-
# @private
-
1
OPERATORS = {
-
'' => Expression::Basic,
-
'+' => Expression::Reserved,
-
'#' => Expression::Fragment,
-
'.' => Expression::Label,
-
'/' => Expression::Path,
-
';' => Expression::PathParameters,
-
'?' => Expression::FormQuery,
-
'&' => Expression::FormQueryContinuation
-
}
-
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
1
require 'uri_template/rfc6570'
-
-
1
class URITemplate::RFC6570
-
-
1
class Expression::Named < Expression
-
-
1
alias self_pair pair
-
-
1
def to_r_source
-
source = regex_builder
-
source.group do
-
source.escaped_prefix
-
first = true
-
@variable_specs.each do | var, expand , max_length |
-
if expand
-
source.capture do
-
source.separated_list(first) do
-
source.character_class('+')\
-
.escaped_pair_connector\
-
.character_class_with_comma(max_length)
-
end
-
end
-
else
-
source.group do
-
source.escaped_separator unless first
-
source << Regexp.escape(var)
-
source.group do
-
source.escaped_pair_connector
-
source.capture do
-
source.character_class_with_comma(max_length)
-
end
-
source << '|' unless self.class::PAIR_IF_EMPTY
-
end
-
end.length('?')
-
end
-
first = false
-
end
-
end.length('?')
-
return source.join
-
end
-
-
1
def expand_partial( vars )
-
result = []
-
rest = []
-
defined = false
-
@variable_specs.each do | var, expand , max_length |
-
if vars.key? var
-
if Utils.def? vars[var]
-
if result.any? && !self.class::SEPARATOR.empty?
-
result.push( Literal.new(self.class::SEPARATOR) )
-
end
-
one = expand_one(var, vars[var], expand, max_length)
-
result.push( Literal.new(Array(one).join(self.class::SEPARATOR)) )
-
end
-
if expand
-
rest << [var, expand, max_length]
-
else
-
result.push( self.class::FOLLOW_UP.new([[var,expand,max_length]]) )
-
end
-
else
-
rest.push( [var,expand,max_length] )
-
end
-
end
-
if result.any?
-
unless self.class::PREFIX.empty? || empty_literals?( result )
-
result.unshift( Literal.new(self.class::PREFIX) )
-
end
-
result.push( self.class::BULK_FOLLOW_UP.new(rest) ) if rest.size != 0
-
return result
-
else
-
return [ self ]
-
end
-
end
-
-
1
private
-
-
1
def extracted_nil
-
self.class::PAIR_IF_EMPTY ? nil : ""
-
end
-
-
1
def after_expand(name, splitted)
-
result = URITemplate::Utils.pair_array_to_hash2( splitted )
-
if result.size == 1 && result[0][0] == name
-
return result
-
else
-
return [ [ name , result ] ]
-
end
-
end
-
-
end
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
1
require 'uri_template/rfc6570'
-
-
1
class URITemplate::RFC6570::Expression::Unnamed < URITemplate::RFC6570::Expression
-
-
1
def self_pair(_, value, max_length = 0,&block)
-
2
if block
-
ev = value.map(&block).join(self.class::LIST_CONNECTOR)
-
else
-
2
ev = escape(value)
-
end
-
2
cut( ev, max_length ,&block)
-
end
-
-
1
def to_r_source
-
vs = @variable_specs.size - 1
-
i = 0
-
source = regex_builder
-
source.group do
-
source.escaped_prefix
-
@variable_specs.each do | var, expand , max_length |
-
last = (vs == i)
-
first = (i == 0)
-
if expand
-
source.group(true) do
-
source.separated_list(first) do
-
source.group do
-
source.character_class('+').reluctant
-
source.escaped_pair_connector
-
end.length('?')
-
source.character_class(max_length)
-
end
-
end
-
else
-
source.escaped_separator unless first
-
source.group(true) do
-
if last
-
source.character_class_with_comma(max_length)
-
else
-
source.character_class(max_length)
-
end
-
end
-
end
-
i = i+1
-
end
-
end.length('?')
-
return source.join
-
end
-
-
1
private
-
-
1
def transform_hash(name, hsh, expand , max_length)
-
return [] if hsh.none?
-
super
-
end
-
-
1
def transform_array(name, ary, expand , max_length)
-
return [] if ary.none?
-
super
-
end
-
-
1
def after_expand(name, splitted)
-
if splitted.none?{|_,b| b }
-
return [ [ name, splitted.map{|a,_| a } ] ]
-
else
-
return [ [ name, splitted ] ]
-
end
-
end
-
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
1
require 'uri_template/rfc6570'
-
-
1
class URITemplate::RFC6570
-
-
1
class RegexBuilder
-
-
1
def initialize(expression_class)
-
@expression_class = expression_class
-
@source = []
-
end
-
-
1
def <<(arg)
-
@source << arg
-
self
-
end
-
-
1
def push(*args)
-
@source.push(*args)
-
self
-
end
-
-
1
def escaped_pair_connector
-
self << Regexp.escape(@expression_class::PAIR_CONNECTOR)
-
end
-
-
1
def escaped_separator
-
self << Regexp.escape(@expression_class::SEPARATOR)
-
end
-
-
1
def escaped_prefix
-
self << Regexp.escape(@expression_class::PREFIX)
-
end
-
-
1
def join
-
return @source.join
-
end
-
-
1
def length(*args)
-
self << format_length(*args)
-
end
-
-
1
def character_class_with_comma(max_length=0, min = 0)
-
self << @expression_class::CHARACTER_CLASS[:class_with_comma] << format_length(max_length, min)
-
end
-
-
1
def character_class(max_length=0, min = 0)
-
self << @expression_class::CHARACTER_CLASS[:class] << format_length(max_length, min)
-
end
-
-
1
def reluctant
-
self << '?'
-
end
-
-
1
def group(capture = false)
-
self << '('
-
self << '?:' unless capture
-
yield
-
self << ')'
-
end
-
-
1
def negative_lookahead
-
self << '(?!'
-
yield
-
self << ')'
-
end
-
-
1
def lookahead
-
self << '(?='
-
yield
-
self << ')'
-
end
-
-
1
def capture(&block)
-
group(true, &block)
-
end
-
-
1
def separated_list(first = true, length = 0, min = 1, &block)
-
if first
-
yield
-
min -= 1
-
end
-
self.push('(?:').escaped_separator
-
yield
-
self.push(')').length(length, min)
-
end
-
-
1
private
-
-
1
def format_length(len, min = 0)
-
return len if len.kind_of? String
-
return '{'+min.to_s+','+len.to_s+'}' if len.kind_of?(Numeric) and len > 0
-
return '*' if min == 0
-
return '+' if min == 1
-
return '{'+min.to_s+',}'
-
end
-
-
-
end
-
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
# This should make it possible to do basic analysis independently from the concrete type.
-
# Usually the submodules {URITemplate::Literal} and {URITemplate::Expression} are used.
-
#
-
# @abstract
-
1
module URITemplate::Token
-
-
1
EMPTY_ARRAY = [].freeze
-
-
# The variable names used in this token.
-
#
-
# @return [Array<String>]
-
1
def variables
-
1
EMPTY_ARRAY
-
end
-
-
# Number of variables in this token
-
1
def size
-
variables.size
-
end
-
-
1
def starts_with_slash?
-
false
-
end
-
-
1
def ends_with_slash?
-
false
-
end
-
-
1
def scheme?
-
false
-
end
-
-
1
def host?
-
false
-
end
-
-
# @abstract
-
1
def expand(variables)
-
raise "Please implement #expand(variables) on #{self.class.inspect}."
-
end
-
-
# @abstract
-
1
def expand_partial(variables)
-
raise "Please implement #expand_partial(variables) on #{self.class.inspect}."
-
end
-
-
# @abstract
-
1
def to_s
-
raise "Please implement #to_s on #{self.class.inspect}."
-
end
-
-
end
-
# -*- encoding : utf-8 -*-
-
# The MIT License (MIT)
-
#
-
# Copyright (c) 2011-2014 Hannes Georg
-
#
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
-
# of this software and associated documentation files (the "Software"), to deal
-
# in the Software without restriction, including without limitation the rights
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
# copies of the Software, and to permit persons to whom the Software is
-
# furnished to do so, subject to the following conditions:
-
#
-
# The above copyright notice and this permission notice shall be included in
-
# all copies or substantial portions of the Software.
-
#
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
# THE SOFTWARE.
-
-
1
module URITemplate
-
-
# An awesome little helper which helps iterating over a string.
-
# Initialize with a regexp and pass a string to :each.
-
# It will yield a string or a MatchData
-
1
class RegexpEnumerator
-
-
1
include Enumerable
-
-
1
def initialize(regexp, options = {})
-
@regexp = regexp
-
@rest = options.fetch(:rest){ :yield }
-
end
-
-
1
def each(str)
-
raise ArgumentError, "RegexpEnumerator#each expects a String, but got #{str.inspect}" unless str.kind_of? String
-
return self.to_enum(:each,str) unless block_given?
-
rest = str
-
loop do
-
m = @regexp.match(rest)
-
if m.nil?
-
if rest.size > 0
-
yield rest
-
end
-
break
-
end
-
yield m.pre_match if m.pre_match.size > 0
-
yield m
-
if m[0].size == 0
-
# obviously matches empty string, so post_match will equal rest
-
# terminate or this will loop forever
-
if m.post_match.size > 0
-
yield m.post_match if @rest == :yield
-
raise "#{@regexp.inspect} matched an empty string. The rest is #{m.post_match.inspect}." if @rest == :raise
-
end
-
break
-
end
-
rest = m.post_match
-
end
-
return self
-
end
-
-
end
-
-
# This error will be raised whenever an object could not be converted to a param string.
-
1
class Unconvertable < StandardError
-
-
1
attr_reader :object
-
-
1
def initialize(object)
-
@object = object
-
super("Could not convert the given object (#{Object.instance_method(:inspect).bind(@object).call() rescue '<????>'}) to a param since it doesn't respond to :to_param or :to_s.")
-
end
-
-
end
-
-
# A collection of some utility methods.
-
# The most methods are used to parse or generate uri-parameters.
-
# I will use the escape_utils library if available, but runs happily without.
-
#
-
1
module Utils
-
-
1
KCODE_UTF8 = (Regexp::KCODE_UTF8 rescue 0)
-
-
# Bundles some string encoding methods.
-
1
module StringEncoding
-
-
# Methods which do actual encoding.
-
1
module Encode
-
# converts a string to ascii
-
#
-
# @param str [String]
-
# @return String
-
# @visibility public
-
1
def to_ascii(str)
-
str.encode(Encoding::ASCII)
-
end
-
-
# converts a string to utf8
-
#
-
# @param str [String]
-
# @return String
-
# @visibility public
-
1
def to_utf8(str)
-
2
str.encode(Encoding::UTF_8)
-
end
-
-
# enforces UTF8 encoding
-
#
-
# @param str [String]
-
# @return String
-
# @visibility public
-
1
def force_utf8(str)
-
return str if str.encoding == Encoding::UTF_8
-
str = str.dup if str.frozen?
-
return str.force_encoding(Encoding::UTF_8)
-
end
-
-
end
-
-
# Fallback methods to be used in pre 1.9 rubies.
-
1
module Fallback
-
-
1
def to_ascii(str)
-
str
-
end
-
-
1
def to_utf8(str)
-
str
-
end
-
-
1
def force_utf8(str)
-
str
-
end
-
-
end
-
-
# :nocov:
-
skipped
if "".respond_to?(:encode)
-
skipped
include Encode
-
skipped
else
-
skipped
include Fallback
-
skipped
end
-
# :nocov:
-
-
1
private :force_utf8
-
-
end
-
-
1
module Escaping
-
-
# A pure escaping module, which implements escaping methods in pure ruby.
-
# The performance is acceptable, but could be better with escape_utils.
-
1
module Pure
-
-
# @private
-
1
URL_ESCAPED = /([^A-Za-z0-9\-\._])/.freeze
-
-
# @private
-
1
URI_ESCAPED = /([^A-Za-z0-9!$&'()*+,.\/:;=?@\[\]_~])/.freeze
-
-
# @private
-
1
PCT = /%([0-9a-fA-F]{2})/.freeze
-
-
1
def escape_url(s)
-
to_utf8(s.to_s).gsub(URL_ESCAPED){
-
'%'+$1.unpack('H2'*$1.bytesize).join('%').upcase
-
}
-
end
-
-
1
def escape_uri(s)
-
to_utf8(s.to_s).gsub(URI_ESCAPED){
-
'%'+$1.unpack('H2'*$1.bytesize).join('%').upcase
-
}
-
end
-
-
1
def unescape_url(s)
-
force_utf8( to_ascii(s.to_s).gsub('+',' ').gsub(PCT){
-
$1.to_i(16).chr
-
} )
-
end
-
-
1
def unescape_uri(s)
-
force_utf8( to_ascii(s.to_s).gsub(PCT){
-
$1.to_i(16).chr
-
})
-
end
-
-
1
def using_escape_utils?
-
false
-
end
-
-
end
-
-
1
if defined? EscapeUtils
-
-
# A escaping module, which is backed by escape_utils.
-
# The performance is good, espacially for strings with many escaped characters.
-
1
module EscapeUtils
-
-
1
include ::EscapeUtils
-
-
1
def using_escape_utils?
-
true
-
end
-
-
1
def escape_url(s)
-
2
super(to_utf8(s.to_s)).gsub('+','%20')
-
end
-
-
1
def escape_uri(s)
-
super(to_utf8(s.to_s))
-
end
-
-
1
def unescape_url(s)
-
force_utf8(super(to_ascii(s.to_s)))
-
end
-
-
1
def unescape_uri(s)
-
force_utf8(super(to_ascii(s.to_s)))
-
end
-
-
end
-
-
end
-
-
end
-
-
1
include StringEncoding
-
# :nocov:
-
skipped
if Escaping.const_defined? :EscapeUtils
-
skipped
include Escaping::EscapeUtils
-
skipped
puts "Using escape_utils." if $VERBOSE
-
skipped
else
-
skipped
include Escaping::Pure
-
skipped
puts "Not using escape_utils." if $VERBOSE
-
skipped
end
-
# :nocov:
-
-
# Converts an object to a param value.
-
# Tries to call :to_param and then :to_s on that object.
-
# @raise Unconvertable if the object could not be converted.
-
# @example
-
# URITemplate::Utils.object_to_param(5) #=> "5"
-
# o = Object.new
-
# def o.to_param
-
# "42"
-
# end
-
# URITemplate::Utils.object_to_param(o) #=> "42"
-
1
def object_to_param(object)
-
2
if object.respond_to? :to_param
-
2
object.to_param
-
elsif object.respond_to? :to_s
-
object.to_s
-
else
-
raise Unconvertable.new(object)
-
end
-
rescue NoMethodError
-
raise Unconvertable.new(object)
-
end
-
-
# @api private
-
# Should we use \u.... or \x.. in regexps?
-
1
def use_unicode?
-
1
eval('Regexp.compile("\u0020")') =~ " " rescue false
-
end
-
-
# Returns true when the given value is an array and it only consists of arrays with two items.
-
# This useful when using a hash is not ideal, since it doesn't allow duplicate keys.
-
# @example
-
# URITemplate::Utils.pair_array?( Object.new ) #=> false
-
# URITemplate::Utils.pair_array?( [] ) #=> true
-
# URITemplate::Utils.pair_array?( [1,2,3] ) #=> false
-
# URITemplate::Utils.pair_array?( [ ['a',1],['b',2],['c',3] ] ) #=> true
-
# URITemplate::Utils.pair_array?( [ ['a',1],['b',2],['c',3],[] ] ) #=> false
-
1
def pair_array?(a)
-
2
return false unless a.kind_of? Array
-
return a.all?{|p| p.kind_of? Array and p.size == 2 }
-
end
-
-
# Turns the given value into a hash if it is an array of pairs.
-
# Otherwise it returns the value.
-
# You can test whether a value will be converted with {#pair_array?}.
-
#
-
# @example
-
# URITemplate::Utils.pair_array_to_hash( 'x' ) #=> 'x'
-
# URITemplate::Utils.pair_array_to_hash( [ ['a',1],['b',2],['c',3] ] ) #=> {'a'=>1,'b'=>2,'c'=>3}
-
# URITemplate::Utils.pair_array_to_hash( [ ['a',1],['a',2],['a',3] ] ) #=> {'a'=>3}
-
#
-
# @example Carful vs. Ignorant
-
# URITemplate::Utils.pair_array_to_hash( [ ['a',1],'foo','bar'], false ) #UNDEFINED!
-
# URITemplate::Utils.pair_array_to_hash( [ ['a',1],'foo','bar'], true ) #=> [ ['a',1], 'foo', 'bar']
-
#
-
# @param x the value to convert
-
# @param careful [true,false] wheter to check every array item. Use this when you expect array with subarrays which are not pairs. Setting this to false however improves runtime by ~30% even with comparetivly short arrays.
-
1
def pair_array_to_hash(x, careful = false )
-
if careful ? pair_array?(x) : (x.kind_of?(Array) and ( x.empty? or x.first.kind_of?(Array) ) )
-
return Hash[ x ]
-
else
-
return x
-
end
-
end
-
-
1
extend self
-
-
# @api privat
-
1
def pair_array_to_hash2(x)
-
c = {}
-
result = []
-
-
x.each do | (k,v) |
-
e = c[k]
-
if !e
-
result << c[k] = [k,v]
-
else
-
e[1] = [e[1]] unless e[1].kind_of? Array
-
e[1] << v
-
end
-
end
-
-
return result
-
end
-
-
# @api private
-
1
def compact_regexp(rx)
-
2
rx.split("\n").map(&:strip).join
-
end
-
-
end
-
-
end
-
1
module Versionist
-
1
class Configuration
-
1
attr_accessor :versioning_strategies
-
1
attr_accessor :default_version
-
1
attr_accessor :header_versions
-
1
attr_accessor :parameter_versions
-
1
attr_accessor :path_versions
-
1
attr_accessor :configured_test_framework
-
-
1
def initialize
-
1
@versioning_strategies ||= Array.new
-
1
@header_versions ||= Array.new
-
1
@parameter_versions ||= Array.new
-
1
@path_versions ||= Array.new
-
end
-
-
1
def clear!
-
@versioning_strategies.clear
-
@default_version = nil
-
@header_versions.clear
-
@parameter_versions.clear
-
@path_versions.clear
-
end
-
end
-
end
-
1
require 'active_support/core_ext/hash/keys'
-
-
1
module Versionist
-
1
module Routing
-
# Allows you to constrain routes to specific versions of your api using versioning strategies.
-
# Supported formats:
-
#
-
# HTTP Header
-
# api_version(:module => "V1", :header => {:name => "Accept", :value => "application/vnd.mycompany.com; version=1"}})
-
#
-
# Path
-
# api_version(:module => "V1", :path => {:value => "v1"}})
-
#
-
# Request Parameter
-
# api_version(:module => "V1", :parameter => {:name => "version", :value => "1"}})
-
#
-
# Specifying default version:
-
# api_version(:module => "V1", :default => true, :header => {:name => "Accept", :value => "application/vnd.mycompany.com; version=1"}})
-
#
-
# Multiple Strategies per version
-
# api_version(:module => "V1", :header => {:name => "Accept", :value => "application/vnd.mycompany.com; version=1"}, :path => {:value => "v1"})
-
1
def api_version(config, &block)
-
1
raise ArgumentError, "you must pass a configuration Hash to api_version" if config.nil? || !config.is_a?(Hash)
-
1
config.symbolize_keys!
-
1
raise ArgumentError, "you must specify :header, :path, or :parameter in configuration Hash passed to api_version" if !config.has_key?(:header) && !config.has_key?(:path) && !config.has_key?(:parameter)
-
1
[:header, :path, :parameter].each do |s|
-
3
raise ArgumentError, "#{s} key in configuration Hash passed to api_version must point to a Hash" if config.has_key?(s) && !config[s].is_a?(Hash)
-
end
-
1
raise ArgumentError, "you must specify :module in configuration Hash passed to api_version" if !config.has_key?(:module)
-
1
raise ArgumentError, ":defaults must be a Hash" if config.has_key?(:defaults) && !config[:defaults].is_a?(Hash)
-
1
rails_quirks(config, &block)
-
1
configure_header(config, &block) if config.has_key?(:header)
-
1
configure_path(config, &block) if config.has_key?(:path)
-
1
configure_parameter(config, &block) if config.has_key?(:parameter)
-
1
configure_default(config, &block) if config.has_key?(:default) && config[:default]
-
end
-
-
-
1
private
-
-
1
def configure_header(config, &block)
-
1
header = Versionist::VersioningStrategy::Header.new(config)
-
1
route_hash = {:module => config[:module], :constraints => header}
-
1
route_hash.merge!({:defaults => config[:defaults]}) if config.has_key?(:defaults)
-
1
scope(route_hash, &block)
-
end
-
-
1
def configure_path(config, &block)
-
config[:path][:value].slice!(0) if config[:path][:value] =~ /^\//
-
path = Versionist::VersioningStrategy::Path.new(config)
-
# Use the :as option and strip out non-word characters from the path to avoid this:
-
# https://github.com/rails/rails/issues/3224
-
route_hash = {:module => config[:module], :as => config[:path][:value].gsub(/\W/, '_')}
-
route_hash.merge!({:defaults => config[:defaults]}) if config.has_key?(:defaults)
-
namespace(config[:path][:value], route_hash, &block)
-
end
-
-
1
def configure_parameter(config, &block)
-
1
parameter = Versionist::VersioningStrategy::Parameter.new(config)
-
1
route_hash = {:module => config[:module], :constraints => parameter}
-
1
route_hash.merge!({:defaults => config[:defaults]}) if config.has_key?(:defaults)
-
1
scope(route_hash, &block)
-
end
-
-
1
def configure_default(config, &block)
-
1
default = Versionist::VersioningStrategy::Default.new(config)
-
1
route_hash = {:module => config[:module], :constraints => default, :as => 'default'}
-
1
route_hash.merge!({:defaults => config[:defaults]}) if config.has_key?(:defaults)
-
1
scope(route_hash, &block)
-
end
-
-
# deals with quirks in routing among the various Rails versions
-
1
def rails_quirks(config, &block)
-
# Rails 4 no longer allows constant syntax in routing.
-
# https://github.com/bploetz/versionist/issues/39
-
# call underscore on the module so it adheres to this convention
-
1
config[:module] = config[:module].underscore if Rails::VERSION::MAJOR >= 4
-
end
-
end
-
end
-
1
module Versionist
-
1
module VersioningStrategy
-
1
extend ActiveSupport::Autoload
-
-
1
autoload :Base, 'versionist/versioning_strategy/base'
-
1
autoload :Header, 'versionist/versioning_strategy/header'
-
1
autoload :Path, 'versionist/versioning_strategy/path'
-
1
autoload :Parameter, 'versionist/versioning_strategy/parameter'
-
1
autoload :Default, 'versionist/versioning_strategy/default'
-
end
-
end
-
1
require 'active_support/core_ext/hash/keys'
-
-
1
module Versionist
-
1
module VersioningStrategy
-
1
class Base
-
1
attr_reader :config
-
-
1
def initialize(config={})
-
3
raise ArgumentError, "you must pass a configuration Hash" if config.nil? || !config.is_a?(Hash)
-
3
@config = config
-
3
@config.symbolize_keys!
-
3
Versionist.configuration.versioning_strategies << self if !Versionist.configuration.versioning_strategies.include?(self)
-
end
-
-
1
def ==(other)
-
3
return false if other.nil? || !other.is_a?(Versionist::VersioningStrategy::Base)
-
3
return self.config == other.config
-
end
-
end
-
end
-
end
-
1
module Versionist
-
1
module VersioningStrategy
-
# Implements the default version handling strategy.
-
1
class Default < Base
-
1
attr_accessor :strategies
-
1
attr_accessor :module
-
-
1
def initialize(config)
-
1
super
-
1
@module = config[:module]
-
1
raise ArgumentError, "[VERSIONIST] attempt to set more than one default api version" if !Versionist.configuration.default_version.nil? && Versionist.configuration.default_version != self
-
1
Versionist.configuration.default_version = self
-
end
-
-
1
def matches?(request)
-
3
!header_matches?(request) && !parameter_matches?(request)
-
end
-
-
1
def ==(other)
-
super
-
return false if !other.is_a?(Versionist::VersioningStrategy::Default)
-
return self.module == other.module
-
end
-
-
-
1
private
-
-
1
def header_matches?(request)
-
6
Versionist.configuration.header_versions && Versionist.configuration.header_versions.any? {|v| v.matches?(request)}
-
end
-
-
1
def parameter_matches?(request)
-
6
Versionist.configuration.parameter_versions && Versionist.configuration.parameter_versions.any? {|v| v.matches?(request)}
-
end
-
end
-
end
-
end
-
1
module Versionist
-
1
module VersioningStrategy
-
# Implements the header versioning strategy.
-
1
class Header < Base
-
-
# Creates a new Header VersioningStrategy object. config must contain the following keys:
-
# - :header the header hash to inspect
-
1
def initialize(config)
-
1
super
-
1
raise ArgumentError, "you must specify :name in the :header configuration Hash" if !config[:header].has_key?(:name)
-
1
raise ArgumentError, "you must specify :value in the :header configuration Hash" if !config[:header].has_key?(:value)
-
1
Versionist.configuration.header_versions << self if !Versionist.configuration.header_versions.include?(self)
-
end
-
-
1
def matches?(request)
-
6
header_string = request.headers[config[:header][:name]].to_s
-
6
if !header_string.blank?
-
potential_matches = Versionist.configuration.header_versions.select {|hv| header_string.include?(hv.config[:header][:value])}
-
if !potential_matches.empty?
-
if potential_matches.include?(self)
-
if potential_matches.size == 1
-
return true
-
else
-
# when finding multiple potential matches, the match with the longest value wins
-
# (i.e. v2.1 trumps v2), as one is a subset of the other
-
longest = potential_matches.max {|a,b| a.config[:header][:value].length <=> b.config[:header][:value].length}
-
return longest == self
-
end
-
end
-
end
-
end
-
6
false
-
end
-
-
1
def ==(other)
-
2
super
-
2
return false if !other.is_a?(Versionist::VersioningStrategy::Header)
-
return config[:header][:name] == other.config[:header][:name] && self.config[:header][:value] == other.config[:header][:value]
-
end
-
end
-
end
-
end
-
1
module Versionist
-
1
module VersioningStrategy
-
# Implements the parameter versioning strategy.
-
1
class Parameter < Base
-
-
# Creates a new Parameter VersioningStrategy object. config must contain the following keys:
-
# - :parameter the parameter hash to inspect
-
1
def initialize(config)
-
1
super
-
1
raise ArgumentError, "you must specify :name in the :parameter configuration Hash" if !config[:parameter].has_key?(:name)
-
1
raise ArgumentError, "you must specify :value in the :parameter configuration Hash" if !config[:parameter].has_key?(:value)
-
1
Versionist.configuration.parameter_versions << self if !Versionist.configuration.parameter_versions.include?(self)
-
end
-
-
1
def matches?(request)
-
6
parameter_string = request.params[config[:parameter][:name]].to_s
-
6
return !parameter_string.blank? && parameter_string == config[:parameter][:value]
-
end
-
-
1
def ==(other)
-
1
super
-
1
return false if !other.is_a?(Versionist::VersioningStrategy::Parameter)
-
return config[:parameter][:name] == other.config[:parameter][:name] && self.config[:parameter][:value] == other.config[:parameter][:value]
-
end
-
end
-
end
-
end
-
1
begin
-
1
require 'minitest/test'
-
1
test_class = Minitest::Test
-
1
assertions = "assertions"
-
rescue LoadError
-
require "minitest/unit"
-
test_class = MiniTest::Unit::TestCase
-
assertions = "_assertions"
-
end
-
-
1
require 'webmock'
-
-
1
WebMock.enable!
-
-
1
test_class.class_eval do
-
1
include WebMock::API
-
-
1
alias_method :teardown_without_webmock, :teardown
-
1
def teardown_with_webmock
-
485
teardown_without_webmock
-
485
WebMock.reset!
-
end
-
1
alias_method :teardown, :teardown_with_webmock
-
-
1
[:assert_request_requested, :assert_request_not_requested].each do |name|
-
2
alias_method :"#{name}_without_assertions_count", name
-
2
define_method :"#{name}_with_assertions_count" do |*args|
-
self.send("#{assertions}=", self.send("#{assertions}") + 1)
-
send :"#{name}_without_assertions_count", *args
-
end
-
2
alias_method name, :"#{name}_with_assertions_count"
-
end
-
end
-
-
1
begin
-
1
error_class = MiniTest::Assertion
-
rescue NameError
-
error_class = Minitest::Assertion
-
end
-
-
1
WebMock::AssertionFailure.error_class = error_class
-
1
require 'nokogiri'
-
-
1
require 'xpath/dsl'
-
1
require 'xpath/expression'
-
1
require 'xpath/literal'
-
1
require 'xpath/union'
-
1
require 'xpath/renderer'
-
1
require 'xpath/html'
-
-
1
module XPath
-
-
1
extend XPath::DSL::TopLevel
-
1
include XPath::DSL::TopLevel
-
-
1
def self.generate
-
yield(self)
-
end
-
end
-
1
module XPath
-
1
module DSL
-
1
module TopLevel
-
1
def current
-
197
Expression.new(:this_node)
-
end
-
-
1
def name
-
Expression.new(:node_name, current)
-
end
-
-
1
def descendant(*expressions)
-
64
Expression.new(:descendant, current, expressions)
-
end
-
-
1
def child(*expressions)
-
Expression.new(:child, current, expressions)
-
end
-
-
1
def axis(name, tag_name=:*)
-
Expression.new(:axis, current, name, tag_name)
-
end
-
-
1
def next_sibling(*expressions)
-
Expression.new(:next_sibling, current, expressions)
-
end
-
-
1
def previous_sibling(*expressions)
-
Expression.new(:previous_sibling, current, expressions)
-
end
-
-
1
def anywhere(*expressions)
-
18
Expression.new(:anywhere, expressions)
-
end
-
-
1
def attr(expression)
-
128
Expression.new(:attribute, current, expression)
-
end
-
-
1
def contains(expression)
-
Expression.new(:contains, current, expression)
-
end
-
-
1
def starts_with(expression)
-
Expression.new(:starts_with, current, expression)
-
end
-
-
1
def text
-
Expression.new(:text, current)
-
end
-
-
1
def string
-
41
Expression.new(:string_function, current)
-
end
-
-
1
def css(selector)
-
Expression.new(:css, current, Literal.new(selector))
-
end
-
end
-
-
1
module ExpressionLevel
-
1
include XPath::DSL::TopLevel
-
-
1
def where(expression)
-
87
Expression.new(:where, current, expression)
-
end
-
1
alias_method :[], :where
-
-
1
def one_of(*expressions)
-
18
Expression.new(:one_of, current, expressions)
-
end
-
-
1
def equals(expression)
-
77
Expression.new(:equality, current, expression)
-
end
-
1
alias_method :==, :equals
-
-
1
def is(expression)
-
51
Expression.new(:is, current, expression)
-
end
-
-
1
def or(expression)
-
69
Expression.new(:or, current, expression)
-
end
-
1
alias_method :|, :or
-
-
1
def and(expression)
-
Expression.new(:and, current, expression)
-
end
-
1
alias_method :&, :and
-
-
1
def union(*expressions)
-
18
Union.new(*[self, expressions].flatten)
-
end
-
1
alias_method :+, :union
-
-
1
def inverse
-
18
Expression.new(:inverse, current)
-
end
-
1
alias_method :~, :inverse
-
-
1
def string_literal
-
Expression.new(:string_literal, self)
-
end
-
-
1
def normalize
-
41
Expression.new(:normalized_space, current)
-
end
-
1
alias_method :n, :normalize
-
end
-
end
-
end
-
1
module XPath
-
1
class Expression
-
1
attr_accessor :expression, :arguments
-
1
include XPath::DSL::ExpressionLevel
-
-
1
def initialize(expression, *arguments)
-
809
@expression = expression
-
809
@arguments = arguments
-
end
-
-
1
def current
-
397
self
-
end
-
-
1
def to_xpath(type=nil)
-
10
Renderer.render(self, type)
-
end
-
1
alias_method :to_s, :to_xpath
-
end
-
end
-
1
module XPath
-
1
module HTML
-
1
include XPath::DSL::TopLevel
-
1
extend self
-
-
# Match an `a` link element.
-
#
-
# @param [String] locator
-
# Text, id, title, or image alt attribute of the link
-
#
-
1
def link(locator)
-
locator = locator.to_s
-
link = descendant(:a)[attr(:href)]
-
link[attr(:id).equals(locator) | string.n.is(locator) | attr(:title).is(locator) | descendant(:img)[attr(:alt).is(locator)]]
-
end
-
-
# Match a `submit`, `image`, or `button` element.
-
#
-
# @param [String] locator
-
# Value, title, id, or image alt attribute of the button
-
#
-
1
def button(locator)
-
locator = locator.to_s
-
button = descendant(:input)[attr(:type).one_of('submit', 'reset', 'image', 'button')][attr(:id).equals(locator) | attr(:value).is(locator) | attr(:title).is(locator)]
-
button += descendant(:button)[attr(:id).equals(locator) | attr(:value).is(locator) | string.n.is(locator) | attr(:title).is(locator)]
-
button += descendant(:input)[attr(:type).equals('image')][attr(:alt).is(locator)]
-
end
-
-
-
# Match anything returned by either {#link} or {#button}.
-
#
-
# @param [String] locator
-
# Text, id, title, or image alt attribute of the link or button
-
#
-
1
def link_or_button(locator)
-
link(locator) + button(locator)
-
end
-
-
-
# Match any `fieldset` element.
-
#
-
# @param [String] locator
-
# Legend or id of the fieldset
-
#
-
1
def fieldset(locator)
-
locator = locator.to_s
-
descendant(:fieldset)[attr(:id).equals(locator) | child(:legend)[string.n.is(locator)]]
-
end
-
-
-
# Match any `input`, `textarea`, or `select` element that doesn't have a
-
# type of `submit`, `image`, or `hidden`.
-
#
-
# @param [String] locator
-
# Label, id, or name of field to match
-
#
-
1
def field(locator)
-
locator = locator.to_s
-
xpath = descendant(:input, :textarea, :select)[~attr(:type).one_of('submit', 'image', 'hidden')]
-
xpath = locate_field(xpath, locator)
-
xpath
-
end
-
-
-
# Match any `input` or `textarea` element that can be filled with text.
-
# This excludes any inputs with a type of `submit`, `image`, `radio`,
-
# `checkbox`, `hidden`, or `file`.
-
#
-
# @param [String] locator
-
# Label, id, or name of field to match
-
#
-
1
def fillable_field(locator)
-
locator = locator.to_s
-
xpath = descendant(:input, :textarea)[~attr(:type).one_of('submit', 'image', 'radio', 'checkbox', 'hidden', 'file')]
-
xpath = locate_field(xpath, locator)
-
xpath
-
end
-
-
-
# Match any `select` element.
-
#
-
# @param [String] locator
-
# Label, id, or name of the field to match
-
#
-
1
def select(locator)
-
locator = locator.to_s
-
locate_field(descendant(:select), locator)
-
end
-
-
-
# Match any `input` element of type `checkbox`.
-
#
-
# @param [String] locator
-
# Label, id, or name of the checkbox to match
-
#
-
1
def checkbox(locator)
-
locator = locator.to_s
-
locate_field(descendant(:input)[attr(:type).equals('checkbox')], locator)
-
end
-
-
-
# Match any `input` element of type `radio`.
-
#
-
# @param [String] locator
-
# Label, id, or name of the radio button to match
-
#
-
1
def radio_button(locator)
-
locator = locator.to_s
-
locate_field(descendant(:input)[attr(:type).equals('radio')], locator)
-
end
-
-
-
# Match any `input` element of type `file`.
-
#
-
# @param [String] locator
-
# Label, id, or name of the file field to match
-
#
-
1
def file_field(locator)
-
locator = locator.to_s
-
locate_field(descendant(:input)[attr(:type).equals('file')], locator)
-
end
-
-
-
# Match an `optgroup` element.
-
#
-
# @param [String] name
-
# Label for the option group
-
#
-
1
def optgroup(locator)
-
locator = locator.to_s
-
descendant(:optgroup)[attr(:label).is(locator)]
-
end
-
-
-
# Match an `option` element.
-
#
-
# @param [String] name
-
# Visible text of the option
-
#
-
1
def option(locator)
-
locator = locator.to_s
-
descendant(:option)[string.n.is(locator)]
-
end
-
-
-
# Match any `table` element.
-
#
-
# @param [String] locator
-
# Caption or id of the table to match
-
# @option options [Array] :rows
-
# Content of each cell in each row to match
-
#
-
1
def table(locator)
-
locator = locator.to_s
-
descendant(:table)[attr(:id).equals(locator) | descendant(:caption).is(locator)]
-
end
-
-
# Match any 'dd' element.
-
#
-
# @param [String] locator
-
# Id of the 'dd' element or text from preciding 'dt' element content
-
1
def definition_description(locator)
-
locator = locator.to_s
-
descendant(:dd)[attr(:id).equals(locator) | previous_sibling(:dt)[string.n.equals(locator)] ]
-
end
-
-
1
protected
-
-
1
def locate_field(xpath, locator)
-
locate_field = xpath[attr(:id).equals(locator) | attr(:name).equals(locator) | attr(:placeholder).equals(locator) | attr(:id).equals(anywhere(:label)[string.n.is(locator)].attr(:for))]
-
locate_field += descendant(:label)[string.n.is(locator)].descendant(xpath)
-
locate_field
-
end
-
end
-
end
-
1
module XPath
-
1
class Literal
-
1
attr_reader :value
-
1
def initialize(value)
-
@value = value
-
end
-
end
-
end
-
1
module XPath
-
1
class Renderer
-
1
def self.render(node, type)
-
46
new(type).render(node)
-
end
-
-
1
def initialize(type)
-
46
@type = type
-
end
-
-
1
def render(node)
-
4514
arguments = node.arguments.map { |argument| convert_argument(argument) }
-
1906
send(node.expression, *arguments)
-
end
-
-
1
def convert_argument(argument)
-
3312
case argument
-
1860
when Expression, Union then render(argument)
-
976
when Array then argument.map { |element| convert_argument(element) }
-
652
when String then string_literal(argument)
-
when Literal then argument.value
-
528
else argument.to_s
-
end
-
end
-
-
1
def string_literal(string)
-
652
if string.include?("'")
-
string = string.split("'", -1).map do |substr|
-
"'#{substr}'"
-
end.join(%q{,"'",})
-
"concat(#{string})"
-
else
-
652
"'#{string}'"
-
end
-
end
-
-
1
def this_node
-
466
'.'
-
end
-
-
1
def descendant(parent, element_names)
-
164
if element_names.length == 1
-
92
"#{parent}//#{element_names.first}"
-
72
elsif element_names.length > 1
-
216
"#{parent}//*[#{element_names.map { |e| "self::#{e}" }.join(" | ")}]"
-
else
-
"#{parent}//*"
-
end
-
end
-
-
1
def child(parent, element_names)
-
if element_names.length == 1
-
"#{parent}/#{element_names.first}"
-
elsif element_names.length > 1
-
"#{parent}/*[#{element_names.map { |e| "self::#{e}" }.join(" | ")}]"
-
else
-
"#{parent}/*"
-
end
-
end
-
-
1
def axis(parent, name, tag_name)
-
"#{parent}/#{name}::#{tag_name}"
-
end
-
-
1
def node_name(current)
-
"name(#{current})"
-
end
-
-
1
def where(on, condition)
-
210
"#{on}[#{condition}]"
-
end
-
-
1
def attribute(current, name)
-
292
"#{current}/@#{name}"
-
end
-
-
1
def equality(one, two)
-
205
"#{one} = #{two}"
-
end
-
-
1
def is(one, two)
-
102
if @type == :exact
-
51
equality(one, two)
-
else
-
51
contains(one, two)
-
end
-
end
-
-
1
def variable(name)
-
"%{#{name}}"
-
end
-
-
1
def text(current)
-
"#{current}/text()"
-
end
-
-
1
def normalized_space(current)
-
82
"normalize-space(#{current})"
-
end
-
-
1
def literal(node)
-
node
-
end
-
-
1
def css(current, selector)
-
paths = Nokogiri::CSS.xpath_for(selector).map do |xpath_selector|
-
"#{current}#{xpath_selector}"
-
end
-
union(paths)
-
end
-
-
1
def union(*expressions)
-
36
expressions.join(' | ')
-
end
-
-
1
def anywhere(element_names)
-
36
if element_names.length == 1
-
36
"//#{element_names.first}"
-
elsif element_names.length > 1
-
"//*[#{element_names.map { |e| "self::#{e}" }.join(" | ")}]"
-
else
-
"//*"
-
end
-
end
-
-
1
def contains(current, value)
-
51
"contains(#{current}, #{value})"
-
end
-
-
1
def starts_with(current, value)
-
"starts-with(#{current}, #{value})"
-
end
-
-
1
def and(one, two)
-
"(#{one} and #{two})"
-
end
-
-
1
def or(one, two)
-
138
"(#{one} or #{two})"
-
end
-
-
1
def one_of(current, values)
-
504
values.map { |value| "#{current} = #{value}" }.join(' or ')
-
end
-
-
1
def next_sibling(current, element_names)
-
if element_names.length == 1
-
"#{current}/following-sibling::*[1]/self::#{element_names.first}"
-
elsif element_names.length > 1
-
"#{current}/following-sibling::*[1]/self::*[#{element_names.map { |e| "self::#{e}" }.join(" | ")}]"
-
else
-
"#{current}/following-sibling::*[1]/self::*"
-
end
-
end
-
-
1
def previous_sibling(current, element_names)
-
if element_names.length == 1
-
"#{current}/preceding-sibling::*[1]/self::#{element_names.first}"
-
elsif element_names.length > 1
-
"#{current}/preceding-sibling::*[1]/self::*[#{element_names.map { |e| "self::#{e}" }.join(" | ")}]"
-
else
-
"#{current}/preceding-sibling::*[1]/self::*"
-
end
-
end
-
-
1
def inverse(current)
-
72
"not(#{current})"
-
end
-
-
1
def string_function(current)
-
82
"string(#{current})"
-
end
-
end
-
end
-
1
module XPath
-
1
class Union
-
1
include Enumerable
-
-
1
attr_reader :expressions
-
1
alias_method :arguments, :expressions
-
-
1
def initialize(*expressions)
-
18
@expressions = expressions
-
end
-
-
1
def expression
-
36
:union
-
end
-
-
1
def each(&block)
-
arguments.each(&block)
-
end
-
-
1
def method_missing(*args)
-
XPath::Union.new(*arguments.map { |e| e.send(*args) })
-
end
-
-
1
def to_xpath(type=nil)
-
36
Renderer.render(self, type)
-
end
-
1
alias_method :to_s, :to_xpath
-
end
-
end